[Ffmpeg-devel] Seeking on a live stream

Bill May wmay
Fri Jun 17 18:40:57 CEST 2005

Erik Slagter wrote:
> You're practically saying here that you're recording an mpeg4 elementary
> stream, because you do not mention any container. Mpeg4 elementary
> streams can be sought in while recording very well, no problem.
> BUT you're probably not recording an elementary stream at all (just like
> 999/1000 of the others) but using an avi container (either on purpose or
> not). Avi streams cannot be sought in without making an index. The index
> is made when you stop the recording. You can convince mplayer though to
> make an index on the fly with -idx. Prepare for some waiting time.
> Better not use avi at all, but I guess (as usual) that's out of the
> question because it needs to be erhm... compatible with windows, right?

It's the same problem with mp4 files, as well.  The moov header,
which contains all the information about what's in the stream, is
usually written when recording ends.

You'd need to be finalizing the complete movie after each frame, including
hinting, if you use .mp4 files.  .mpg files (which then wouldn't be
streamed using RTP) could be used.

More information about the ffmpeg-devel mailing list