[FFmpeg-user] Invalid duration specification for force_key_frames

Frans Gouverne fransgnl at gmail.com
Thu Sep 3 15:03:34 CEST 2015


If I do not use the quotes I do get:
*-bash: syntax error near unexpected token `('*

*So I tried:*
ffmpeg  -i demo.mp4 -c:v libx264 -t 100 -force_key_frames
"expr:gte(t,n_forced*5)" -f null -

*Hereby my output:*
ffmpeg version N-36084-g993c84e-xuggle-5.5 Copyright (c) 2000-2012 the
FFmpeg developers
  built on Jun 11 2015 13:08:14 with gcc 4.4.7 20120313 (Red Hat 4.4.7-11)
  configuration: --prefix=/usr/local --extra-version=xuggle-5.5
--extra-cflags=-I/tmp/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive/stage/usr/local/include
--extra-ldflags=-L/tmp/xuggle-xuggler/build/native/x86_64-unknown-linux-gnu/captive/stage/usr/local/lib
--disable-shared --enable-pic --enable-gpl --enable-nonfree
--enable-libx264 --enable-version3 --enable-libmp3lame --enable-libvorbis
--enable-libtheora --enable-libspeex --enable-libvo-aacenc
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp
--enable-openssl --enable-zlib --enable-libvpx
  libavutil      51. 46.100 / 51. 46.100
  libavcodec     54. 14.101 / 54. 14.101
  libavformat    54.  3.100 / 54.  3.100
  libavdevice    53.  4.100 / 53.  4.100
  libavfilter     2. 67.101 /  2. 67.101
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 10.100 /  0. 10.100
  libpostproc    52.  0.100 / 52.  0.100
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'demo.mp4':
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2avc1mp41
    encoder         : Lavf54.61.101
  Duration: 01:24:22.56, start: 0.000000, bitrate: 569 kb/s
    Stream #0:0(und): Video: h264 (Main) (avc1 / 0x31637661), yuv420p,
720x406 [SAR 1:1 DAR 360:203], 398 kb/s, 50 fps, 150 tbr, 90k tbn, 180k tbc
    Metadata:
      handler_name    : VideoHandler
    Stream #0:1(und): Audio: aac (mp4a / 0x6134706D), 48000 Hz, stereo,
s16, 160 kb/s
    Metadata:
      handler_name    : SoundHandler
Invalid duration specification for force_key_frames: expr:gte(t,n_forced*5)


2015-09-03 13:57 GMT+02:00 Moritz Barsnick <barsnick at gmx.net>:

> On Thu, Sep 03, 2015 at 13:41:20 +0200, Frans Gouverne wrote:
> > I use:
> >
> > -force_key_frames expr:gte(t,n_forced*5)
> >
> > It gives me the following error:
> >
> >   Invalid duration specification for force_key_frames:
> > expr:gte(t,n_forced*5)
>
> Well, then something is wrong with your ffmpeg version. Please post a
> full command line and complete, uncut console output from a
> reproducible attempt.
>
> Your expression works fine for me on Linux with said quotes (though I'm
> not sure it makes sense):
>
> $ ffmpeg -f lavfi -i testsrc -c:v libx264 -t 100 -force_key_frames
> "expr:gte(t,n_forced*5)" -f null -
> [I'm not quoting the output here. I simply don't get an error.]
>
> Moritz
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-user
>



-- 
Gouverne Web Design
Colenso 125
3761GL Soest
Tel: 035-6015569
Mobiel: 06-11408032
KvK: 32108255


More information about the ffmpeg-user mailing list