[FFmpeg-user] (serious) novice, in need of advice regarding format conversion

Ronald F. Guilmette rfg at tristatelogic.com
Sat Jul 21 00:17:10 CEST 2012

In message <5007B041.7070302 at yahoo.com>, 
Tim Nicholson <nichot20 at yahoo.com> wrote:

>On 17/07/12 21:30, Ronald F. Guilmette wrote:
>> In message <20120717080949.GE9329 at arborea>, 
>> Stefano Sabatini <stefasab at gmail.com> wrote:
>>> [...]
>>> The lowest common denominator for players will be the
>>> mpeg2video+MP3+avi combination.
>> As I said, I only have one target here, i.e. _anything_ that the LG BD670
>> can play (and I don't care which container/codec are used, as long as the
>> LG BD670 is happy).  In short, I have -zero- reason to care about
>> ``portability''.
>> Also, I think that for what I am doing, I will want to use whatever format
>> gives me the MOST quality and/or functionality... NOT the ``lowest common
>> denominator''.
>The most quality will be to avoid transcoding what you already have, so
>a simple rewrap from .VOB to .mpg/avi would probably suffice.

Please define "rewrap" in this context.

As I previously mentioned, I tried just renaming the .vob file to a .mpg
file.  The player (LG BD670) _would_ then play the file, but the fast-forward
and fast-reverse controls then failed entirely to operate as the file was

Do you have some solution for this problem?  Are you proposing that I use
ffmpeg to transcode MPEG2 to (somehow slightly different) MPEG2?  If so,
I'd love to see what you are suggesting in the way of a command line.

>> Lastly, as my prior popsting mentioned, this player allegedly supports .MKV
>> files.  If that container format provides more functionality that the other
>> supported container formats, then that is probably the one I want to convert
>> my .VOB files into.  Now I just need someone to show me precisely how to do
>> that.  (An example command line please!)
>Might I suggest you try avidemux which is a gui front end for ffmpeg and
>easily allows selection of different options,

Yes, you may suggest it.  I have it here.  It is installed and it does seem
to run OK.  However as I mentioned in my prior posting, I have a natural
aversion to GUIs, and prefer command lines.  (I am basically a UNIX guy,
but a point-and-drool Windoze type.)  

I feel sure that anything that I can do with the GUI I can also accomplish
with an appropriate command line.... if only someone here would be kind and
help me out a little bit.  (I will try to ask specific questions from now
on in the hopes that that may elicit more useful information from the
knowlegable denizens here.)

>... including "stream copying" ...

I wish I knew what that meant in the context.  Could you define please?

>with MKV container output.

So I guess that you must mean just simply lifting the "mpeg2video" and
"ac3" out of the existing .vob file and transplanting them (unchanged?)
into a .mkv container.  Is that correct?  Is that what you meant?  If
so, what's the command line for doing that?

>This would avoid having to "know squat about
>ffmpeg, nor about its gazillion options", and allow you to find
>something that works..

I'n not sure why you think that using a GUI interface (versus a command
line) somehow relieves the user of having to know, at least marginally,
what he is trying to do, and how (or even weather) ffmpeg is going to be
persuaded to do it for him.

But obviously, I have stumbled into a place with general disdain for folks
like me, who are just trying to accomplish something simple, and are not
entirely eager to read all 5,000 lines of the (apparently seriously deficient)
man page and/or to become experts on all manner of video & audio encoding.
So instead of asking in a generalize way for help, I'll henceforth ask
very specific questions.

(NOTE: The first two questions below relate more to my specific hardware
than to ffmpeg, so anybody not working with BD players can skip those.
The rest of the questions below are very ffmpeg-specific however.)

1)  Why is it that the LG BD670 refuses to honor fast-forward and/or fast-
reverse command when playing a .vob which has been renamed to a .mpg?
(It's OK if nobody has an answer for this one.  It may just come down to
an idiosyncracy of the LG BD670.)

2)  Does anyone here own _any_ LG BD player which can for fast-forward
and/or fast-reverse on _any_ kind of file containing an MPEG2 video

3)  Why is it the case that when I used ffmpeg to convert a (DVD) .vob file
to a .mp4 file, using straightforward options as shown below, the resulting
file was about 1.7 times the size of the original .vob file?  (Specifically,
1073739776 bytes in the original versus 1714326125 in the .mp4 output file.)

  ffmpeg -analyzeduration 14M -i vts_02_1.vob -b 3878k -sameq vts_02_1.mp4

(As I said in a prior posting, I _really_ don't understand this.  Isn't
MPEG4 supposed to be a _more_ space-efficient way of encoding than the
older MPEG2?)

4)  What exactly is the effect of the "-analyzeduration" option?  (Note that
I found this suggested on some web site as a way to make certain wanrings/
errors go away, but this command line option is _NOT_ even mentioned in the
ffmpeg man page that I have here.  And oh, BTW, that is yet another reason
why I'm not eager to spend hours reading the ffmpeg man page... Obviously,
it is not complete, and only describes a subset of the actual ffmpeg options.)

5)  What, if anything would be the drawback/downside to specifying an
-analyzeduration of, say, fifty billion?  If there is none, then why isn't
that the default, rather than, say, the curent default of 5M (which is
apparently too low)?

