Join 3,503 readers in helping fund MetaFilter (Hide)


Need a Mac video download conversion automator
September 21, 2010 3:23 PM   Subscribe

MacOSX: Want to run a video converter after a download/torrent finishes.

Need something similar to iPodifier that will monitor a specific folder, and once it detects that a complete video file has finished downloading and is present, will run a video converter program (Handbrake or FFMPEGX perhaps) and convert the file to a pre-defined format.

Reason is that I often will download a lot of video content overnight and would like to have it on my iPhone to watch the next morning during my commute.
posted by beammeup4 to Computers & Internet (3 answers total)
 
Sounds like you want folder actions. That monitors a folder and executes a script on any file that appears. The tough part is getting it to only activate when it detects a complete file.

If you're not especially in love with your current torrent application, look for one that keeps incomplete files in a temporary location, then only moves them to a final location upon completion. To be honest, I know they're out there, but I'm not sure which ones have this option. I'm guessing Vuze/Azureus would have a plugin for it, but I can't stand its bloatedness. I tried to to it with uTorrent and Transmission to no avail. (I stopped looking because I don't care about the automation that much, since all I needed to do was activate an automatic organization script for Plex that takes five seconds to run.)
posted by supercres at 3:51 PM on September 21, 2010


You can do this with a simple shell command:

until [ $(stat -c '%Y' dir/filename) -eq $(sleep 10m; stat -c '%Y' dir/filename) ]; do :; done ; ffmpeg -i dir/filename -acodec libfaac -ab 128k -vcodec libx264 -vb 1000k dir/output.mp4

That will wait until the file's modification time hasn't changed in 10 minutes, and then run ffmpeg to convert the file. Replace "10m" with whatever window time you want, and modify the ffmpeg encoding options to suit.
posted by Rhomboid at 5:08 PM on September 21, 2010 [1 favorite]


I tried to to it with uTorrent and Transmission to no avail.

Just FYI, I use Transmission, and I have all my downloads start in an "Incomplete" folder. It is easily possible.
posted by reductiondesign at 9:04 PM on September 21, 2010


« Older How do I go about creating a s...   |  100% by accident, I discovered... Newer »
This thread is closed to new comments.