published on

xargs is magical

So I’ve known about xargs for a little while, but recently learned about one of its coolest features:

ls *.avi | xargs -n1 -P2 ffmpeg2theora -x 

Yes, if you run that, xargs will keep 2 cores of your machine happily chomping away at some theora encoding.