[Ffmpeg-devel] codecs problem

Måns Rullgård mru
Fri May 20 02:37:17 CEST 2005


Zoltan NAGY <nagyz at nefty.hu> writes:

> M?ns Rullg?rd wrote:
>
>>Zoltan NAGY <nagyz at nefty.hu> writes:
>>
>>>hello!
>>>
>>>How can I specify to libavcodec which codec to use?
>>>I'm having troubles with av_find_stream_info(), because it does not
>>>find any suitable codecs..
>>>mplayer sais it's mpeg4, with mp2 audio.
>>>the file is a fragment from an mpegts stream... and I'd like to play
>>>this whit ffplay :)
>>>
>>
>>Give us a sample.
>>
> allright:
> http://nefty.hu/~nagyz/mpegts_stream_sample.mpg

That file is somewhat invalid.  The PMT gives a stream type of 0x10
for the video.  This means an MPEG4 elementary stream carried in PES
packets.  These PES packets must have a stream_id value in the range
0xe0 to 0xef.  Your file uses a stream_id of 0xfa.  This should be
used only for SL-packetized streams, which your file is not.  FFmpeg
ignores streams with invalid stream_id in the PES header, whereas
mplayer and vlc apparently do not.

Disabling the stream_id check doesn't really help immediately either.
Instead, it gives these messages:

[NULL @ 0x83d7a34]hmm, seems the headers are not complete, trying to guess time_increment_bits
[NULL @ 0x83d7a34]my guess is 2 bits ;)
[mpeg4 @ 0x83d7a34]looks like this file was encoded with (divx4/(old)xvid/opendivx) -> forcing low_delay flag
[mpeg4 @ 0x83d7a34]picture size invalid (0x0)
[mpeg4 @ 0x83d7a34]get_buffer() failed (-1 0 0 (nil))
[NULL @ 0x83d7a34]Error, header damaged or not MPEG4 header (f_code=0)
[mpeg4 @ 0x83d7a34]hmm, seems the headers are not complete, trying to guess time_increment_bits
[mpeg4 @ 0x83d7a34]my guess is 2 bits ;)
[mpeg4 @ 0x83d7a34]Error, header damaged or not MPEG4 header (qscale=0)
[mpeg4 @ 0x83d7a34]header damaged

I'm not really sure what sort of confusion will result in such
messages.  I suppose it's related to the file not starting with a key
frame, or not even at a frame boundary.

-- 
M?ns Rullg?rd
mru at inprovide.com





More information about the ffmpeg-devel mailing list