[FFmpeg-devel] [RFC] image2 and filename patterns

Michael Niedermayer michaelni at gmx.at
Mon Jan 28 00:42:06 CET 2013


On Mon, Jan 28, 2013 at 12:32:49AM +0100, Stefano Sabatini wrote:
> On date Sunday 2013-01-27 01:37:38 +0100, Michael Niedermayer encoded:
> > On Thu, Jan 24, 2013 at 05:38:21PM +0100, Stefano Sabatini wrote:
> > > On date Thursday 2013-01-24 15:59:26 +0100, Stefano Sabatini encoded:
> > > > Hi,
> > > > 
> > > > I'm trying to address ticket #1969 and I'm collecting a few ideas and
> > > > seeing some (minor) nuisances.
> > > > 
> > > > My idea is to implement something like this:
> > > > ffmpeg INPUT -f image2 -pattern_type sequence_ts foo-%06d.png
> > > > 
> > > > which would force to encode the timestamps in microseconds (or
> > > > selectable) in the output files.
> > > > 
> > > > -pattern_type would be based on the image2 demuxer homonymous option,
> > > > values could be for example:
> > > > sequence
> > > > sequence_ts
> > > > 
> > > > Currently file overwrite is implemented through the not very intuitive
> > > > option named 'updatefirst', a possibly cleaner solution would be to
> > > > adopt another pattern like '-pattern_type file' (which would also
> > > > avoid pattern escaping on the user side).
> > > > 
> > > > The 'file' and 'sequence_ts' could be ported to the image2 demuxer
> > > > (the first would avoid the need for a -loop option at the application
> > > > level, for example in ffmpeg or in the movie filter).
> > > > 
> > > > In the mentioned ticket a pattern of the form '%pts' was suggested,
> > > > but I'm opposed to this for various reasons (need to convert %t
> > > > sequence to an av_get_frame_filename() pattern, impredictability in
> > > > case of arbitrary filenames provided by the user).
> > > 
> > > And patches...
> > 
> > what about timestamp discontinuities ?
> > 
> 
> > with %d and %p for picture number and timestamp they could be stored
> > in files with just a single %X and a sequence type it would not
> > work
> 
> this is slightly more complicate to support, since we would need to
> add support to an extended format (which recognized %t/%p). Also what
> should be the behavior in case t = NOPTS? How should we render for
> example out-%t.png?

this question equally applies to any variant including your
suggestion. 

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

I have often repented speaking, but never of holding my tongue.
-- Xenocrates
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130128/d1ce4078/attachment.asc>


More information about the ffmpeg-devel mailing list