Missing ')' or too many args in 'between(t'

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Missing ')' or too many args in 'between(t'

Ulf Zibis-2
Hi,

I get this result here:
$ ffmpeg -ss 03:00 -t 01:30:50 -i in.mp3 -t 00:30:00 -f lavfi -i life=s=320x240:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00 -af volume='not(between(t,46:50,48:50))',volume='not(between(t,1:30:00,1:31:00))',atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000 -vf format=yuv420p -crf 39 out_1.3x.mp4
ffmpeg version N-97388-g2a322906b7 Copyright (c) 2000-2020 the FFmpeg developers
   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
   configuration: --enable-libx264 --enable-gpl
   libavutil      56. 42.102 / 56. 42.102
   libavcodec     58. 80.100 / 58. 80.100
   libavformat    58. 42.100 / 58. 42.100
   libavdevice    58.  9.103 / 58.  9.103
   libavfilter     7. 79.100 /  7. 79.100
   libswscale      5.  6.101 /  5.  6.101
   libswresample   3.  6.100 /  3.  6.100
   libpostproc    55.  6.100 / 55.  6.100
Input #0, mp3, from 'in.mp3':
   Duration: 01:34:13.70, start: 0.023021, bitrate: 42 kb/s
     Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 42 kb/s
     Metadata:
       encoder         : LAME3.100
Input #1, lavfi, from 'life=s=320x240:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00':
   Duration: N/A, start: 0.000000, bitrate: N/A
     Stream #1:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24, 320x240 [SAR 1:1 DAR 4:3], 30 tbr, 30 tbn, 30 tbc
Stream mapping:
   Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
   Stream #0:0 -> #0:1 (mp3 (mp3float) -> aac (native))
Press [q] to stop, [?] for help
[libx264 @ 0x55b1b5602340] using SAR=1/1
[libx264 @ 0x55b1b5602340] using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.1 Cache64
[libx264 @ 0x55b1b5602340] profile High, level 1.3
[libx264 @ 0x55b1b5602340] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4 AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html - options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7 psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2 threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1 interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2 b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250 keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf mbtree=1 crf=39.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40 aq=1:1.00
[Parsed_volume_0 @ 0x55b1b575cd40] [Eval @ 0x7ffed56fa4a0] Missing ')' or too many args in 'between(t'
[Parsed_volume_0 @ 0x55b1b575cd40] Error when evaluating the volume expression 'not(between(t'
[AVFilterGraph @ 0x55b1b575c5c0] Error initializing filter 'volume' with args 'not(between(t'
Error reinitializing filters!
Failed to inject frame into filter network: Invalid argument
Error while processing the decoded data for stream #0:0
Conversion failed!

What is the problem here ?

-Ulf

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

Michael Koch
Am 06.05.2020 um 14:06 schrieb Ulf Zibis:

