[Ffmpeg-devel] h264 decoder/ts-streams

Nico Sabbi nsabbi
Fri Nov 3 17:57:45 CET 2006


Julian Scheel wrote:

>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).
>
no, demuxers doesn't have to do this.
Use the stream_type in the pmt to determine the type of the video stream
and let the decoder to the rest (it will search the right syncword)

> 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.
>  
>
as above, this is decoders' job; besides, in h264 0x000003 sequences
have to unescaped

>and so on.
>
>  
>
can you post a sample?




More information about the ffmpeg-devel mailing list