[Live-devel] Help MPEG4 streamingwith wait at end of file
Ross Finlayson
finlayson at live555.com
Mon Nov 17 11:46:40 PST 2008
> I'm trying to use the live555 streaming media to stream video
>that we are capturing to file from a camera.
>The camera encodes (mpeg4) the video and writes it to a file. At the
>same time live555 is reading from that file and streaming the video
>over RTSP. The problem we are having is that the live555 streamer
>catches up with the end of that growing file and then restarts from
>the beginning of the file. How can I configure live555 to wait at
>the end of the file until new frames arrive?
Instead of reading from a file, you should read from a *pipe*, so
that the OS will properly handle any attempts to read past the end of
file (without returning an 'end of data' indication).
So, I suggest modifying your camera application so that it writes to
'stdout', rather than to a file. You can use the "tee" utility to
record your data to a file as well as streaming it. I.e., you can run
your-camera-encoder-app | tee your-output-file-name | our-rtsp-server
(assuming you're on a Unix system).
You will need to modify the RTSP server code to (i) read from
'stdin', and (ii) set "reuseFirstSource" to True. (Read the FAQ for
more information.)
--
Ross Finlayson
Live Networks, Inc.
http://www.live555.com/
More information about the live-devel
mailing list