Converting mov to mp4 with ffmpeg better quality
Remux only
If your input video and audio are compatible with MP4 you can use stream copy mode:
ffmpeg -i input.mov -c copy output.mp4
Re-encode
If you need to encode to other formats compatible with MP4:
ffmpeg -i input.mov -crf 23 -preset medium -movflags +faststart -c:a aac output.mp4
- Use the highest
-crf
value that provides an acceptable quality. - Use the slowest
-preset
that you have patience for. - If the input is AAC audio you can change
-c:a aac
to-c:a copy
.
See FFmpeg Wiki: H.264 and FFmpeg Wiki: H.265.
![Calamity Jane](https://i.stack.imgur.com/lbCsB.png?s=256&g=1)
Calamity Jane
PHP Developer in Germany I guess I can call myself a senior by now.
Updated on June 11, 2022Comments
-
Calamity Jane about 2 years
I want to convert mov videos to mp4. Currentoy I manage this with ffmpeg via bash with the following call:
ffmpeg -i input.mov -f mp4 -vcodec mpeg2video -acodec mp3 output.mp4
Yes that works, but the quality is abysmal. My 50Mb is shrunken to a handy 2.3 Mb file. The I tried the variation where I just change the container:
ffmpeg -i input.mov -f mp4 -vcodec copy -acodec mp3 output.mp4
Yes that works, too, but the file is still huge since I don't compress the video. So my 50Mb stay 50Mb.
Is there a setting, where I can do a slight or gradual compression, without having a total lack of quality? an output file of maybe 10 - 20 Mb would be my target.
What I tried:
ffmpeg -i input.mov -f mp4 -vcodec -qscale:v 4 -acodec mp3 output.mp4
Gives me the error message:
WARNING: library configuration mismatch [...] Unknown encoder '-qscale:v'
Version used: ffmpeg version 2.8.11-0ubuntu0.16.04.1
-
Mizanur Rahman Khan almost 3 yearsThis not working on web browsers. only play audio.
-
llogan almost 3 years@MizanurRahmanKhan Need to see your command and the complete log to be able to help.