[FFmpeg-devel] [PATCH] yuv4mpeg: add rough duration estimate and seeking.

Ronald S. Bultje rsbultje at gmail.com
Mon Jun 22 00:34:33 CEST 2015


On Sun, Jun 21, 2015 at 5:17 PM, Hendrik Leppkes <h.leppkes at gmail.com>

> On Sun, Jun 21, 2015 at 10:41 PM, Ronald S. Bultje <rsbultje at gmail.com>
> wrote:
> > ---
> >  libavformat/yuv4mpeg.h    |  1 +
> >  libavformat/yuv4mpegdec.c | 26 +++++++++++++++++++-------
> >  2 files changed, 20 insertions(+), 7 deletions(-)
> >
> What happens if a seek does not end up on a perfect frame boundary?
> Wouldn't that entirely screw over any further reading?
> So is it really that "rough", or does it actually work precise enough
> to do that?

It works for all y4m files I see in the wild, but the problem is that the
y4m spec is a little confusing. The frame header magic is "FRAME", followed
by optional per-frame options, and then a "\n". This is always empty (i.e.
"FRAME\n"), but in theory it could be non-empty and then this doesn't work.

I don't know how much we care about such theoretical files to make a more
difficult dur/seek implementation.


More information about the ffmpeg-devel mailing list