[FFmpeg-devel] [PATCH] Guess the duration before converting video

Justin Johnson justin.johnson3
Mon Feb 1 02:08:27 CET 2010

This patch guesses at the duration of the output file, and in the case
of encoding to flv the duration header is filled in ahead of time.
This allows for on-the-fly encoding to flv, which behaves like a
progressive download.
In particular I'm using this with MythTV's mythweb plugin to allow
streaming of recorded shows via flash. In order to get a working
scrubber, this patch to ffmpeg as well as another patch for mythweb
must be applied.
I don't believe this interferes with the functionality of ffmpeg, as
it is my understanding that any duration gets calculated after the
file is finished being encoded, this just preempts that and guesses
the duration beforehand. If it turns out that it's incorrect (only
encoding part of a file, or the encode is canceled by the user), it is
--Justin Johnson
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ffmpeg.diff
Type: application/octet-stream
Size: 1236 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20100131/05cd6967/attachment.obj>

More information about the ffmpeg-devel mailing list