[FFmpeg-devel] [PATCH] Dump info for all streams (not just those known to be in a program)

Måns Rullgård mans
Sat Nov 10 19:30:30 CET 2007

Wolfram Gloger <wmglo at dent.med.uni-muenchen.de> writes:

> Hi,
>> That's code snippet isn't the problem.  The problem is the default
>> case in the switch statement in the new_pes_av_stream() function.
> Well those are sane defaults: if we don't know what it is, try mpeg.

"Sane defaults" are not appropriate here.  If it is not MPEG, and
nowadays this is quite likely, your defaults will be completely

> Even when just choosing "stream copy" stream parameters (including
> codec id) are later adjusted by the mpeg parser.

You apparently don't know enough about how FFmpeg works, because this
statement is plain wrong.

> And if the stream really is _not_ mpeg, the chance of this producing
> _wrong_ data, rather than producing an error, are negligble IMHO.

If it is not MPEG, you will get garbage.  How is that better than not
getting anything at all?

>> >> It's not user friendly to create unplayable files.
>> >
>> > I can't see how that could happen.
>> What????  It *HAS* happened.  There are lots of MPEG-TS files missing
>> PSI created by broken DVB tools.
> Oh, but these files are playable just fine.

Only by pure luck.  If players hadn't implemented this stupid
guessing, those DVB apps would have been fixed years ago.

> Please be clear what you're criticising -- I thought you meant
> the danger of creating something unplayable in ffmpeg through
> wrong guesswork, which I agree would be a bad thing to do.
> Can't we settle on "be liberal in what you accept, and strict in
> what you generate"?

To a certain degree, yes.  I can't imagine anyone suggesting that we
attempt to play AVI files without a header, guessing that they use
MPEG4 video and MP3 audio because that's the most common.  The MPEG-TS
situation is no different.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list