Hacker News new | ask | show | jobs
by blockoperation 3464 days ago
I use parallel for pretty much all batching these days. It's useful even when you don't need parallelisation – here's a simple transcoding example:

  parallel -j1 'ffmpeg -i {2} -c:v libx264 -tune film -preset veryslow -crf 18 -vf scale={1} -c:a libfdk_aac -vbr 5 conv/{2.}-{1}.mp4' ::: hd480 hd720 hd1080 ::: *.mp4
Obviously in the real world you would want to take some extra steps to avoid making upscaled versions, but this is just a rough example.