Reputation: 170
I just use the following command to convert a gif file to mp4 but the resulting mp4 file doesn't play in android default video player .
what did I wrong ?
is there any aditional steps should I take to produce android playable mp4 files ?
$ ffmpeg -f gif -i infile.gif outfile.mp4
my test gif file : Test Gif File
My desktop played the output.mp4 very well using VLC Media Player and also MX Player on my android device played the video file without any error.
Upvotes: 11
Views: 15220
Reputation: 18043
Try this:
ffmpeg -i file.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4
Upvotes: 14