[Live-devel] H264 RTSP with VLC or openRTSP

Ross Finlayson finlayson at live555.com
Wed Oct 7 19:12:59 PDT 2009


>I have made a H264 media server and the input is encoded frames 
>directed coming from the hardware encoder, not from a file.
>I can successfully receive the H264 stream from openRTSP command 
>tool and store the received stream into a file.
>The VLC player also can play the stored the file smoothly.
>
>But if I use the VLC directly play the RTSP stream from the server, 
>everything is fine at the beginning, but the VLC play will stop 
>showing video after 2 / 3 minutes.

The fact that recording the incoming data into a file (using 
"openRTSP") works, but live playback of the stream does not work, 
suggests that the problem is with the stream's frames' presentation 
times.

In particular, for each frame (NAL unit) coming from your encoder, 
you must set "fPresentationTime" correctly (corresponding to the time 
that you'd get by calling "gettimeofday()").  Also, you *must* 
implement RTCP (but if you're deriving from our 
"OnDemandServerMediaSubsession" class, RTCP will be implemented 
automatically).
-- 

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


More information about the live-devel mailing list