<div dir="ltr"><span style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">Hi all,</font></span><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">I have some doubts on <span style="background-image:initial;background-repeat:initial">liveMedia</span> regarding <span style="background-image:initial;background-repeat:initial">RTSP</span> audio & video synchronization.</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">We have developed a streaming application using live555 library to stream via <span style="background-image:initial;background-repeat:initial">RTSP</span>. It works like charm when streaming only one stream per session (audio or video). However, problems appear when I try to stream both audio and video using the same <span style="background-image:initial;background-repeat:initial">RTSP</span> session.</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">I tried playing it using <span style="background-image:initial;background-repeat:initial">VLC</span> and it only plays the video. In debug mode, it shows this message continuously: </font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"> core audio output warning: buffer too late (-541608 us): dropped<br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">In order to understand this behaviour I used the testRTSPClient as RTSP client, modified to print also the Normal Play Time. What I could observe is that Presentation Times of both audio and video streams are respectively coherent between them. However, after some seconds running, there is an abrupt change in Presentation Time of one of the streams (usually audio), which I suppose that corresponds to RTCP synchronization. After that, there is a big gap between video and audio NPT which remains there during all the transmission, taking sometimes negative values.</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">This is the testRTSPClient output (the timestamp gap can be observed):</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.033291<span style="white-space:pre-wrap"> </span>NPT: 2.911316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> P</span>resentation time: 1410784970.033291<span style="white-space:pre-wrap"> </span>NPT: 2.911316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.053291<span style="white-space:pre-wrap"> </span>NPT: 2.931316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.053291<span style="white-space:pre-wrap"> </span>NPT: 2.931316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.073291<span style="white-space:pre-wrap"> </span>NPT: 2.951316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.073291<span style="white-space:pre-wrap"> </span>NPT: 2.951316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 1780 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.163530<span style="white-space:pre-wrap"> </span>NPT: 3.041563</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 3093 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.163530<span style="white-space:pre-wrap"> </span>NPT: 3.041563</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 9393 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.163530<span style="white-space:pre-wrap"> </span>NPT: 3.041563</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 5410 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.163530<span style="white-space:pre-wrap"> </span>NPT: 3.041563</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.093291<span style="white-space:pre-wrap"> </span>NPT: 2.971316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.093291<span style="white-space:pre-wrap"> </span>NPT: 2.971316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.113291<span style="white-space:pre-wrap"> </span>NPT: 2.991316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.113291<span style="white-space:pre-wrap"> </span>NPT: 2.991316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 1731 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.533251<span style="white-space:pre-wrap"> </span>NPT: 10.411284</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 3474 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.533251<span style="white-space:pre-wrap"> </span>NPT: 10.411284</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 11707 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.533251<span style="white-space:pre-wrap"> </span>NPT: 10.411284</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 8298 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.533251<span style="white-space:pre-wrap"> </span>NPT: 10.411284</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.133291<span style="white-space:pre-wrap"> </span>NPT: 3.011316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.133291<span style="white-space:pre-wrap"> </span>NPT: 3.011316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.153291<span style="white-space:pre-wrap"> </span>NPT: 3.031316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.153291<span style="white-space:pre-wrap"> </span>NPT: 3.031316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 2468 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.574917<span style="white-space:pre-wrap"> </span>NPT: 10.452950</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 4043 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.574917<span style="white-space:pre-wrap"> </span>NPT: 10.452950</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 12999 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.574917<span style="white-space:pre-wrap"> </span>NPT: 10.452950</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 9043 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.574917<span style="white-space:pre-wrap"> </span>NPT: 10.452950</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.173291<span style="white-space:pre-wrap"> </span>NPT: 3.051316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.173291<span style="white-space:pre-wrap"> </span>NPT: 3.051316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 1436 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.193291<span style="white-space:pre-wrap"> </span>NPT: 3.071316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; audio/PCMU:<span style="white-space:pre-wrap"> </span>Received 484 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784970.193291<span style="white-space:pre-wrap"> </span>NPT: 3.071316</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 3153 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.616583<span style="white-space:pre-wrap"> </span>NPT: 10.494616</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 3766 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.616583<span style="white-space:pre-wrap"> </span>NPT: 10.494616</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 6609 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.616583<span style="white-space:pre-wrap"> </span>NPT: 10.494616</font></div><div><font color="#000000">Stream "rtsp://<a href="http://192.168.10.77:8554/S22J/" target="_blank">192.168.10.77:8554/S22J/</a>"; video/H264:<span style="white-space:pre-wrap"> </span>Received 4695 bytes.<span style="white-space:pre-wrap"> </span>Presentation time: 1410784977.616583<span style="white-space:pre-wrap"> </span>NPT: 10.494616</font></div></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">I checked the RTP timestamps (in transmission) and everything seems OK (no gaps and coherent between them).</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">This behaviour is not the one I would expect and I think it is exactly what's happening when I try to play the session using VLC. So my question is what do you think is happening here and how do you think I can solve this issue? I have the feeling that I do something wrong in transmission (maybe defining the Presentation Time) but I can't see what.</font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000"><br></font></div><div style="font-family:arial,sans-serif;font-size:13px"><font color="#000000">Thanks in advance for any hint,</font></div><div><br></div><div>Kind regards,</div><div><div dir="ltr">--------------------------------------------------------<br><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"></blockquote> Gerard Castillo Lasheras<br> Enginyer de Projectes<br> Fundació i2CAT - Unitat Audiovisual<br> SkypeID: gerardcl85<br> Telf.: <a value="+34935532548" style="color:rgb(17,85,204)">+34.93.553.25.48</a><br><div>--------------------------------------------------------</div></div></div>
</div>