Log in

View Full Version : Looking for MPEG-2 stream parser


Jeff D
15th July 2003, 07:24
I'm looking to find out if there is some already available mpeg-2 stream parser/analyser.

The source mpegs are from a ReplayTV (not VOB/DVD just a straight MPEG-2 AV stream, 2 muxed streams that I know of.) and I'm too damn busy to write my own parser at this point, I'd like an easy way out.

What I need to be able to do is look at the headers decoded to see what is embedded in these mpeg files I'm dealing with.

I don't need any decoding or such, just stream(s) header information.

If A & V streams need to be handled independantly I can work with demuxed streams, that's not a big deal. Audio is MPEG-1 Layer 2 audio, so I can pretty much decode those headers in my sleep. The video is what I don't understand yet.

Does anything exist? Or do I have to rip a parser out of another app?

Thanks!

Ookami
15th July 2003, 09:40
http://forum.doom9.org/showthread.php?s=&threadid=42496

Jeff D
15th July 2003, 18:04
Thanks Ookami, I didn't see that when I searched, looks like it will do the job!

tateu
23rd July 2003, 21:48
Well, it's nice to know that I'm not the only one to write an mpeg parser that incorrectly parses some sections of mpeg files, especially program streams. BBTools (from BBMpeg), MPEGanalizzatore (from Offeryn) and now the routines that come with the General Parser all seem to have trouble with headers and sections that cross over Pack Header (0x000001BA) boundaries. Also, sometimes the four bytes of a start code appear in an mpeg file at random locations and are not really start codes but these programs (and mine also) sometimes parse them as if they are.

90% of the data reported by these programs appears to be correct, but it just seems strange that no one can seem to write a program that gets it all right. I've never publicly released my attempt at an mpeg analyzer for this reason.

Jeff D
23rd July 2003, 23:46
tateu, can you provide an example of what you are talking about?


Here are my questions:
seem to have trouble with headers and sections that cross over Pack Header (0x000001BA) boundaries
What do you mean by this? From what I read it sounds like you've got a Pack Header INSIDE another chunk? That sounds bad to me...

Where are these files coming from?

Is it the same thing as discussed here?
http://lists.merlins.org/archives/extractstream/2002-April/001349.html