[FFmpeg-devel] [PATCH] lavfi: add asendcmd and sendcmd filters

Clément Bœsch ubitux at gmail.com
Fri Oct 19 08:12:40 CEST 2012

On Tue, Sep 11, 2012 at 09:49:05PM +0200, Nicolas George wrote:
> Le sextidi 26 fructidor, an CCXX, Clément Bœsch a écrit :
> > OK, assuming we are sure to have different PTS set for every single frame
> > (so monotically increasing, no NOPTS, ...).
> A lot of filters rely on that assumption. The whole logic of sendcmd also
> assumes that timestamps are strictly increasing.
> >					      A counter is way easier to
> > deal with, and is sure to not differ between different apps (contrary to
> > timestamps where you could have rounding and stuff).
> The counter could also differ: does it start at 0 or 1? Does it increment
> when there are skipped frames?

Still, it has some interesting properties: I had to extract accurately a
sequence from an input, and while I was able to start exactly at the scene
change I was looking for, I add to play for a while with the timestamps,
hoping I didn't miss any frame with my dichotomy. If I could have
expressed it in frame id, I would just have to look for an approximative
position, and start incrementing the frame id until the event I was
looking for.

> > The SMPTE timecode is just a frame counter, expressed as a timestamp +
> > frame-id-in-the-current-second. It gives a hint about the time, but you
> > are also sure to not have any duplicate. It applies to only a few
> > restrictive frame rate thought. That's what is being used in editing to
> > identify frames.
> This is rather ugly.

That's how the editing world works, deal with it ;)

My personal opinion is that it's actually pretty smart to have frame id
system expressing the time as well. Though, since it's only working with a
few very specific analog sources, it has not that much applications for
the mainstream.


Anyway, sorry for digging up an old thread, but I just remembered I forgot
to answer that mail.

Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20121019/b815572f/attachment.asc>

More information about the ffmpeg-devel mailing list