[Live-devel] Stream two subsessions in one ServerMediaSession

Ross Finlayson finlayson at live555.com
Fri Dec 4 14:25:12 PST 2015


> The fTimestampBase
> is set as the random value, so there is no possibility to have similar
> timestamps in both subessions.

That is totally correct.  Different media streams have different RTP timestamps (perhaps with different timestamp frequencies, as is the case here), and the mapping from RTP timestamp to presentation time is done via RTCP packets, and is done automatically by our code.

Users of the “LIVE555 Streaming Media” software should ***never*** have to concern themselves with RTP timestamps.  Our software automatically converts presentation times to RTP timestamps (at the sender) and RTP timestamps to presentation times (at the receiver), using the data from RTCP “SR” packets - again automatically.

See http://live555.com/liveMedia/faq.html#separate-rtp-streams

So, the *only* think you need to concern yourself with is the ‘presentation time’ of each frame of media (audio or video).  If these are correct, and aligned with ‘wall clock’ time (i.e., the time that you’d get by calling “gettimeofday()”), then the 'presentation time’s - as seen by the receiver - will also be correct, and your media *will* be synchronized.  (Note, however, that the first few presentation times - as seen by the receiver - might not be synchronized.  For an explanation of this, see
	http://live555.com/liveMedia/faq.html#rtcp-synchronization-issue
)

If you are not getting proper audio/video synchronization at your receiver (e.g., VLC), then you ***must not*** be setting the presentation times correctly.


> As far as I understand, there is also a need to have the same
> fTimestampFrequency values

Absolutely not.  The RTP specification allows different substreams (even with synchronized) to have different RTP timestamp frequencies.


> but the audio has 44100 sampling frequency and video has this value hardcoded to 90000.

This is correct.  The RTP payload format standards (for AAC audio and H.264 video, respectively) mandate this.  But again, you never need to concern yourself with RTP timestamps or RTP timestamp frequencies.  Our software takes care of this automatically.


Ross Finlayson
Live Networks, Inc.
http://www.live555.com/




More information about the live-devel mailing list