A have a hand full of .avi
files which I would like to convert to .mp4
. Cobbling together everything I have found on the Internet, I end up with something like this:
ffmpeg -i something.avi -c:v copy -c:a copy something.mp4
What I get is playable on VLC player, but, of course, that will play anything I through at it. However, I cannot play it using QuickLook in the Finder or with the QuickTime player.
In some cases I get video, but no sound. In some other cases I get garbled video.
I am guessing that the audio or video codec inside the .avi
file is incompatible with MacOS, and that the copy
instruction above is not appropriate. In that case I guess that I would actually need to reencode the audio or video.
If this sounds incoherent, I admit I know very little about video files.
What would be the best settings to try to produce an MP4 which works natively on MacOS?
"What would be the best settings to try to produce an MP4 which works natively on MacOS?"
Check this useful guide.
You can try the below command as a starting point (audio track will / should be auto-detected & converted):
ffmpeg -i something.avi -c:v libx264 -crf 22 -pix_fmt yuv420p something.mp4