A pair of scripts to simplify posting videos to YouTube
Dec 01, '08 07:30:01AM • Contributed by: mzs
Dec 01, '08 07:30:01AM • Contributed by: mzs
We have had a few video cameras, but it was always a real pain to submit short video clips to YouTube. Basically, I would need to create a short movie in a program like iMovie or Final Cut Express and then export it. This is something that is too complicated for my wife, so she asked me for some way to simply drag and drop a video onto an icon in her dock.
I put together these two scripts to automate that process. Just install youtube into /usr/bin/local, and youtube.app into /Applications (and then drag it to your Dock). First, here's the youtube shell script: You need to have ffmpeg installed, of course -- I suggest MacPorts -- and you may need or want to modify the above shell script to set the ffmpeg options, or the path to ffmpeg. Remember to make the script executable, too.
Here's the AppleScript source for youtube.app; paste this into Script Editor and save as an application: When you have a nice video clip (say in your Movies folder, in iPhoto, or QuickTime) that you'd like to post to YouTube, just drag the file or files onto the dock icon for youtube.app. Terminal.app will fire up and run ffmpeg to convert the videos into a format more comfortable for the web. Also, it will fire up QuickTime Player with the transcoded file(s). You open a browser window to youtube.com, and then just drag the file(s) from the title bar of the QuickTIme Player window(s) into the file chooser dialog of the browser. After a bit of time, the video(s) should be uploaded.
When you close the browser window and the QuickTime Player Windows, you will see the Terminal.app window asking whether you want to delete or keep the transcoded files (stored in /tmp).
[robg adds: I haven't tested this one.]
I put together these two scripts to automate that process. Just install youtube into /usr/bin/local, and youtube.app into /Applications (and then drag it to your Dock). First, here's the youtube shell script: You need to have ffmpeg installed, of course -- I suggest MacPorts -- and you may need or want to modify the above shell script to set the ffmpeg options, or the path to ffmpeg. Remember to make the script executable, too.
Here's the AppleScript source for youtube.app; paste this into Script Editor and save as an application: When you have a nice video clip (say in your Movies folder, in iPhoto, or QuickTime) that you'd like to post to YouTube, just drag the file or files onto the dock icon for youtube.app. Terminal.app will fire up and run ffmpeg to convert the videos into a format more comfortable for the web. Also, it will fire up QuickTime Player with the transcoded file(s). You open a browser window to youtube.com, and then just drag the file(s) from the title bar of the QuickTIme Player window(s) into the file chooser dialog of the browser. After a bit of time, the video(s) should be uploaded.
When you close the browser window and the QuickTime Player Windows, you will see the Terminal.app window asking whether you want to delete or keep the transcoded files (stored in /tmp).
[robg adds: I haven't tested this one.]
•
[9,233 views]
