[vlc-devel] RTSP client 'trick play' support. When will it ever work??

Glen Gray slaine at slaine.org
Thu Jul 9 10:15:48 CEST 2009

On 9 Jul 2009, at 06:14, Ross Finlayson wrote:

>> It is simple:
>> in VLC we enable trickplay support for rtsp (pause/seek/fast  
>> forward/backward)
>> if and only if the play time is known, that is if p_sys->ms- 
>> >playEndTime()
>> returns a non zero values. It's the only pseudo reliable way to  
>> detect VOD
>> that I know of).
>> Unfortunatly, using live555MediaServer and the live555 library (even
>> with the ts index), it is not the case. It is non zero at first (I  
>> think
>> after the initial setup), but is reset to zero latter.
> Ahh...  Here's what's actually happening (with VLC 1.0.0 and the  
> "LIVE555 Media Server") in this case:
> 1/ The RTSP server returns a SDP description (in response to VLC's  
> RTSP "DESCRIBE" command), which contains a "a=range:" attribute  
> *with* an end time - e.g.
> v=0
> o=- 1247115776948082 1 IN IP4
> s=MPEG Transport Stream, streamed by the LIVE555 Media Server
> i=osbournes.ts
> t=0 0
> a=tool:LIVE555 Streaming Media v2009.06.02
> a=type:broadcast
> a=control:*
> a=range:npt=0-45.277
> a=x-qt-text-nam:MPEG Transport Stream, streamed by the LIVE555 Media  
> Server
> a=x-qt-text-inf:osbournes.ts
> m=video 0 RTP/AVP 33
> c=IN IP4
> a=control:track1
> 2/ VLC, in response, is sending a "PLAY" command *without* an end  
> time:
> PLAY rtsp:// RTSP/1.0
> CSeq: 12
> Session: 1
> Range: npt=0.000-
> User-Agent: VLC media player (LIVE555 Streaming Media v2009.06.02)
> 3/ The RTSP server then sends back a "PLAY" response without an end  
> time:
> RTSP/1.0 200 OK
> CSeq: 12
> Date: Thu, Jul 09 2009 05:02:56 GMT
> Range: npt=0.000-
> Session: 1
> RTP-Info: url=rtsp:// 
> track1;seq=4083;rtptime=4253405358
> So, the real problem is that VLC - in step 2 - is sending a "PLAY"  
> command without an end time, despite the fact that the SDP  
> description (returned in response to "DESCRIBE") had a range end  
> time.  "ms->playEndTime()" *should* be non-zero (because "*ms" was  
> created using the SDP description).  Could you please check this??

I was working on this area the other day actually, to enable support  
for Anevia VOD servers on our dated version of VLC. What's happening  
is that the live555 RTSP libraries are re-parsing the end time from  
the Range: header from the Play response. This is needed for the case  
of an Anevia VOD server as for some reason, their SDP data is missing  
the range attribute "a=range:npt=.....". They only send a Range:  
header in the Play response.

So perhaps the answer is to patch live555 so that it only parses the  
Range: header if it's subession's playEndTime is 0 ? If so, patch  
-------------- next part --------------
A non-text attachment was scrubbed...
Name: playEndTime.patch
Type: application/octet-stream
Size: 777 bytes
Desc: not available
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20090709/4ceb018b/attachment.obj>
-------------- next part --------------

Glen Gray
slaine at slaine.org

More information about the vlc-devel mailing list