[FFmpeg-user] Invalid duration specification for force_key_frames

Frans Gouverne fransgnl at gmail.com
Thu Sep 3 13:41:20 CEST 2015


I think I mixed up a few things. It looks like expr: is only valid for
option force_key_frames. That is the original option I had troubles with.
Just to make a simple example, I have used it for the frame rate as well.
But now I do understand that "expr:" must not be used for the frame rate.
If I simply specify max(25,30) it is working!

But still my option force_key_frames is not working. From the ffmpeg manual
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)

On Linux I use quotes around expr:gte(t,n_forced*5) or put backslashes in
front of the round brackets otherwise bash starts to complain.

So, it seems to be related to option force_key_frames only.

2015-09-03 12:46 GMT+02:00 Frans Gouverne <fransgnl at gmail.com>:

> Hi Moritz,
>
> thanks for the reply.
>
> Using -r for the frame rate is just a simple example to check if expr: is
> working or not. By the way, it should be expr:, not exp: but that does not
> change anything for my example or output.
>
> When using max(), I still get:
> Invalid framerate value: expr:max(25,30)
>
> ffmpeg simply doesn't recognize any expr: on the command line!!
>
> I got the same problem with version 2.6.3 from June 2015:
> ffmpeg version N-36084-g993c84e-xuggle-5.5
> built on Jun 11 2015 13:08:14 with gcc 4.4.7 20120313 (Red Hat 4.4.7-11)
>
> The version that worked before was 1.2.1.
>
> But maybe it has something to do with my compilation of ffmpeg? This is
> what I used as config options:
>
> ./configure --enable-librtmp --enable-libx264 --enable-gpl
>
>
>
>
> 2015-09-03 10:54 GMT+02:00 Moritz Barsnick <barsnick at gmx.net>:
>
>> Hi Frans,
>>
>> On Thu, Sep 03, 2015 at 10:36:32 +0200, Frans Gouverne wrote:
>> > since I recompiled ffmpeg some months ago, I cannot use expressions on
>> the
>> > command line anymore, they are simply not recognized. For example:
>> >
>> > ffmpeg -re -i demo.mp4 -ac 2 -b:a 64k -ar 44100 -c:v libx264 -r
>> > exp:gt(25,30) -f mp4 output.mp4
>> >
>> > Invalid framerate value: exp:gt(25,30)
>>
>> a) I can successfully use expressions for "-r" if I omit the "exp:"
>>    part. (That may have changed over the months, I don't know.)
>>
>> b) gt(25,30) won't work with "-r", as "-r" doesn't accept "0"!
>>    From the docs:
>>    ‘gt(x, y)’
>>        Return 1 if x is greater than y, 0 otherwise.
>>    Are you looking for "max(25,30)"?
>>
>> >   built on Jan 19 2013 20:36:06 with gcc 4.7.2 (GCC)
>>
>> Did you say "some months ago"?? 32 months! How old was the ffmpeg you
>> were using before?
>>
>> 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
>
>


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


More information about the ffmpeg-user mailing list