Quantcast

applescript: capture image frm Wirecast, convert image to jpeg, overwrite image every 15sec, w/ scheduled ftp upload every 15sec

kilenc9's picture

Hi - I've got this very simple script and now I would like it to do three more things:
convert image from tiff to jpg, grab a new image every 15 secs from a streaming video, and FTP uploading to my server. The image can be overwritten
since FTP uploading should cycle & catch the replaced image every 15 sec.

tell application
"Wirecast"
tell last document to save snapshot to "/Users/BirdBox/Desktop/snapshot.tiff"
end tell

Can I use the code to convert the images as described above? Where can I get this code. Then is it possible to set up one of the ftp droplets to automatically check for a new image.

Thanks for any help!
Kata

jinpa's picture

Hi,I have set up a system

Hi,

I have set up a system that does exactly what you want, execpt the update is every minute not every 15 secs.

Once you have exported your .tiff from Wirecast, you can use a shell command to convert the image like so:

sips --resampleWidth $width /Users/$USER/Pictures/$myImage.png;

Check out the sips man pages for more info, you can convert to .jpg too.

I then upload using curl and the delete the .tiff and .png files. The whole thing is put in a shell script that is run every minute using cron.

Hope this helps !

User login

Latest critique

Internet.Commerce

Partner With Us












Sponsors