[Live-devel] scale & timestamps
Ross Finlayson
finlayson at live.com
Mon Jan 24 00:12:29 PST 2005
>Got a question about how timestamps should be handled when RTSP trickplay
>via "Scale:" is used. At the moment, it seems the timestamp is unaffected.
That's correct.
> The RTSP spec defines "scale:" as essentially playing the scaled amount
> of content at the normal viewing rate. Do you take this to mean that the
> timestamps should not be affected?
Yes.
> Wouldn't this make syncing on the client end a bit difficult (let alone
> not being the intuitive approach)?
No, the current (correct) behavior is actually intuitive, if you think of
"Scale:" as meaning the rate at which the *underlying source media* plays -
not the speed at which the media is streamed.
Imagine, for example, that you have a streaming server that takes its input
by digitizing audio/video that comes from a video tape player. "Scale:"
just affects the speed at which the underlying video tape plays. It has no
effect on the way in which the streaming server works.
Similarly, RTSP/RTP clients should not (and do not) take the scale factor
into account when they play the received media. They just use the
presentation time (computed from the RTP timestamps using RTCP) as usual.
In practice, the LIVE.COM RTSP server's implementation of "Scale:"
(currently, for WAV (PCM) audio files and MPEG-1 or 2 audio files only)
works by (i) supporting only integer scales N, and (ii) reading every Nth
sample or frame from the file, but at the same rate as if it were reading
*every* sample or frame.
Ross Finlayson
LIVE.COM
<http://www.live.com/>
More information about the live-devel
mailing list