I'm not familiar with FFMPEG at all and would like to know how to convert MP4 to OGV format while still keeping the same video and audio quality?
Asked
Active
Viewed 1.8k times
16
-
Related no quality request: https://superuser.com/questions/108237/convert-mp4-to-ogg-video – Ciro Santilli OurBigBook.com Sep 07 '19 at 14:33
-
Both containers store different codecs. If the codec is *H.264* then OGV cannot store it, you'll loose some quality in re-encoding, the quality may degrade further. **TL;DR** if the video codec isn't supported on both formats you're surely going to loose quality. – tripulse Jan 01 '20 at 09:35
1 Answers
33
Basic command is
ffmpeg -i input.mp4 -c:v libtheora -q:v 7 -c:a libvorbis -q:a 4 output.ogv
You'll have to fiddle with the q values for video and audio if the result's not acceptable. Lower values are better but produce bigger files. For libtheora, it's the opposite - higher values are better. Range is 0-10.
Gyan
- 34,439
- 6
- 56
- 98
-
2Also see [FFmpeg Wiki: Theora & Vorbis](http://trac.ffmpeg.org/wiki/TheoraVorbisEncodingGuide). – llogan Jul 04 '16 at 22:32
-
... `-acodec libopus -b:a 128000` worked for me for opus, the quality level isn't supported apparently. – Gringo Suave Mar 15 '19 at 01:03