问题
I am working on a project where in I need to sync rtp streams. Here, I am making use of RTCP SR to synchronize.. Eg: For first stream I receive 6 rtp packets then I receive RTCP SR packet, as I know the time RTCP SR packet arrival, I subtract the RTP timestamp of this RTCP SR packet with the first rtp packets of stream and get the difference. Then I divide this by the difference which is monotonic between two rtp packets, say 160 for AMR and 320 for AMR-WB. Now, after the division I multiply the number by packetization time. This gives me the milliseconds I need to substract from RTCP SR time to get the time interval for first RTP packet of the stream.
Is this the correct way to calculate start times of rtp streams or am I missing something that I didn't count while deciding start time.????
Any detailed explanation will be very helpful for me.
来源:https://stackoverflow.com/questions/56873563/rtp-stream-synchronization