Created
March 6, 2012 22:05
-
-
Save WeatherGod/1989296 to your computer and use it in GitHub Desktop.
finding sensible defaults for ffmpeg (aiming for cross-compatibility)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
So, provided you have some image files of form "_tmp0000.png", you can run generate_movies.sh to create a "result.txt" file which contains a list of the files successfully generated. | |
Additional columns are used to indicate testing status: '1' (failed), '0' (successful), '0.5' (works, but serious artifacts), '?' (couldn't try). | |
The script will provide the first column by testing if the movie plays using ffplay. Note, no movie gets displayed to the screen, so this is fairly quick. I have included my "result.txt" file which contains testing results for additional platforms. Platforms are: | |
* LibreOffice Impress on Linux | |
* QuickTime on Mac | |
* MS Office PowerPoint on Mac | |
* OpenOffice Impress on Mac |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for codec in mpeg4 libtheora mpeg1video mpeg2video msmpeg4 msmpeg4v2 wmv1 wmv2 | |
do | |
for format in mp4 avi mov webm m4v flv asf | |
do | |
ffmpeg -i _tmp%04d.png -vcodec $codec -r 5.0 -f $format \ | |
-y "test_ffmpeg_"$codec"_anim."$format 2> /dev/null > /dev/null | |
if [ $? -eq 0 ] | |
then | |
ffmpeg -i "test_ffmpeg_"$codec"_anim."$format \ | |
-f null - 2> /dev/null | |
echo "test_ffmpeg_"$codec"_anim."$format $? >> result.txt | |
fi | |
done | |
done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_ffmpeg_mpeg4_anim.mp4 0 1 0 0 0 | |
test_ffmpeg_mpeg4_anim.avi 0 1 1 1 1 | |
test_ffmpeg_mpeg4_anim.mov 0 1 0 0 0 | |
test_ffmpeg_mpeg4_anim.m4v 0 ? 1 1 ? | |
test_ffmpeg_mpeg4_anim.flv 1 ? 1 1 ? | |
test_ffmpeg_mpeg4_anim.asf 0 ? 0 ? ? | |
test_ffmpeg_libtheora_anim.avi 0 0 1 1 1 | |
test_ffmpeg_libtheora_anim.mov 0 1 1 1 1 | |
test_ffmpeg_libtheora_anim.m4v 1 ? 1 1 ? | |
test_ffmpeg_libtheora_anim.asf 0 ? 1 ? ? | |
test_ffmpeg_msmpeg4_anim.avi 0 1 0.5 0.5 1 | |
test_ffmpeg_msmpeg4_anim.mov 0 1 1 1 1 | |
test_ffmpeg_msmpeg4_anim.m4v 1 ? 1 1 ? | |
test_ffmpeg_msmpeg4_anim.asf 0 ? 0.5 ? ? | |
test_ffmpeg_msmpeg4v2_anim.avi 0 1 0 0 1 | |
test_ffmpeg_msmpeg4v2_anim.mov 0 1 1 1 1 | |
test_ffmpeg_msmpeg4v2_anim.m4v 1 ? 1 1 ? | |
test_ffmpeg_msmpeg4v2_anim.asf 0 ? 0 ? ? | |
test_ffmpeg_wmv1_anim.avi 0 1 0 0 1 | |
test_ffmpeg_wmv1_anim.mov 0 1 1 1 1 | |
test_ffmpeg_wmv1_anim.m4v 1 ? 1 1 ? | |
test_ffmpeg_wmv1_anim.asf 0 ? 0 ? ? | |
test_ffmpeg_wmv2_anim.avi 0 1 0 0 1 | |
test_ffmpeg_wmv2_anim.mov 0 1 1 1 1 | |
test_ffmpeg_wmv2_anim.m4v 1 ? 1 1 ? | |
test_ffmpeg_wmv2_anim.asf 0 ? 0 ? ? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment