[MPlayer-dev-eng] Transport Stream demuxer help

Nico nsabbi at libero.it
Fri Feb 14 01:22:54 CET 2003


Hi,

I'm trying to implement a very basic demuxer for Transport Stream based 
on ffmpeg's own.

I guess I have to make my ts_fill_buffer() function so as to fill 
demuxer->video and demuxer->audio with the corresponding Mpeg ES streams 
(including 0x000001C0 (and similar) headers) right?
Ideally, if I filled  these buffers with the content of a real ES video 
file would it be read? Or would it need to be parsed and modified?


Actually for simplicity I discard audio packets; when running I also 
save the video data to an external file, so that later I can verify what 
I'm feeding (mplayer always correctly reads this without complaining).

The problem is that the output to screen is totally garbled, so I guess 
some of the data that I feed must be discarded.

The questions are:
- do I need to feed packets corresponding to a required length or is any 
length accepted?

- can you imagine what I'm doing wrong and suggest The right way to do it?

A question regarding PES:
as far as I understood a PES can have a maximum payload length of 65536 
bytes, right?
Is it possible that for a given PTS there is more than 1 PES packet for 
the same stream (i.e. packets A, B e C each belonging to PTS 11000)?

Thanks,

		Nico





More information about the MPlayer-dev-eng mailing list