[Live-devel] Server 'trick play' support for MPEG Transport Stream files

Glen Gray glen at lincor.com
Fri Jan 12 05:45:58 PST 2007


Excellent stuff, thanks Ross.

Ross Finlayson wrote:
> Our RTSP server implementation (and therefore the "LIVE555 Media 
> Server", and the "testOnDemandRTSPServer" demo application) now 
> supports 'trick mode' operations (seeking, fast forward, reverse 
> play) when streaming MPEG Transport Stream files.
> 
> For this to work, each Transport Stream file must have (in the same 
> directory) a corresponding index file' (with name suffix ".tsx).  You 
> create these index files using the "MPEG2TransportStreamIndexer" 
> application, whose code is distributed in the "testProgs" directory.
> 
> NOTE: Before you run this application, please upgrade to the latest 
> version (2007.01.11) of the "LIVE555 Streaming Media" code, and 
> rebuild it.  (Earlier versions of the code had a bug that prevented 
> the application from working properly on some Transport Stream files.)
> 
> To generate each index file, run
> 	MPEG2TransportStreamIndexer <transport-stream-file-name>
> Be warned that this program is currently rather slow, so I suggest 
> running it on the fastest computer that you have.
> 
> Once you've generated an index file for each Transport Stream file 
> that you wish to stream, our RTSP server implementation will now 
> handle 'trick mode' operations on the file.
> 
> Unfortunately, VLC's GUI currently doesn't handle the trick mode 
> operations properly.  (The "LIVE555 Streaming Media" code - which 
> implement's the RTSP client protocol in VLC - has all the hooks for 
> doing these trick mode operations; however, the VLC code above this 
> does not yet use this properly.)  I'll be working with the VLC 
> developers to try to get this resolved ASAP, so we can have versions 
> of VLC that perform trick play on Transport Streams properly.
> 
> Unfortunately the only other client that I know of right now that 
> supports 'trick play' operations on MPEG Transport Streams is the 
> Amino set-top box (hardware).  (This is what I have been using for 
> testing, pending a resolution of the problems with VLC.)
> 
> (If anyone knows of any other clients that work, please let us know. 
> The 'trick mode' operations are all a standard part of the RTSP 
> protocol, so there are likely to be other clients out there that 
> support it.)
> 
> 
> In the meantime, once you have generated your index files, you can 
> try running a demo application called 
> "testMPEG2TransportStreamTrickPlay" (also in the "testProgs" 
> directory) to simulate the effect of 'trick play' operations on 
> Transport Stream files.  To run it:
> 	testMPEG2TransportStreamTrickPlay 
> <input-transport-stream-file-name> <start-time> <scale> 
> <output-transport-stream-file-name>
> where
> 	<input-transport-stream-file-name> is the original Transport 
> Stream file name (which must end with ".ts").  There must also be a 
> corresponding index file for this file.
> 	<start-time> is the starting play time in seconds (use 0 to 
> play from the start)
> 	<scale> is a non-zero integer, representing the playing speed 
> (use a negative number for reverse play)
> 
> Examples (assume that your original Transport Stream file is named 
> "foo.ts", and that you have already generated an index file, named 
> "too.tsx"):
> 
> testMPEG2TransportStreamTrickPlay foo.ts 0 8 foo8.ts
> 	The output file "foo8.ts" is the original stream, sped up 8x
> 
> testMPEG2TransportStreamTrickPlay foo.ts 30 -1 foo-1.ts
> 	The output file "foo-1.ts" is the original stream, played 
> backwards (at 1x speed), starting from the 30 second point.
> 
> testMPEG2TransportStreamTrickPlay foo.ts 30 -5 foo-5.ts
> 	The output file "foo-5.ts" is the original stream, played 
> backwards (at 5x speed), starting from the 30 second point.


-- 
Glen Gray <glen at lincor.com>              Digital Depot, Thomas Street
Senior Software Engineer                            Dublin 8, Ireland
Lincor Solutions Ltd.                          Ph: +353 (0) 1 4893682


More information about the live-devel mailing list