[FFmpeg-devel] [PATCH] ffprobe: add -ss option

Stefano Sabatini stefasab at gmail.com
Mon Sep 16 18:09:38 CEST 2013


On date Sunday 2013-09-15 20:15:08 +0200, Stefano Sabatini encoded:
> On date Wednesday 2012-10-24 22:27:27 +0200, Michael Niedermayer encoded:
> > On Tue, Oct 23, 2012 at 01:41:14AM +0200, Stefano Sabatini wrote:
> > > On date Monday 2012-10-22 17:09:01 +0200, Michael Niedermayer encoded:
> > > > On Mon, Oct 22, 2012 at 04:02:16PM +0200, Stefano Sabatini wrote:
> > > > > This is useful to test seeking on an input file.
> > > > 
> > > > if its for testing seeking, it might be interresting to allow
> > > > specifying more than 1 value.
> > > > that is seek to X demux for Y duration then seek to Z
> > > 
> > > What about:
> > > 
> > > INTERVAL ::= (START+DURATION)|(START-END) 
> > > INTERVALS ::= INTERVAL[,INTERVALS]
> > > 
> > > where START, END, and DURATION are duration specifications.
> > 
> > LGTM
> 
> Implemented this (in attachment). Now in ticket:
> http://ffmpeg.org/trac/ffmpeg/ticket/1437
> 
> they ask to implement the equivalent of -frames:SPEC (indeed this
> looks like a different feature), but maybe I could extend the syntax
> START+#NB_FRAMES
> 
> and/or accept the syntax:
> -END
> +DURATION
> 
> to mean to read from the very start of the file (or from the current
> position) until the ending point is met. Suggestions are welcome.
> 
> For example to read just the first 10 packets, we could specify:
> -si +#10
> 
> or maybe I could implement a distinct -frames:SPEC option.

Updated, #N duration specification not yet implemented (I'll probably
do in a further patch). The new syntax is more flexible but the result
seems a bit overkill (+189 lines of code).
-- 
FFmpeg = Fiendish & Faithless Most Powered Everlasting Gadget
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ffprobe-add-read_intervals-option.patch
Type: text/x-diff
Size: 10433 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130916/c310c26b/attachment.bin>


More information about the ffmpeg-devel mailing list