Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#8032 closed enhancement (wontfix)

libavfilter/af_adelay.c: one delay-string for all channels

Reported by: CoRoNe Owned by:
Priority: normal Component: avfilter
Version: git-master Keywords: adelay
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

https://ffmpeg.org/ffmpeg-filters.html#adelay:

If number of given delays is smaller than number of channels all remaining channels will not be delayed.


https://ffmpeg.org/pipermail/ffmpeg-user/2019-July/044814.html:

It's really cumbersome to always having to specify the delay for all(!) channels: [1]adelay=158792S|158792S[E2];
How about a default behaviour where specifying an amount of milliseconds/samples once(!) applies to all channels: [1]adelay=158792S[E2];
And if you want a specific delay for another channel, then you can do so as is already possible.
This would make my commandline a lot shorter!

I wish the default behaviour for the adelay filter to be:
"If only one delay-string is given, than this delay will be applied to all channels."

adelay=1000|250|500, to delay each channel separately would of course still be possible, but adelay=1000 would then apply to all channels.

https://ffmpeg.org/pipermail/ffmpeg-user/2019-July/044822.html:

Do you want me to create a ticket to request the single time entry for all channels?

No, I can add such feature to adelay by default.

Created this ticket in order for Paul to not forget.

Change History (9)

comment:1 by Gyan, 5 years ago

This would need to be a new option. If the last delay string is applied to all remaining channels, then it will break existing scripts which expect remaining channels to not be delayed.

comment:2 by CoRoNe, 5 years ago

I can see it would pose a problem if you would have 7 channels for instance and you only want the 1st channel to be delayed.
Now: adelay=1000.
Then: adelay=1000|0|0|0|0|0|0.

Perhaps a new option would indeed be needed, especially when backward compatibility is very important to you lot.

Last edited 5 years ago by CoRoNe (previous) (diff)

comment:3 by Elon Musk, 4 years ago

Resolution: fixed
Status: newclosed

comment:4 by CoRoNe, 4 years ago

Resolution: fixed
Status: closedreopened

Thanks, but having just tested your patch, I believe there's something seriously wrong with it.
Please download 'FFmpeg-trac-8032_SIBERIA.7z' and test the original command

ffmpeg -i SIBERIAE1.WAV -i SIBERIAE2.WAV -i SIBERIAE3.WAV -i SIBERIAE4.WAV -i SIBERIAE5.WAV -i SIBERIAE6.WAV -i SIBERIAE7.WAV -i SIBERIAE8.WAV -i SIBERIAE9.WAV -i SIBERIAE10.WAV -i SIBERIAE11.WAV -i SIBERIAE12.WAV -i SIBERIAE13.WAV -i SIBERIAE14.WAV -i SIBERIAE15.WAV -i SIBERIAE16.WAV -i SIBERIAE17.WAV -i SIBERIAE18.WAV -i SIBERIAE19.WAV -i SIBERIAE20.WAV -i SIBERIAE21.WAV -i SIBERIAE22.WAV -i SIBERIAE23.WAV -i SIBERIAE24.WAV -i SIBERIAE25.WAV -i SIBERIAE26.WAV -i SIBERIAE27.WAV -i SIBERIAE28.WAV -i SIBERIAE29.WAV -lavfi "[1]adelay=158792S|158792S[E2];[2]adelay=291139S|291139S[E3];[3]adelay=423476S|423476S[E4];[4]adelay=555820S|555820S[E5];[5]adelay=714633S|714633S[E6];[6]adelay=873439S|873439S[E7];[7]adelay=1058736S|1058736S[E8];[8]adelay=1244019S|1244019S[E9];[9]adelay=1376339S|1376339S[E10];[10]adelay=1508682S|1508682S[E11];[11]adelay=1667496S|1667496S[E12];[12]adelay=1826306S|1826306S[E13];[13]adelay=1932181S|1932181S[E14];[14]adelay=2118076S|2118076S[E15];[15]adelay=2255399S|2255399S[E16];[16]adelay=2364348S|2364348S[E17];[17]adelay=2499655S|2499655S[E18];[18]adelay=2587883S|2587883S[E19];[19]adelay=2720226S|2720226S[E20];[20]adelay=2852568S|2852568S[E21];[21]adelay=2984913S|2984913S[E22];[22]adelay=3073138S|3073138S[E23];[23]adelay=3161367S|3161367S[E24];[24]adelay=3249594S|3249594S[E25];[25]adelay=3336742S|3336742S[E26];[26]adelay=3421112S|3421112S[E27];[27]adelay=3576621S|3576621S[E28];[28]adelay=3788369S|3788369S[E29];[0][E2][E3][E4][E5][E6][E7][E8][E9][E10][E11][E12][E13][E14][E15][E16][E17][E18][E19][E20][E21][E22][E23][E24][E25][E26][E27][E28][E29]amix=inputs=29:dropout_transition=90.742,volume=87" -f wav - | ffplay -i -

