I agree, it is not really a bug. In fact, your library is used to stream live 
DVB-T MPEG2 Transport stream in real-time over the network. So, I think it will 
be hard to calculate indexes before streaming the recording TS files. 
Concerning the proposed changes, I try to find a better way to correct the 
packet duration estimation issues. Normally, the PCR should be annouced with a 
quite regular periodicity. If the packet interval between two PCR annoucement 
is too low compared to the mean periodiciy of the PCR, then the PCR must be 
ignored   in order to not introduce errors in the packet duration estimation. 
So, I introduce a 
new constant called PCR_PERIOD_VARIATION_RATIO that adjusts the minimum and 
tolerated packet interval from the mean PCR announcement period.

For instance, in my sequence, the mean period of PCR announcement converges to 
around 47. The ratio is set to 50%, so the minimum packet interval between two 
PCR is 23.  I think this method is less arbitrary than the "20" value.

I hope this can help people that wants to broadcast VBR multiplexed dataflows.
Regards,
Romain


Ross Finlayson <[EMAIL PROTECTED]> a écrit : Thanks.  However, the existing 
code is not really a 'bug', although 
your suggested change is (arguably) an improvement.

As you noticed, the current per-transport-packet duration estimation 
code has trouble converging on a stable estimate for streams - such 
as yours - that are wildly VBR.  Your suggested change will probably 
help things (although I can also imagine streams for which it might 
make things worse by taking longer to converge to the 'correct' 
average duration).  I am also a bit concerned about the arbitrariness 
of the constant "20" that you use.

Nonetheless, I'll add your change to the next release of the library.

(Looking longer-term, a better solution for streaming prerecorded 
files (but not live streams) will be to extend the existing "index 
file" mechanism to include accurate durations - which could be 
computed in advance when generating the index file.)


 Ross Finlayson
 Live Networks, Inc. (LIVE555.COM)

   
       
---------------------------------
 Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 

Attachment: MPEG2TransportStreamFramer.cpp
Description: 2250531848-MPEG2TransportStreamFramer.cpp

Attachment: MPEG2TransportStreamFramer.hh
Description: 2480703395-MPEG2TransportStreamFramer.hh

_______________________________________________
live-devel mailing list
[email protected]
http://lists.live555.com/mailman/listinfo/live-devel

Reply via email to