> Hi,
>
> I get this result here:
> $ ffmpeg -ss 03:00 -t 01:30:50 -i in.mp3 -t 00:30:00 -f lavfi -i
> life=s=320x240:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00
> -af
> volume='not(between(t,46:50,48:50))',volume='not(between(t,1:30:00,1:31:00))',atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000
> -vf format=yuv420p -crf 39 out_1.3x.mp4
> ffmpeg version N-97388-g2a322906b7 Copyright (c) 2000-2020 the FFmpeg
> developers
>   built with gcc 7 (Ubuntu 7.5.0-3ubuntu1~18.04)
>   configuration: --enable-libx264 --enable-gpl
>   libavutil      56. 42.102 / 56. 42.102
>   libavcodec     58. 80.100 / 58. 80.100
>   libavformat    58. 42.100 / 58. 42.100
>   libavdevice    58.  9.103 / 58.  9.103
>   libavfilter     7. 79.100 /  7. 79.100
>   libswscale      5.  6.101 /  5.  6.101
>   libswresample   3.  6.100 /  3.  6.100
>   libpostproc    55.  6.100 / 55.  6.100
> Input #0, mp3, from 'in.mp3':
>   Duration: 01:34:13.70, start: 0.023021, bitrate: 42 kb/s
>     Stream #0:0: Audio: mp3, 48000 Hz, stereo, fltp, 42 kb/s
>     Metadata:
>       encoder         : LAME3.100
> Input #1, lavfi, from
> 'life=s=320x240:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00':
>   Duration: N/A, start: 0.000000, bitrate: N/A
>     Stream #1:0: Video: rawvideo (RGB[24] / 0x18424752), rgb24,
> 320x240 [SAR 1:1 DAR 4:3], 30 tbr, 30 tbn, 30 tbc
> Stream mapping:
>   Stream #1:0 -> #0:0 (rawvideo (native) -> h264 (libx264))
>   Stream #0:0 -> #0:1 (mp3 (mp3float) -> aac (native))
> Press [q] to stop, [?] for help
> [libx264 @ 0x55b1b5602340] using SAR=1/1
> [libx264 @ 0x55b1b5602340] using cpu capabilities: MMX2 SSE2Fast SSSE3
> SSE4.1 Cache64
> [libx264 @ 0x55b1b5602340] profile High, level 1.3
> [libx264 @ 0x55b1b5602340] 264 - core 152 r2854 e9a5903 - H.264/MPEG-4
> AVC codec - Copyleft 2003-2017 - http://www.videolan.org/x264.html -
> options: cabac=1 ref=3 deblock=1:0:0 analyse=0x3:0x113 me=hex subme=7
> psy=1 psy_rd=1.00:0.00 mixed_ref=1 me_range=16 chroma_me=1 trellis=1
> 8x8dct=1 cqm=0 deadzone=21,11 fast_pskip=1 chroma_qp_offset=-2
> threads=3 lookahead_threads=1 sliced_threads=0 nr=0 decimate=1
> interlaced=0 bluray_compat=0 constrained_intra=0 bframes=3 b_pyramid=2
> b_adapt=1 b_bias=0 direct=1 weightb=1 open_gop=0 weightp=2 keyint=250
> keyint_min=25 scenecut=40 intra_refresh=0 rc_lookahead=40 rc=crf
> mbtree=1 crf=39.0 qcomp=0.60 qpmin=0 qpmax=69 qpstep=4 ip_ratio=1.40
> aq=1:1.00
> [Parsed_volume_0 @ 0x55b1b575cd40] [Eval @ 0x7ffed56fa4a0] Missing ')'
> or too many args in 'between(t'
> [Parsed_volume_0 @ 0x55b1b575cd40] Error when evaluating the volume
> expression 'not(between(t'
> [AVFilterGraph @ 0x55b1b575c5c0] Error initializing filter 'volume'
> with args 'not(between(t'
> Error reinitializing filters!
> Failed to inject frame into filter network: Invalid argument
> Error while processing the decoded data for stream #0:0
> Conversion failed!
>
> What is the problem here ?

I'm not sure if inside the expression hours:minutes:seconds is allowed.
Try to convert to seconds.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

Ulf Zibis-2

Am 06.05.20 um 14:09 schrieb Michael Koch:
>
> I'm not sure if inside the expression hours:minutes:seconds is allowed. Try to convert to seconds.

