[Live-devel] Live555 presentation times jump when joining multicast streams

DJM-Avalesta david.myers at avalesta.com
Mon Dec 20 09:10:02 PST 2021



Hi Ross,

> Connecting a RTSP client to receive a multicast RTP stream should not 
> change the RTP stream at all - so (unless you have a firewall
> or other middlebox somewhere that is altering the RTP stream) there 
> must be a mistake in the way that your RTSP server application
> is delivering this stream.

I believe, there still needs to be a RTSP handshake for VLC to join the 
multicast stream.
This is code which has run for many years. The change I made recently 
was to calculate the presentation time for each frame based on
the frame-rate, eg 40ms for 25fps, rather than calling gettimeofday() 
for every frame. Without this change, VLC was displaying a jerky video
stream. The change in presentationtime calculation fixed this jitter but 
has led to this new issue, where multiple VLC sessions can cause
a huge jump in presentation time.

> I can't debug this without seeing your server code (in particular, how 
> you're using "RTSPServer").
> However, to start, you should run the existing "testH264VideoStreamer" 
> demo application (in the "testProgs" directory),
> and make sure that this works correctly for you on your network (with 
> multiple RTSP clients).
> Then, compare the code for that application with your code, to see what 
> is going wrong.  (Note, in particular, that -
> to deliver a multicast stream - your server needs to use a 
> "PassiveServerMediaSubsession" rather than an 
> "OnDemandServerMediaSubsession"
> (which is meant only for delivering a stream via unicast).)

Yes I use PassiveServerMediaSubsession for the multicast stream. I'm 
sure it's a corruption of presentation time which is causing the issue,
but this does not seem to be in my code. I have added debug to every 
place where fPresentationTime is changed.

I have tried to attach a screenshot of the wirshark trace so you can see 
how the time jumps for one consecutive frame to the next when a
VLC session is started and connected.

- David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20211220/f60032ce/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: AMG_VLC_01.jpg
Type: image/jpeg
Size: 67725 bytes
Desc: not available
URL: <http://lists.live555.com/pipermail/live-devel/attachments/20211220/f60032ce/attachment-0001.jpg>


More information about the live-devel mailing list