Russ, <br><br>Thanks for your reply. I am very sure the fPresentationTime is correct. <br>I can use VLC to play the RTSP stream for 2 , 3 minutes correctly, then suddenly VLC becomes blank.<br>Because openRTSP has the buffer limitation (encoded frame must be able to fit into the buffer, I set it -b 60K),<br>
I suspect there could be similar limitation of VLC. <br><br>Best Regards,<br>Tao <br><br>>I have made a H264 media server and the input is encoded frames<br>
>directed coming from the hardware encoder, not from a file.<br>
>I can successfully receive the H264 stream from openRTSP command<br>
>tool and store the received stream into a file.<br>
>The VLC player also can play the stored the file smoothly.<br>
><br>
>But if I use the VLC directly play the RTSP stream from the server,<br>
>everything is fine at the beginning, but the VLC play will stop<br>
>showing video after 2 / 3 minutes.<br>
<br>
The fact that recording the incoming data into a file (using<br>
"openRTSP") works, but live playback of the stream does not work,<br>
suggests that the problem is with the stream's frames' presentation<br>
times.<br>
<br>
In particular, for each frame (NAL unit) coming from your encoder,<br>
you must set "fPresentationTime" correctly (corresponding to the time<br>
that you'd get by calling "gettimeofday()"). Also, you *must*<br>
implement RTCP (but if you're deriving from our<br>
"<div id=":xh" class="ii gt">OnDemandServerMediaSubsession" class, RTCP will be implemented<br>
automatically).</div>