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.
Whichever Android version you are using, download open Convertio app on your phone browser. Step 1: Search for GIF - Download and save GIF files on your Android phone. Step 2: Set output video format – Click the downward arrow on the MP4 and a drop-down menu will pop up.
Can I convert a GIF into a video? Yes, this converter tool quickly and easily transforms GIFs into MP4 video files. Additionally, this convert to MP4 tool is powered by Adobe Premiere, which provides you with professional quality results in seconds.
Launch VLC. Click on the Media menu, and choose the Convert / Save option from the menu. Go to the File window, click on + Add to select the GIFs you want to convert from your device.
By default, FFmpeg uses a generic 256-color palette for every GIF encoding and doesn't take into account the colors in the input video. However, we can use the palettegen and paletteuse filters of FFmpeg to generate a custom palette from the colors in our original video to create a higher-quality GIF.
Try this:
ffmpeg -i file.gif -movflags faststart -pix_fmt yuv420p -vf "scale=trunc(iw/2)*2:trunc(ih/2)*2" out.mp4
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With