5

I am using this script to convert an avi file into a mp4 file

ffmpeg -i video.avi video.mp4

The resulting file I got is encoded using H264 but the video is flawed.

What am I doing wrong? I would like the resulting video to be encoded a good codec that is widely spread.

Does this defect have a name? Also I can't upload the video on Twitter, why is that?

2
  • 2
    Does this answer your question? use ffmpeg to transform mp4 to same high-quality avi file?. Opposite direction but the process is the same. ffmpeg has a lot of different options for various tasks. When in doubt, consult the documentation
    – Nmath
    Dec 16, 2021 at 3:35
  • 1
    Input and output files look ok to me, perhaps try a more embellished command line: ffmpeg -i Counter-AVI.avi -c:v libx264 -preset slow -crf 16 test.mp4
    – andrew.46
    Dec 17, 2021 at 2:31

1 Answer 1

4

MPEG-4 is still currently the most universally compatible and widespread codec, Instead of using H.264 codec

Execute:

ffmpeg -i video.avi -c:v mpeg4 video.mp4

This will specify "MPEG-4 Video (Simple Profile)" codec instead of "H.264 (High 4:4:4 Profile)".

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .