If you see fewer posts. . .

it's because I don't post much anymore. This may change at any time. But PLEASE feel free to look through our Flickr stream (over on the right), which is updated almost every day.

Saturday, October 06, 2007

Automated Video Conversion and Upload

Just finished writing a little shell script which will allow Sandy to easily convert and upload videos to blogger. Here is the script, and what it does:

ffmpeg -i $1 -vcodec flv -me full -me_range 16 -mbd 1 -qmin 2 -qmax 31 -b 500000 -r 25 -s 320x240 -refs 5 -acodec mp3 -ar 22050 -ac 2 -ab 128 $1.flv
converts an AVI file into a flash video file and gives it a .flv extension.
pscp -l username -pw password $1.flv username@kurtandsandy.com:/home/username/public_html/dropshots
sends the file to our web server
rm $1.flv
deletes the FLV file
echo '<
embed src="http://www.dropshots.com/dropshotsplayer.swf" flashvars="url=http://kurtandsandy.com/dropshots/'$1.flv'&post=1" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" height="310" width="320"></embed>' > /home/sandy/Desktop/blogger_flv.txt
creates a text file that when opened, displays the text needed to copy and paste into blogger to link to the video.

Here is the first video uploaded:


Ugh. It pretty much worked, except for the fact that it puts in the whole pathname for the file instead of just the filename. I'll have to get that worked out.

Oops, it's 3:35! Gotta sneak into bed!