6)  Does the -sameq option effectively override the -b option?  If not, 
then how could it be the case that the bitrate for the file created by the
command line shown above would actually come out to be 6192k/s ?

7)  Under normal curcumstances, when using ffmpeg to transcode some
arbitrary pre-existing video+audio streams, if one wishes to preserve
as much of the quality of the originals as possible, how should one select
the value to use in the -b option?  Is this a black art?  Or is there some
simple rule to follow? (I see that using "ffmpeg -i original" gives some
information on the bitrate used by video and... separately... audio streams
in an original video+audio file, but how should one use that information
to manufacture a value to supply in the -b option for the output file?
Looking at the output of "ffmpeg -i" for the .mp4 file manufactured by the
command line shown above, I see one bitrate for video, one for audio, and
one which appears to be for both together.  That's swell, except the numbers
are 6123 kb/s, 63 kb/s, and 6192 kb/s.  Well, 6123+63 does _not_ equal 6192.
So what gives?  Apparently there is an additional overhead/fudgefactor
involved here, yes?  Is that a fixed amount, or is it a percentage of
the other bitrates?  Is the size of this overhead factor dependent upon
the specific output (container?) format used?

8) Why does ffmpeg sometimes produce the following error?  And what does
this mean anyway?

    Seems stream 1 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 29.97 (30000/1001)

Is this due to some sort of "authoring" error?  And if so, then why does it
arise even in the context of a file (.mp4) created by ffmpeg itself?  (See
command line above.)

(To my way of thinking, if ffmpeg is going to produce output files that contain
this specific kind of "error", then perhaps it ought not to be complaining
about it when it sees a file containing this error on input.)

9)  When transcoding a .vob file to a .mp4 file (via the command line shown
above), at the very end of the process, I get the following warnings/errors.
What do these mean and are they anything to worry about?

    [mpeg2video @ 0x805a0fb20] ac-tex damaged at 6 9
    [mpeg2video @ 0x805a0fb20] Warning MVs not available
    [mpeg2video @ 0x805a0fb20] concealing 945 DC, 945 AC, 945 MV errors

How may I "repair" the "damaged" ac-tex?

How may I supply the missing "MVs"?

Whose errors are being concealed?  Mine?  The original author's?  His

And why aren't any of the above warnings/errors mentioned at all in the
ffmpeg man page?  (As with the respoonses to my queries here, the implicit
assumption seems to be that either (a) all ffmpeg users are clairvoiant, or
else (b) all ffmpeg users are so throughly steeped in this stuff, and the
terminology, that no explanation of any of the above messages is all

10) Because Tim Nicholson suggested I "rewrap" my .vob file to .mpeg, I just
now tried this:

   ffmpeg -analyzeduration 14M -i vts_02_1.vob -sameq vts_02_1.mpeg

Interestingly, this generated the following warning almost immediately:

  [mpeg @ 0x806004020] VBV buffer size not set, muxing may fail

What does this mean?  How can I make it go away?  And why is it that the
ffmpeg man page seems to contain -no- mention whatsoever of "VBV" anything?

(I'm not sure that it is helpful for folks here to be telling new arrivals
to go away and RTFM when TFM seems to be missing so much vital information.)

11)  For laughs, I tried to see if I could get ffmpeg to ``transcode'' my
existing .vob file (mpeg2video/ac3) into an output file that would use
the same audio&viedo codecs, but which would have a .mpg suffix.  So I
did this:

   ffmpeg -analyzeduration 14M -i vts_02_1.vob -sameq -vcodec mpeg2video -acodec ac3 vts_02_1.mpg

The resulting file was approximately twich as big as the original.  Why?

12)  The file resulting from the above experiment also contained what appears
to be a number of serious problems, most specifically, a total lack of audio.

Just FYI - Here is what mplayer had to say about the resulting file:

     MPlayer SVN-r34821-snapshot-4.6.4 (C) 2000-2012 MPlayer Team
     Playing vts_02_1.mpg.
     libavformat version 54.2.100 (internal)
     MPEG-PS file format detected.
     Too many video packets in the buffer: (4096 in 8354836 bytes).
     Maybe you are playing a non-interleaved stream/file or the codec failed?
     For AVI files, try to force non-interleaved mode with the -ni option.
     MPEG: No audio stream found -> no sound.
     VIDEO:  MPEG2  720x480  (aspect 3)  29.970 fps    0.0 kbps ( 0.0 kbyte/s)
     Load subtitles in ./
     Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
     libavcodec version 54.12.100 (internal)
     Selected video codec: [ffmpeg2] vfm: ffmpeg (FFmpeg MPEG-2)
     Audio: no sound
     Starting playback...


That's all the questions I have for now.  As I hope may be obvious from the
above, I _am_ willing to learn, and to delve into details.  Now I just gotta
hope that somebody (anybody) here recoginizes that and doesn't just blow me
off by telling to go and use the point-and-drool GUI that was apparently
intended to keep all of the Windoze weenies from annoying the folks here
by asking too many annoying basic questions.


More information about the ffmpeg-user mailing list