16

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?

user400424
  • 5,464
  • 8
  • 21
  • 28
  • 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 Answers1

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