Mailing List archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[linux-dvb] Re: Problems using mplex




> It's supposed to be like this
> 
>    bad mux        demux        good mux
> AVVAAVVAAVVAA ->  VVVVVV -> AVAVAVAVAVAVA
>                  AAAAAAA
> 

Okay, I alway do hard on explaining, so let's try:

I think we have got somethinh like this
(the thumber stands somehow for the PTS Info)

A0 A1 V1 V2 A2 A3 V3 V4 A4 A5 V5 ...

by demuxing we get

A0 A1 A2 A3 A4 ...
V1 V2 V3 V4 V5 ...

Which tells us that we have a VPTS-APTS diff of 1 (or whatever)

This is corrected by cutting off one stream (here audio)
So we have 2 separate streams

A1 A2 A3 A4 A5 ...
V1 V2 V3 V4 V5 ...

By Muxing we get
A1 V1 A2 V2 A3 V3 A4 V4 ...

which is in theory is fine :-)

But practically it doesn't look like this but instead :

A1 V1 A2 V2 ...... A100 V100 A102 V101 A103 V102 A104 V103 ...

So, one step back this does mean:

A1 A2 .... A100 A102 A103 A104 ...
V1 V2 .... V100 V101 V102 V103 ...

So an analysis gives us the following result:

At the start we had VPTS-APTS = 1 / This was corrected by cutting off audio by mplex - so we have VPTS-APTS = 0 !
But take a look at the VPTS-APTS diff at packet 101 - there is again VPTS-APTS diff. ! Which should be corrected ! Otherwise it's accumulating with others coming later !

I still cannot understand why this happens, and how the DVBs Card or any standalone Receiver corrects this, but I guess they just align the packets according to their PTS Info.

So in the upper example the playback would play
A100 and V100 together
then just V101 (no audio, because we don't have A101!)
A102 and V102
A103 and V103

so it's in sync !!! (for the DVBs Card or a standalone receiver)
But the stream length of Audio and Video differ ! Thats why we get problems when simply demuxing streams ! 
On the other hand a small gap in audio (A101) isn't noticeble ! But if we have enough of these the streams differ a few 100 ms and we will hear this !

As said before not every recording has this stuff...

I hope this helps to clrarify the problem...

Regards, Martin.

BTW: Marcus, is the PTS info for the output file of mplex completely rebuild, or is it the same as in the original streams ?  
 


-- 
Info:
To unsubscribe send a mail to listar@linuxtv.org with "unsubscribe linux-dvb" as subject.



Home | Main Index | Thread Index