Discussion:
MPEG-2 Demultiplexer and VC-1 transport stream
(too old to reply)
Rbr
2013-05-14 04:08:10 UTC
Permalink
Dear All,

Has anybody tried to use the standard MPEG-2 Demultiplexer filter in push mode to demux a transport stream that contains VC-1 encoded video?

I managed to get samples from the MPEG-2 Demultiplexer filter and connected its output to a WMV decoder but decoder's output was pure garbage. The same Demux setup (with different output media type and decoder, of course) works perfectly for MPEG-2 and AVC but not for VC-1.

Then I grabbed the output samples produced by the Demultiplexer and the reason of the garbage became obvious:

Sample00: SampleTime=0,08357, Time(start=835730, end=835731), MediaTime(start=835730, end=835731), data length=8192, keyframe=True, Discontinuity, Data=0000010D110BFFFF...
Sample01: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=A84F0F422C8B8C47...
Sample02: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=D1B0835F57DCE4E4...
Sample03: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=00F7FDE9A88A3A6F...
Sample04: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=6DAD59C7FD553ED7...
Sample05: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=375237D6A73AF974...
Sample06: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=A8294C79F8801096...
Sample07: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=1756, keyframe=False, Data=27D93B80A9F8FED9...
Sample08: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=0000010D8115097F...
Sample09: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=736269BE3B797065...
Sample10: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=1AFB1ED000783496...
Sample11: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=6393, keyframe=False, Data=EDCEE736500A15CB...
Sample12: SampleTime=0,04187, Time(start=418730, end=418731), MediaTime(start=418730, end=418731), data length=8192, keyframe=True, Data=0000010D8A15097F...
Sample13: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=2922834BA748D1FD...
Sample14: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=8192, keyframe=False, Data=EF4092A97F46B1E1...
Sample15: SampleTime=0, Time(start=0, end=0), MediaTime(start=0, end=0), data length=5499, keyframe=False, Data=74D0F5DB6E9A4DF3...
Sample16: SampleTime=0,2087, Time(start=2087063, end=2087064), MediaTime(start=2087063, end=2087064), data length=8192, keyframe=True, Data=0000010D010BFFFF...
...

Sample00, Sample08, Sample12, Sample16 look to me like the beginnings of normal VC-1 coded pictures with start code 0x0000010d and everything in between looks as if the whole coded frame was sliced with 8K chunks. This is very strange because all PES packets in my test file are bigger than 8K (I have a strong feeling that each PES packet has exactly one coded frame inside). Why the Demux decided to perform such slicing is beyond my understanding.

So here is the question: is it going to work if I write a filter that reassembles these chunks back into big coded frames?

Another question: the samples are reordered. For example, presentation time of Sample12 is less than presentation time of Sample00. Do I need to perform the reverse reordering so that all times are in increasing order or this is a decoder's task? If I need to reorder, how many frames may be out of order and therefore should be buffered?

The last question: isn't there a transport stream demultiplexer which properly handles VC-1 streams?

Any suggestions are greatly appreciated. Thanks in advance!
Rbr
2013-05-30 03:25:49 UTC
Permalink
If anybody is interested: as it turned out, a simple reassembling filter is entirely enough and everything works as expected. Thanks.
Loading...