[FFmpeg-devel] [PATCH] better detection of available streams for flv

Reimar Döffinger Reimar.Doeffinger
Sun Apr 13 21:04:52 CEST 2008


On Sun, Apr 13, 2008 at 07:57:44PM +0200, Michael Niedermayer wrote:
> On Sun, Apr 13, 2008 at 06:06:00PM +0200, Reimar D?ffinger wrote:
> > Hello,
> > with e.g. http://eurovision.tv/upload/video/2008/WELCOMETOBELGRADE.flv
> > the flv demuxer thinks that there is no video stream.
> > Attached code changes the code to create a audio/video stream if the
> > metadata-parsing code finds a key starting with "audio" or "video" and
> > there is not yet such a stream.
> > Obviously, there are many other ways to do this, and if such a change is
> > done the hack in flv_read_header should probably be removed.
> > Instead of checking for any key starting with audio/video this could of
> > course be restricted to those we actually handle, namely audiocodecid,
> > videocodecid, audiosamplesize, audiosamplerate and stereo.
> 
> We support flv with invalid headers since r10887. Which does not depend on
> metadata. Why does this not suffice?

I think you mean the hack in flv_read_header?
That is under "if (!flags)", but for this file flags is
FLV_HEADER_FLAG_HASAUDIO (== 4).
Probably it is a "broken" file as far as such a thing exists for
proprietary formats, but I assume it plays with video in flash player (I
do not know, I don't have flash installed).

> Also width/height for example have no video prefix.

True, they are not used though. Probably it makes more sense to change
the check to only check for the keys that need a stream to be parsed.

Greetings,
Reimar D?ffinger




More information about the ffmpeg-devel mailing list