[Ffmpeg-devel] h264 decoder/ts-streams

Julian Scheel julian
Fri Nov 3 14:17:34 CET 2006


Hi,

I am just looking into xines demux_ts to make it possible to play ts-streams 
holding h264 with xine/ffmpeg.
I can across the problem, that xine won't play video at all if using ffmpeg as 
decoder for ts-streams (no matter if mpeg2 or h264).
Some digging around turned out that some kind of paketizing is needed. Now I 
did the following:
I added a parse to xine_ts, that searches for the startblock (0 0 1, for h264, 
according to VLC sources). When new data comes in I parse it to find a 
startblock. Until the first startblock is found all data is dumped.
When I found a startblock I start slicing the stream - a packet always starts 
with the first byte after the startblock and ends with the last byte before 
the next startblock.
Then I set the xine-decoder-flags to mark each block as a complete frame.

Now ffmpeg shows these errors:
[h264 @ 0xb72d83a8]Unknown NAL code: 21
[h264 @ 0xb72d83a8]Unknown NAL code: 21
[h264 @ 0xb72d83a8]Unknown NAL code: 24
[h264 @ 0xb72d83a8]Unknown NAL code: 0
[h264 @ 0xb72d83a8]Unknown NAL code: 21
[h264 @ 0xb72d83a8]non existing PPS referenced
[h264 @ 0xb72d83a8]decode_slice_header error
[h264 @ 0xb72d83a8]Unknown NAL code: 29
[h264 @ 0xb72d83a8]Unknown NAL code: 29
[h264 @ 0xb72d83a8]Unknown NAL code: 29


and so on.

Might someone outline how the data has to be prepared before passing to 
ffmpeg?
And can it be that the size for each frame is only a few thousand bytes for a 
1920x1080 stream?

Thanks,
Julian




More information about the ffmpeg-devel mailing list