[FFmpeg-user] formula for transcoding to ogv, shrinking an mkv
Lou
lou at lrcd.com
Mon Jan 21 19:34:45 CET 2013
On Sun, 20 Jan 2013 16:01:49 -0600 (CST)
James Miller <gajs-f0el at dea.spamcon.org> wrote:
> Thank you for this input, Lou. As you may have gathered from previous
> comments in this thread, since I am using Ubuntu, I actually have the
> avconv fork installed on this computer (though I intend to compile ffmpeg:
> I'm still deciding whether I want to have both on this machine, or whether
> I will simply replace avconv with ffmpeg).
It's your choice and you can have both on one machine. There are
several methods to do this such as what Carl proposed. Just be aware
than when you issue the ffmpeg command that you're using ffmpeg from
FFmpeg and not the fake version supplied by Ubuntu. You can tell what
you're using by looking at the first line in the ffmpeg console output:
ffmpeg version N-48755-gd9226b3 Copyright (c) 2000-2013 the FFmpeg
developers
Real ffmpeg says FFmpeg in the line. Another method to determine what
you're using is that avconv from the repository has more bugs.
> I gave the following a try first ffmpeg -i in.mkv -c:v libtheora -c:a
> libvorbis -b:v 191k -b:a 48k out.ogv on this system, but that could not be
> processed due to the following error: Unrecognized option 'c:v'.
That's because that fake "ffmpeg" from the repository uses old syntax.
The fake version is not supported in this mailing list because it is
not from FFmpeg. I know this can be confusing that Ubuntu uses "ffmpeg"
for a package name for something that is not ffmpeg (and one can not
help to question if this was intentional or desired). For clarification
see:
http://stackoverflow.com/a/9477756/1109017
> I decided
> then to use the following: avconv -i in.mkv -c:v libtheora -c:a libvorbis
> -b:v 191k -b:a 48k out.ogv. That incantation succeeded, and actually
> resulted in the smallest ogv file I've been able thus far to produce (the
> 491 MB mkv was shrunk to a 70 MB ogv).
Where did you get 191k from? Is it arbitrary? You can roughly predict
the output size as shown in the x264 guide but I'll repeat it here:
You have an input of 100 MB with a 3 minute duration. You require an
output of file size of 50 MB. Since "file size / duration = bitrate"
then (50MB desired output file size * 8192 [converts MB to
kilobits])/180 seconds = 2276 kilobits per second overall bitrate.
2276k overall - 128k audio bitrate = 2148k video bitrate resulting in:
-b:v 2148 -b:a 128k
> My question, then, is whether the incantation you proposed was for avconv,
> or for ffmpeg?
Any so-called advice I give is for ffmpeg from FFmpeg and not avconv
or the bizarro "ffmpeg" from the Ubuntu repository as of Natty.
I do not use avconv, so I can not provide help for it, and since it is
not from the FFmpeg project it is not supported in this mailing-list.
You should request help at the various Ubuntu resources or at libav if
you want to continue using avconv.
More information about the ffmpeg-user
mailing list