It does not mak a difference :-(

-Ulf

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

Michael Koch
Am 06.05.2020 um 14:44 schrieb Ulf Zibis:
>
> Am 06.05.20 um 14:09 schrieb Michael Koch:
>>
>> I'm not sure if inside the expression hours:minutes:seconds is
>> allowed. Try to convert to seconds.
>
> It does not mak a difference :-(

Here it works (with Windows version). I did only replace the first input
file by a sine source, and changed the time values to seconds.

ffmpeg -ss 03:00 -t 01:30:50 -f lavfi -i sine=f=1000:d=5000 -t 00:30:00
-f lavfi -i
life=s=320x240:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00
-af
volume='not(between(t,2810,2930))',volume='not(between(t,5400,5460))',atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000
-vf format=yuv420p -crf 39 out_1.3x.mp4

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

James Darnley
In reply to this post by Ulf Zibis-2
On 06/05/2020, Ulf Zibis <[hidden email]> wrote:
> -af volume='not(between(t,46:50,48:50))',volume='not(between(t,1:30:00,1:31:00))',atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000

> [Parsed_volume_0 @ 0x55b1b575cd40] [Eval @ 0x7ffed56fa4a0] Missing ')' or
> too many args in 'between(t'
> [Parsed_volume_0 @ 0x55b1b575cd40] Error when evaluating the volume
> expression 'not(between(t'
> [AVFilterGraph @ 0x55b1b575c5c0] Error initializing filter 'volume' with
> args 'not(between(t'


You need to escape those commas.  Commas separate different filters.
Probably the colons too which separate different arguments for a
single filter.
_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

Ulf Zibis-2

Am 06.05.20 um 20:48 schrieb James Darnley:

> On 06/05/2020, Ulf Zibis <[hidden email]> wrote:
>> -af volume='not(between(t,46:50,48:50))',volume='not(between(t,1:30:00,1:31:00))',atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000
>> [Parsed_volume_0 @ 0x55b1b575cd40] [Eval @ 0x7ffed56fa4a0] Missing ')' or
>> too many args in 'between(t'
>> [Parsed_volume_0 @ 0x55b1b575cd40] Error when evaluating the volume
>> expression 'not(between(t'
>> [AVFilterGraph @ 0x55b1b575c5c0] Error initializing filter 'volume' with
>> args 'not(between(t'
>
> You need to escape those commas.  Commas separate different filters.
> Probably the colons too which separate different arguments for a
> single filter.

Thanks for the hint. I already tested escaping the commas with '\' but with hours:minutes:seconds. This didn't work.

Now I tried with pure seconds, an this worked. Here is my command:
$ ffmpeg -ss 03:00 -t 01:30:50 -i in.mp3 -f lavfi -i life=s=320x240:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00 -af volume='not(between(t\,2791\,2911))':eval=frame,volume='not(between(t\,5397\,5457))':eval=frame,atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000 -vf format=yuv420p -crf 39 -shortest out_1.3x.mp4

I tried several versions to escape the collons, but found no solution.
I think, that there must be a solution similar to the examples here: https://ffmpeg.org/ffmpeg-filters.html#Examples-5

Does one have a clue, how it could work?

-Ulf

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

Ulf Zibis-2
In reply to this post by Michael Koch

Am 06.05.20 um 15:01 schrieb Michael Koch:
>
> Here it works (with Windows version). I did only replace the first input file by a sine source, and changed the time values to seconds.
>
> ffmpeg -ss 03:00 -t 01:30:50 -f lavfi -i sine=f=1000:d=5000 -t 00:30:00 -f lavfi -i life=s=320x240:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00 -af volume='not(between(t,2810,2930))',volume='not(between(t,5400,5460))',atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000 -vf format=yuv420p -crf 39 out_1.3x.mp4

I'm wondering, why the escapes are not needed on Windows.

-Ulf

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

Carl Zwanzig
On 5/6/2020 5:49 PM, Ulf Zibis wrote:
> I'm wondering, why the escapes are not needed on Windows.

Different shell (and parser), I expect.

z!

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

Michael Koch
In reply to this post by Ulf Zibis-2
Am 07.05.2020 um 02:46 schrieb Ulf Zibis:

>
> Am 06.05.20 um 20:48 schrieb James Darnley:
>> On 06/05/2020, Ulf Zibis <[hidden email]> wrote:
>>> -af
>>> volume='not(between(t,46:50,48:50))',volume='not(between(t,1:30:00,1:31:00))',atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000
>>> [Parsed_volume_0 @ 0x55b1b575cd40] [Eval @ 0x7ffed56fa4a0] Missing
>>> ')' or
>>> too many args in 'between(t'
>>> [Parsed_volume_0 @ 0x55b1b575cd40] Error when evaluating the volume
>>> expression 'not(between(t'
>>> [AVFilterGraph @ 0x55b1b575c5c0] Error initializing filter 'volume'
>>> with
>>> args 'not(between(t'
>>
>> You need to escape those commas.  Commas separate different filters.
>> Probably the colons too which separate different arguments for a
>> single filter.
>
> Thanks for the hint. I already tested escaping the commas with '\' but
> with hours:minutes:seconds. This didn't work.
>
> Now I tried with pure seconds, an this worked. Here is my command:
> $ ffmpeg -ss 03:00 -t 01:30:50 -i in.mp3 -f lavfi -i
> life=s=320x240:mold=10:r=30:ratio=0.1:death_color=#C83232:life_color=#00ff00
> -af
> volume='not(between(t\,2791\,2911))':eval=frame,volume='not(between(t\,5397\,5457))':eval=frame,atempo=1/1.1/1.3,aresample=48000/1.1,asetrate=48000
> -vf format=yuv420p -crf 39 -shortest out_1.3x.mp4
>
> I tried several versions to escape the collons, but found no solution.
> I think, that there must be a solution similar to the examples here:
> https://ffmpeg.org/ffmpeg-filters.html#Examples-5
>
> Does one have a clue, how it could work?

I have never seen an example of hh:mm:ss inside an expression, and I
don't think that works. The expression evaluator works only with integer
or floating point numbers, but not with times.

Michael

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".
Reply | Threaded
Open this post in threaded view
|

Re: Missing ')' or too many args in 'between(t'

Ulf Zibis-2

Am 07.05.20 um 08:21 schrieb Michael Koch:
> Am 07.05.2020 um 02:46 schrieb Ulf Zibis:
>>
>> I tried several versions to escape the collons, but found no solution.
>> I think, that there must be a solution similar to the examples here: https://ffmpeg.org/ffmpeg-filters.html#Examples-5
>>
>> Does one have a clue, how it could work?
>
> I have never seen an example of hh:mm:ss inside an expression, and I don't think that works. The expression evaluator works only with integer or floating point numbers, but not with times.

Hm, but from here it seems, that this syntax is generally accepted
https://ffmpeg.org/ffmpeg-utils.html#Quoting-and-escaping

-Ulf

_______________________________________________
ffmpeg-user mailing list
[hidden email]
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
[hidden email] with subject "unsubscribe".