[FFmpeg-user] whats wrong with select between filter syntax

Travis Kelley rhatguy at gmail.com
Sat Jan 4 00:56:41 CET 2014


On Jan 3, 2014 4:56 PM, "Clément Bœsch" <u at pkh.me> wrote:
>
> On Fri, Jan 03, 2014 at 04:52:07PM -0500, Travis Kelley wrote:
> > On Fri, Jan 3, 2014 at 4:44 PM, Clément Bœsch <u at pkh.me> wrote:
> > > On Fri, Jan 03, 2014 at 04:37:49PM -0500, Travis Kelley wrote:
> > >> I tried the gt/lt combination you suggested and it seems to work for
the
> > >> greater than clause.  In other words it doesn't stop encoding when
it hits
> > >> the less than time.  I tried reversing the gt/lt in the expression,
but
> > >> that didn't seem to matter either.  Either way I specify, I see
ffmpeg run
> > >> though the first few seconds of video very quickly until it hits the
gt
> > >> time, then it seems to continue encoding forever.
> > >>
> > >
> > > It's probably because it's decoding the whole video: ffmpeg doesn't
have
> > > visibility on what the filters actually do, and here the filter will
just
> > > drop some frames, but ffmpeg will nevertheless feed it with the whole
> > > stream. You likely want to simply use -ss and -t (or -to in recent
> > > versions), or eventually the segmenter¹.
> > >
> > > Also, in your case, if you don't want very accurate cut, you can
probably
> > > just remux and thus make the extraction lossless.
> >
> > Actually it looks like it was walking through the video copying the
> > audio only since I hadn't specified a select filter for the audio yet.
> >  I ran the same command with -an to null out the audio and got a 10
> > second video as I expected.  Now I just need to figure out why I don't
> > have the aselect filter.  I suspect its probably due to the older
> > version of ffmpeg.
> >
> > This line ended up working to produce a 10 second file of just the video
> >
> > ffmpeg -i "input.mp4" -vf "select='lt(t,10)'" -an -c:v libx264 -preset
> > veryfast -profile:v high -level 4.1 -movflags +faststart -b:v 100k
> > /tmp/output.mp4
> >
>
> Why don't you just:
>   ffmpeg -ss 10 -i input.mp4 -t 15 -c copy /tmp/output.mp4
> ?
>
> or if you insist on re-encoding for exact seeking:
>   ffmpeg -i input.mp4 -ss 10 -t 15 [your-encode-options] /tmp/output.mp4

I need multiple segments from each video combined into 1 output stream.  So
as I understand I need to either figure out how to create the segments or
using the commands you mentioned I would need to creat multiple "temporary"
files then concat them back together at the end.  That would involve a lot
more data transfer since it would be multiple passes through the data.
>
> ?
>
> [...]
>
> --
> Clément B.
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>


More information about the ffmpeg-user mailing list