[FFmpeg-devel] [PATCH] oggdec get start_time

j at v2v.cc j
Tue Oct 20 11:24:07 CEST 2009


Hello,

Reimar D?ffinger wrote:
> this is obviously broken since it depends on luck that the first and
> last packets it finds are from the same stream, so obviously someone
> should better implement something proper.
> Still this fixes the issue with the file that can be found here:
> http://code.google.com/p/gnome-mplayer/issues/detail?id=300
> so that FFmpeg indicates the duration correctly as 58 seconds instead of
> 13 hours.
your patch fails if i try to get the duration for this one:
"http://mvbox2.cse.ucsc.edu/media/house_proceeding_09-14-09_00.ogg?t=1:03:05/1:04:05"

attached is a version of your patch that first gets the last granule
position and after that looks for the first page of the stream found at
the end. this is already a better guess at the actual duration.
it still is not quite right though, since the first granule position is
the time at the end of the page, so the duration is off by the duration
of the first page.

j
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ogg_duration.patch
Type: text/x-diff
Size: 639 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20091020/c534e131/attachment.patch>



More information about the ffmpeg-devel mailing list