Brett Terpstra: Automated HTML5 video encoding revisited
This will come in handy someday.
“The script is specifically designed to take an MPEG-4, H.264 file, move it to a new folder based on the filename, create WEBM and OGV versions of it in the new folder, and upload the whole folder to a server using rsync. SSH information and target directories are specified in the config at the top of the script. At the end, it takes what it knows about the files and filenames and creates a TextMate Markdown blog template, inserts the video shortcode for the VideoJS WordPress plugin (which is common syntax for other plugins as well) and opens it for editing in TextMate.”