Thanks Måns.

The better result that I am seeking from libmpeg2 is better error detection and 
concealment.

I don't know if it is better in this way or not, but I have tweaked various 
CodecContext variables in libavcodec and I am still getting too many artifacts.

Regarding non-compliant TS streams from LinuxDVB:

I am currently using a DMX_SET_PES_FILTER with its pes_type member set to 
DMX_PES_OTHER.

Since I a wanting video, perhaps I should change this to DMX_PES_VIDEO and 
perhaps I will get a standard TS/PES stream.

Or maybe that's how DMX_SET_PES_FILTER works.

All I know is that, after stripping-off the 4-byte TS header (and any 
adaption-field header, if present,) the remaining bytes are the raw compressed 
MPEG2 frames bytes.

When I get a complete frame and decode/render it, I see the picture I expect.

The libavcodec MPEG2 decoder is reporting normal sequences of I/P/B frames all 
along the way.

Strange...

Thanks for your insights.

Bob


Bob Ingraham <b...@brin.com> writes:

> Hi All,
>
> I've written an app which uses the Linux DVB API to pull down an MPEG2-TS.
>
> Currently it:
>
> 1. Decodes the TS header
> 2. Extracts the MPEG2 encoded frame
> 3. Decompresses it with libavcodec (an ffmpeg library)
> 4. Renders it with SDL
>
> But I wanted to try libmpeg2 to see if it's decoder will yield
> better results than libavcodecs.

Better in what way?

> Questions:
>
> 1. Does libmpeg2 perform steps 1 through 3 above?

No, it only does step 3.

> 2. Can I just pass an compressed MPEG2 frame to libmpeg2 (without
> any PS, TS or PES headers?)

Yes, in fact you have to.

> 3. Apparently, the Linux DVB API filter removes all PES headers and
> hands me a TS stream with just the raw mpeg2 frames after the
> TS/adaption field header.

No, this is incorrect.

> I don't think this is normal, because the MPEG2 spec says that mpeg2
> frames should be encapsulated within PES packets within the TS
> frames.
>
> Does this seem odd that there are no PES header?

Check again or change some setting.  I know I have got proper TS
streams from the Linux DVB interface.

-- 
Måns Rullgård
m...@mansr.com

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
Libmpeg2-devel mailing list
Libmpeg2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libmpeg2-devel

Reply via email to