compared to the new one

ffmpeg -i SIBERIAE1.WAV -i SIBERIAE2.WAV -i SIBERIAE3.WAV -i SIBERIAE4.WAV -i SIBERIAE5.WAV -i SIBERIAE6.WAV -i SIBERIAE7.WAV -i SIBERIAE8.WAV -i SIBERIAE9.WAV -i SIBERIAE10.WAV -i SIBERIAE11.WAV -i SIBERIAE12.WAV -i SIBERIAE13.WAV -i SIBERIAE14.WAV -i SIBERIAE15.WAV -i SIBERIAE16.WAV -i SIBERIAE17.WAV -i SIBERIAE18.WAV -i SIBERIAE19.WAV -i SIBERIAE20.WAV -i SIBERIAE21.WAV -i SIBERIAE22.WAV -i SIBERIAE23.WAV -i SIBERIAE24.WAV -i SIBERIAE25.WAV -i SIBERIAE26.WAV -i SIBERIAE27.WAV -i SIBERIAE28.WAV -i SIBERIAE29.WAV -lavfi "[1]adelay=delays=158792S:all=1[E2];[2]adelay=delays=291139S:all=1[E3];[3]adelay=delays=423476S:all=1[E4];[4]adelay=delays=555820S:all=1[E5];[5]adelay=delays=714633S:all=1[E6];[6]adelay=delays=873439S:all=1[E7];[7]adelay=delays=1058736S:all=1[E8];[8]adelay=delays=1244019S:all=1[E9];[9]adelay=delays=1376339S:all=1[E10];[10]adelay=delays=1508682S:all=1[E11];[11]adelay=delays=1667496S:all=1[E12];[12]adelay=delays=1826306S:all=1[E13];[13]adelay=delays=1932181S:all=1[E14];[14]adelay=delays=2118076S:all=1[E15];[15]adelay=delays=2255399S:all=1[E16];[16]adelay=delays=2364348S:all=1[E17];[17]adelay=delays=2499655S:all=1[E18];[18]adelay=delays=2587883S:all=1[E19];[19]adelay=delays=2720226S:all=1[E20];[20]adelay=delays=2852568S:all=1[E21];[21]adelay=delays=2984913S:all=1[E22];[22]adelay=delays=3073138S:all=1[E23];[23]adelay=delays=3161367S:all=1[E24];[24]adelay=delays=3249594S:all=1[E25];[25]adelay=delays=3336742S:all=1[E26];[26]adelay=delays=3421112S:all=1[E27];[27]adelay=delays=3576621S:all=1[E28];[28]adelay=delays=3788369S:all=1[E29];[0][E2][E3][E4][E5][E6][E7][E8][E9][E10][E11][E12][E13][E14][E15][E16][E17][E18][E19][E20][E21][E22][E23][E24][E25][E26][E27][E28][E29]amix=inputs=29:dropout_transition=90.742,volume=87" -f wav - | ffplay -i -

With the new command it sounds like that from the start all inputs are played simultaneously. After that (±10sec) the entire mix does continue (so the delays are working), but only the left channel.

As a side note: The new command itself is actually longer (118 characters to be exact). This is rather the opposite from what I intended.

comment:5 by Elon Musk, 4 years ago

Resolution: wontfix
Status: reopenedclosed

comment:6 by Elon Musk, 4 years ago

Nobody forces you to use longer command. The documentation uses longer variant for reasons.

comment:7 by CoRoNe, 4 years ago

Seriously? You ignore the main issue I described and close the ticket because you 'wontfix' my side note remark?!
Since we're left now with a dis-functional filter-parameter I suggest you revert the patch and remove the "all"-parameter entirely. This is just ridiculous.

comment:8 by Elon Musk, 4 years ago

No, use last ffmpeg version always.

comment:9 by CoRoNe, 4 years ago

I now see "avfilter/af_adelay: fix buggy behaviour" (Wed, 9 Oct 2019 09:56:33 +0200).
I really don't understand why you changed this ticket its status to 'wontfix' around the same time you pushed this commit with which you did fix the main issue described in comment:4. A simple and short message mentioning this fix (including a status change to 'fixed') would have prevented a lot of confusion and annoyance.
In the end I guess -thank you- is in order.

Note: See TracTickets for help on using tickets.