4

I am very attracted to the idea of using completely free codecs. How do I convert my .mp4 files to .ogv using FFmpeg under Xenial Xerus using these free codecs?

I am interested in:

  1. Converting a single mp4 file
  2. Converting a folder with many mp4 files

1 Answer 1

4

First install FFmpeg by running the following in a Terminal window:

sudo apt-get install ffmpeg

Then change to the same folder as your mp4 file(s) and run either of the following:

1. For a single mp4 file:

ffmpeg -i input.mp4 -c:v libtheora -qscale:v 6 -c:a libvorbis -qscale:a 5 output.ogv

Of course change input.mp4 to the actual filename of your input video file!

2. For many mp4 files:

mkdir ogv && \
for j in *.mp4
do 
 ffmpeg -i "$j" -c:v libtheora -qscale:v 6 -c:a libvorbis -qscale:a 5 ogv/"${j%.mp4}.ogv"
done

Options to experiment with:

  • -qscale:v (for video quality) takes integers from 0 - 10 with 0 being lowest quality and 10 the highest quality
  • -qscale:a (for audio quality) takes integers from 0 - 10 with 0 being lowest quality and 10 the highest quality

And enjoy the feeling of using libtheora and libvorbis, both codecs completely unencumbered and totally free :)

References:

You must log in to answer this question.

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