Skip to content

Instantly share code, notes, and snippets.

@topher6345
Last active December 15, 2015 09:38
Show Gist options
  • Save topher6345/5239360 to your computer and use it in GitHub Desktop.
Save topher6345/5239360 to your computer and use it in GitHub Desktop.
A bash shell script using ffmpeg to encode all the .mov files in the current directory to Motion-Jpeg, to use in MaxMSP/Jitter.
#!/bin/bash
# Script using ffmpeg to convert all the .mov files in the current
# directory to "Motion Jpeg".mov codec
# Remember to $chmod
for ff in *.mov;
do
filename=$(basename $ff)
extension=${filename##*.}
filename=${filename%.*}
mkdir converted
#echo "ffmpeg -i ${ff} -an -pix_fmt yuvj420p -vcodec mjpeg -f mov -y ${filename}vj.mov" # test
ffmpeg -i ${ff} -an -pix_fmt yuvj420p -vcodec mjpeg -f mov -y converted/${filename}vj.mov
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment