Trick play based pause interacts badly with Enseo STBs
If you use live555MediaServer to stream MPEG-2 in a TS to an Enseo
HD2000 STB, pause and resume works fine as long as you haven't used the
indexer to build .tsx files, or you disable trick play handling in
MPEG2TransportFileServerMediaSubsession::pauseStream():
> void MPEG2TransportFileServerMediaSubsession
> ::pauseStream(unsigned clientSessionId, void* streamToken) {
> if (fIndexFile != NULL) { // we support 'trick play'
> ClientTrickPlayState* client = lookupClient(clientSessionId);
> if (client != NULL) {
> client->updateStateOnPlayChange(False);
> }
> }
>
> // Call the original, default version of this routine:
> OnDemandServerMediaSubsession::pauseStream(clientSessionId, streamToken);
> }
That is to say, the STB will resume a paused RTSP stream for an indexed
MPEG-2 TS correctly if you remove everything but the last line, causing
the server to behave as if the TS file doesn't have an index purely for
the purposes of pause handling.
With the .tsx file and problem code present, resuming causes the
displayed video to look like digital satellite TV when there's snow on
the dish. Jerky playback, occasional pauses, macroblocks decoding in
the wrong place/time...ugly stuff. Additionally, it looks like the STB
is giving up and trying to restart the stream at some point.
While debugging this, we noticed that VLC doesn't send RTSP PAUSE when
you press its Pause button. We assume it's working like a DVR in this
instance, just buffering the streamed data to use when you unpause. I
mention this that's the only other RTSP clients we have on hand. We
lack another client that does send RTSP PAUSE, so as far as we can see,
there's nothing wrong with disabling trick play support for pause.
We assume there *is* some bad consequence, since the code probably
wasn't written for no reason. Which client does this hack break?
We have a solution to our problem, hacky though it is, but we'd be
happier if the server just did the right thing with Enseo STBs out of
the box, so we're willing to help you look into this, Ross. We can send
you one of these STBs, plus tools and information that will help you
debug the issue.
I've attached a transcript of the RTSP conversation between an Enseo
HD2000 and live555MediaServer. You see it start the stream, then pause
and attempt to resume it.
One of the things you'll notice in the transcript is that the STB sends
a GET_PARAMETER request for "position" on pause. I couldn't find any
documentation online saying what the client is supposed to get in
response, only the RTSP RFC saying this is an open extension mechanism.
We don't know which RTSP server implements this parameter (Kasenna or
SeaChange, probably), but we assume the purpose is to let the STB tell
the server where to resume from.
We considered trying to modify the server to send a real reply for this
parameter by looking at the trick play index, but then stumbled across
our current hacky fix.
OPTIONS rtsp://mongo:8554/4609.ts RTSP/1.0
CSeq: 1
User-Agent: Enseo HD-2000
RTSP/1.0 200 OK
CSeq: 1
Date: Wed, Aug 03 2011 23:05:17 GMT
Public: OPTIONS, DESCRIBE, SETUP, TEARDOWN, PLAY, PAUSE, GET_PARAMETER, SET_PARAMETER
DESCRIBE rtsp://mongo:8554/4609.ts RTSP/1.0
CSeq: 2
Accept: application/sdp
User-Agent: Enseo HD-2000
RTSP/1.0 200 OK
CSeq: 2
Date: Wed, Aug 03 2011 23:05:17 GMT
Content-Base: rtsp://172.20.0.242:8554/4609.ts/
Content-Type: application/sdp
Content-Length: 400
v=0
o=- 1312412717518667 1 IN IP4 172.20.0.242
s=MPEG Transport Stream, streamed by the LIVE555 Media Server
i=4609.ts
t=0 0
a=tool:LIVE555 Streaming Media v2011.07.21
a=type:broadcast
a=control:*
a=range:npt=0-368.008
a=x-qt-text-nam:MPEG Transport Stream, streamed by the LIVE555 Media Server
a=x-qt-text-inf:4609.ts
m=video 0 RTP/AVP 33
c=IN IP4 0.0.0.0
b=AS:19395
a=control:track1
SETUP rtsp://mongo:8554/4609.ts/track1 RTSP/1.0
CSeq: 3
Transport: RTP/AVP;unicast;client_port=1234-1235
User-Agent: Enseo HD-2000
RTSP/1.0 200 OK
CSeq: 3
Date: Wed, Aug 03 2011 23:05:17 GMT
Transport: RTP/AVP;unicast;destination=172.20.200.144;source=172.20.0.242;client_port=1234-1235;server_port=6970-6971
Session: 7F56B9A0
PLAY rtsp://mongo:8554/4609.ts RTSP/1.0
CSeq: 4
Session: 7F56B9A0
Scale: 1.000000
Range: npt=0.000000-
User-Agent: Enseo HD-2000
RTSP/1.0 200 OK
CSeq: 4
Date: Wed, Aug 03 2011 23:05:17 GMT
Scale: 1.000000
Range: npt=0.000-
Session: 7F56B9A0
RTP-Info: url=rtsp://172.20.0.242:8554/4609.ts/track1;seq=55654;rtptime=321112806
GET_PARAMETER rtsp://mongo:8554/4609.ts RTSP/1.0
CSeq: 5
Session: 7F56B9A0
User-Agent: Enseo HD-2000
Content-Type: text/parameter
Content-Length: 12
position
RTSP/1.0 200 OK
CSeq: 5
Date: Wed, Aug 03 2011 23:05:17 GMT
Session: 7F56B9A0
PAUSE rtsp://mongo:8554/4609.ts RTSP/1.0
CSeq: 6
Session: 7F56B9A0
User-Agent: Enseo HD-2000
RTSP/1.0 200 OK
CSeq: 6
Date: Wed, Aug 03 2011 23:05:24 GMT
Session: 7F56B9A0
GET_PARAMETER rtsp://mongo:8554/4609.ts RTSP/1.0
CSeq: 7
Session: 7F56B9A0
User-Agent: Enseo HD-2000
Content-Type: text/parameter
Content-Length: 12
position
RTSP/1.0 200 OK
CSeq: 7
Date: Wed, Aug 03 2011 23:05:24 GMT
Session: 7F56B9A0
PLAY rtsp://mongo:8554/4609.ts RTSP/1.0
CSeq: 8
Session: 7F56B9A0
Scale: 1.000000
Range: npt=0.00-
User-Agent: Enseo HD-2000
RTSP/1.0 200 OK
CSeq: 8
Date: Wed, Aug 03 2011 23:05:27 GMT
Scale: 1.000000
Range: npt=0.000-
Session: 7F56B9A0
RTP-Info: url=rtsp://172.20.0.242:8554/4609.ts/track1;seq=2269;rtptime=321987898
GET_PARAMETER rtsp://mongo:8554/4609.ts RTSP/1.0
CSeq: 9
Session: 7F56B9A0
User-Agent: Enseo HD-2000
Content-Type: text/parameter
Content-Length: 12
position
RTSP/1.0 200 OK
CSeq: 9
Date: Wed, Aug 03 2011 23:05:27 GMT
Session: 7F56B9A0
_______________________________________________
live-devel mailing list
live-devel@...
http://lists.live555.com/mailman/listinfo/live-devel