* [FFmpeg-devel] avfilter/adelay - interactive commands
@ 2022-01-17 22:02 deiwo deiwo
2022-01-18 8:23 ` Paul B Mahol
0 siblings, 1 reply; 7+ messages in thread
From: deiwo deiwo @ 2022-01-17 22:02 UTC (permalink / raw)
To: ffmpeg-devel
Hello,
I would like to ask if it makes sense to implement ZeroMQ interactive
commands for the adelay filter, from the performance and memory point of
view.
If it does make sense then is it possible to malloc/free/realloc memory
within the command processing function? Can it cause noticeable delays in
the stream outputs?
I am new to the ffmpeg development so I am sorry if this kind of question
does not belong to this mailing list.
Thanks for the response,
David L
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] avfilter/adelay - interactive commands
2022-01-17 22:02 [FFmpeg-devel] avfilter/adelay - interactive commands deiwo deiwo
@ 2022-01-18 8:23 ` Paul B Mahol
2022-01-18 9:09 ` deiwo deiwo
0 siblings, 1 reply; 7+ messages in thread
From: Paul B Mahol @ 2022-01-18 8:23 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Mon, Jan 17, 2022 at 11:02 PM deiwo deiwo <deiwo101@gmail.com> wrote:
> Hello,
> I would like to ask if it makes sense to implement ZeroMQ interactive
> commands for the adelay filter, from the performance and memory point of
> view.
> If it does make sense then is it possible to malloc/free/realloc memory
> within the command processing function? Can it cause noticeable delays in
> the stream outputs?
>
> I am new to the ffmpeg development so I am sorry if this kind of question
> does not belong to this mailing list.
>
>
I fail to see how that would work. Please elaborate your idea.
> Thanks for the response,
> David L
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] avfilter/adelay - interactive commands
2022-01-18 8:23 ` Paul B Mahol
@ 2022-01-18 9:09 ` deiwo deiwo
2022-01-18 17:10 ` deiwo deiwo
0 siblings, 1 reply; 7+ messages in thread
From: deiwo deiwo @ 2022-01-18 9:09 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Similar to how one can change volume in the volume filter when there is a
zeromq filter preceding the volume filter, then it's possible to send
zeromq commands to the volume filter and change the volume dynamically
(while the ffmpeg is running).
In the case of adelay filter the delay could be changed dynamically, when
the user would increase the delay, additional silence would be added and
the sample buffer would increase, and when the user would decrease the
delay some samples would be skipped in the sample buffer and the buffer
size would decrease.
The usage for this would be beneficial for live streams, for example when
changing the delay of an audio channel requires complete restart of the
ffmpeg.
ut 18. 1. 2022 o 9:22 Paul B Mahol <onemda@gmail.com> napísal(a):
> On Mon, Jan 17, 2022 at 11:02 PM deiwo deiwo <deiwo101@gmail.com> wrote:
>
> > Hello,
> > I would like to ask if it makes sense to implement ZeroMQ interactive
> > commands for the adelay filter, from the performance and memory point of
> > view.
> > If it does make sense then is it possible to malloc/free/realloc memory
> > within the command processing function? Can it cause noticeable delays in
> > the stream outputs?
> >
> > I am new to the ffmpeg development so I am sorry if this kind of question
> > does not belong to this mailing list.
> >
> >
> I fail to see how that would work. Please elaborate your idea.
>
>
>
> > Thanks for the response,
> > David L
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> >
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] avfilter/adelay - interactive commands
2022-01-18 9:09 ` deiwo deiwo
@ 2022-01-18 17:10 ` deiwo deiwo
2022-01-18 17:38 ` Paul B Mahol
0 siblings, 1 reply; 7+ messages in thread
From: deiwo deiwo @ 2022-01-18 17:10 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Hi,
I have created a proof of concept. Please check if it makes sense and has a
potential to get merged.
I did not know whether it would make sense to send it as a patch, so for
now a pastebin link:
https://pastebin.com/nAxRj4C9
Thanks,
David Lacko
ut 18. 1. 2022 o 10:09 deiwo deiwo <deiwo101@gmail.com> napísal(a):
> Similar to how one can change volume in the volume filter when there is a
> zeromq filter preceding the volume filter, then it's possible to send
> zeromq commands to the volume filter and change the volume dynamically
> (while the ffmpeg is running).
> In the case of adelay filter the delay could be changed dynamically, when
> the user would increase the delay, additional silence would be added and
> the sample buffer would increase, and when the user would decrease the
> delay some samples would be skipped in the sample buffer and the buffer
> size would decrease.
>
> The usage for this would be beneficial for live streams, for example when
> changing the delay of an audio channel requires complete restart of the
> ffmpeg.
>
> ut 18. 1. 2022 o 9:22 Paul B Mahol <onemda@gmail.com> napísal(a):
>
>> On Mon, Jan 17, 2022 at 11:02 PM deiwo deiwo <deiwo101@gmail.com> wrote:
>>
>> > Hello,
>> > I would like to ask if it makes sense to implement ZeroMQ interactive
>> > commands for the adelay filter, from the performance and memory point of
>> > view.
>> > If it does make sense then is it possible to malloc/free/realloc memory
>> > within the command processing function? Can it cause noticeable delays
>> in
>> > the stream outputs?
>> >
>> > I am new to the ffmpeg development so I am sorry if this kind of
>> question
>> > does not belong to this mailing list.
>> >
>> >
>> I fail to see how that would work. Please elaborate your idea.
>>
>>
>>
>> > Thanks for the response,
>> > David L
>> > _______________________________________________
>> > ffmpeg-devel mailing list
>> > ffmpeg-devel@ffmpeg.org
>> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>> >
>> > To unsubscribe, visit link above, or email
>> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>> >
>> _______________________________________________
>> ffmpeg-devel mailing list
>> ffmpeg-devel@ffmpeg.org
>> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>>
>> To unsubscribe, visit link above, or email
>> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>>
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] avfilter/adelay - interactive commands
2022-01-18 17:10 ` deiwo deiwo
@ 2022-01-18 17:38 ` Paul B Mahol
2022-01-18 17:58 ` deiwo deiwo
0 siblings, 1 reply; 7+ messages in thread
From: Paul B Mahol @ 2022-01-18 17:38 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Tue, Jan 18, 2022 at 6:10 PM deiwo deiwo <deiwo101@gmail.com> wrote:
> Hi,
> I have created a proof of concept. Please check if it makes sense and has a
> potential to get merged.
> I did not know whether it would make sense to send it as a patch, so for
> now a pastebin link:
> https://pastebin.com/nAxRj4C9
Delays can be different for each channel.
>
>
> Thanks,
> David Lacko
>
> ut 18. 1. 2022 o 10:09 deiwo deiwo <deiwo101@gmail.com> napísal(a):
>
> > Similar to how one can change volume in the volume filter when there is a
> > zeromq filter preceding the volume filter, then it's possible to send
> > zeromq commands to the volume filter and change the volume dynamically
> > (while the ffmpeg is running).
> > In the case of adelay filter the delay could be changed dynamically, when
> > the user would increase the delay, additional silence would be added and
> > the sample buffer would increase, and when the user would decrease the
> > delay some samples would be skipped in the sample buffer and the buffer
> > size would decrease.
> >
> > The usage for this would be beneficial for live streams, for example when
> > changing the delay of an audio channel requires complete restart of the
> > ffmpeg.
> >
> > ut 18. 1. 2022 o 9:22 Paul B Mahol <onemda@gmail.com> napísal(a):
> >
> >> On Mon, Jan 17, 2022 at 11:02 PM deiwo deiwo <deiwo101@gmail.com>
> wrote:
> >>
> >> > Hello,
> >> > I would like to ask if it makes sense to implement ZeroMQ interactive
> >> > commands for the adelay filter, from the performance and memory point
> of
> >> > view.
> >> > If it does make sense then is it possible to malloc/free/realloc
> memory
> >> > within the command processing function? Can it cause noticeable delays
> >> in
> >> > the stream outputs?
> >> >
> >> > I am new to the ffmpeg development so I am sorry if this kind of
> >> question
> >> > does not belong to this mailing list.
> >> >
> >> >
> >> I fail to see how that would work. Please elaborate your idea.
> >>
> >>
> >>
> >> > Thanks for the response,
> >> > David L
> >> > _______________________________________________
> >> > ffmpeg-devel mailing list
> >> > ffmpeg-devel@ffmpeg.org
> >> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >> >
> >> > To unsubscribe, visit link above, or email
> >> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> >> >
> >> _______________________________________________
> >> ffmpeg-devel mailing list
> >> ffmpeg-devel@ffmpeg.org
> >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >>
> >> To unsubscribe, visit link above, or email
> >> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> >>
> >
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] avfilter/adelay - interactive commands
2022-01-18 17:38 ` Paul B Mahol
@ 2022-01-18 17:58 ` deiwo deiwo
2022-01-18 18:25 ` Paul B Mahol
0 siblings, 1 reply; 7+ messages in thread
From: deiwo deiwo @ 2022-01-18 17:58 UTC (permalink / raw)
To: FFmpeg development discussions and patches
Yes, I am aware of that fact. The changes are more proof of concept than
anything else.
What is missing is also proper command parsing, because the numbers can
have suffixes defining their resolution as is in the config_input()
function, where for each channel a different delay can be specified.
In that case the given functionality can be taken out to separate function
to be used by the config_input() and by the process_command().
I can implement the missing pieces if you decide to move forward with these
changes.
ut 18. 1. 2022 o 18:38 Paul B Mahol <onemda@gmail.com> napísal(a):
> On Tue, Jan 18, 2022 at 6:10 PM deiwo deiwo <deiwo101@gmail.com> wrote:
>
> > Hi,
> > I have created a proof of concept. Please check if it makes sense and
> has a
> > potential to get merged.
> > I did not know whether it would make sense to send it as a patch, so for
> > now a pastebin link:
> > https://pastebin.com/nAxRj4C9
>
>
> Delays can be different for each channel.
>
>
>
> >
> >
> > Thanks,
> > David Lacko
> >
> > ut 18. 1. 2022 o 10:09 deiwo deiwo <deiwo101@gmail.com> napísal(a):
> >
> > > Similar to how one can change volume in the volume filter when there
> is a
> > > zeromq filter preceding the volume filter, then it's possible to send
> > > zeromq commands to the volume filter and change the volume dynamically
> > > (while the ffmpeg is running).
> > > In the case of adelay filter the delay could be changed dynamically,
> when
> > > the user would increase the delay, additional silence would be added
> and
> > > the sample buffer would increase, and when the user would decrease the
> > > delay some samples would be skipped in the sample buffer and the buffer
> > > size would decrease.
> > >
> > > The usage for this would be beneficial for live streams, for example
> when
> > > changing the delay of an audio channel requires complete restart of the
> > > ffmpeg.
> > >
> > > ut 18. 1. 2022 o 9:22 Paul B Mahol <onemda@gmail.com> napísal(a):
> > >
> > >> On Mon, Jan 17, 2022 at 11:02 PM deiwo deiwo <deiwo101@gmail.com>
> > wrote:
> > >>
> > >> > Hello,
> > >> > I would like to ask if it makes sense to implement ZeroMQ
> interactive
> > >> > commands for the adelay filter, from the performance and memory
> point
> > of
> > >> > view.
> > >> > If it does make sense then is it possible to malloc/free/realloc
> > memory
> > >> > within the command processing function? Can it cause noticeable
> delays
> > >> in
> > >> > the stream outputs?
> > >> >
> > >> > I am new to the ffmpeg development so I am sorry if this kind of
> > >> question
> > >> > does not belong to this mailing list.
> > >> >
> > >> >
> > >> I fail to see how that would work. Please elaborate your idea.
> > >>
> > >>
> > >>
> > >> > Thanks for the response,
> > >> > David L
> > >> > _______________________________________________
> > >> > ffmpeg-devel mailing list
> > >> > ffmpeg-devel@ffmpeg.org
> > >> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >> >
> > >> > To unsubscribe, visit link above, or email
> > >> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> > >> >
> > >> _______________________________________________
> > >> ffmpeg-devel mailing list
> > >> ffmpeg-devel@ffmpeg.org
> > >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >>
> > >> To unsubscribe, visit link above, or email
> > >> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> > >>
> > >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> >
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [FFmpeg-devel] avfilter/adelay - interactive commands
2022-01-18 17:58 ` deiwo deiwo
@ 2022-01-18 18:25 ` Paul B Mahol
0 siblings, 0 replies; 7+ messages in thread
From: Paul B Mahol @ 2022-01-18 18:25 UTC (permalink / raw)
To: FFmpeg development discussions and patches
On Tue, Jan 18, 2022 at 6:58 PM deiwo deiwo <deiwo101@gmail.com> wrote:
> Yes, I am aware of that fact. The changes are more proof of concept than
> anything else.
> What is missing is also proper command parsing, because the numbers can
> have suffixes defining their resolution as is in the config_input()
> function, where for each channel a different delay can be specified.
> In that case the given functionality can be taken out to separate function
> to be used by the config_input() and by the process_command().
> I can implement the missing pieces if you decide to move forward with these
> changes.
>
If patch is good, and filter does not crash it will be applied..
>
> ut 18. 1. 2022 o 18:38 Paul B Mahol <onemda@gmail.com> napísal(a):
>
> > On Tue, Jan 18, 2022 at 6:10 PM deiwo deiwo <deiwo101@gmail.com> wrote:
> >
> > > Hi,
> > > I have created a proof of concept. Please check if it makes sense and
> > has a
> > > potential to get merged.
> > > I did not know whether it would make sense to send it as a patch, so
> for
> > > now a pastebin link:
> > > https://pastebin.com/nAxRj4C9
> >
> >
> > Delays can be different for each channel.
> >
> >
> >
> > >
> > >
> > > Thanks,
> > > David Lacko
> > >
> > > ut 18. 1. 2022 o 10:09 deiwo deiwo <deiwo101@gmail.com> napísal(a):
> > >
> > > > Similar to how one can change volume in the volume filter when there
> > is a
> > > > zeromq filter preceding the volume filter, then it's possible to send
> > > > zeromq commands to the volume filter and change the volume
> dynamically
> > > > (while the ffmpeg is running).
> > > > In the case of adelay filter the delay could be changed dynamically,
> > when
> > > > the user would increase the delay, additional silence would be added
> > and
> > > > the sample buffer would increase, and when the user would decrease
> the
> > > > delay some samples would be skipped in the sample buffer and the
> buffer
> > > > size would decrease.
> > > >
> > > > The usage for this would be beneficial for live streams, for example
> > when
> > > > changing the delay of an audio channel requires complete restart of
> the
> > > > ffmpeg.
> > > >
> > > > ut 18. 1. 2022 o 9:22 Paul B Mahol <onemda@gmail.com> napísal(a):
> > > >
> > > >> On Mon, Jan 17, 2022 at 11:02 PM deiwo deiwo <deiwo101@gmail.com>
> > > wrote:
> > > >>
> > > >> > Hello,
> > > >> > I would like to ask if it makes sense to implement ZeroMQ
> > interactive
> > > >> > commands for the adelay filter, from the performance and memory
> > point
> > > of
> > > >> > view.
> > > >> > If it does make sense then is it possible to malloc/free/realloc
> > > memory
> > > >> > within the command processing function? Can it cause noticeable
> > delays
> > > >> in
> > > >> > the stream outputs?
> > > >> >
> > > >> > I am new to the ffmpeg development so I am sorry if this kind of
> > > >> question
> > > >> > does not belong to this mailing list.
> > > >> >
> > > >> >
> > > >> I fail to see how that would work. Please elaborate your idea.
> > > >>
> > > >>
> > > >>
> > > >> > Thanks for the response,
> > > >> > David L
> > > >> > _______________________________________________
> > > >> > ffmpeg-devel mailing list
> > > >> > ffmpeg-devel@ffmpeg.org
> > > >> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > >> >
> > > >> > To unsubscribe, visit link above, or email
> > > >> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> > > >> >
> > > >> _______________________________________________
> > > >> ffmpeg-devel mailing list
> > > >> ffmpeg-devel@ffmpeg.org
> > > >> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > > >>
> > > >> To unsubscribe, visit link above, or email
> > > >> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> > > >>
> > > >
> > > _______________________________________________
> > > ffmpeg-devel mailing list
> > > ffmpeg-devel@ffmpeg.org
> > > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> > >
> > > To unsubscribe, visit link above, or email
> > > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> > >
> > _______________________________________________
> > ffmpeg-devel mailing list
> > ffmpeg-devel@ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
> >
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-01-18 18:25 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-01-17 22:02 [FFmpeg-devel] avfilter/adelay - interactive commands deiwo deiwo
2022-01-18 8:23 ` Paul B Mahol
2022-01-18 9:09 ` deiwo deiwo
2022-01-18 17:10 ` deiwo deiwo
2022-01-18 17:38 ` Paul B Mahol
2022-01-18 17:58 ` deiwo deiwo
2022-01-18 18:25 ` Paul B Mahol
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
This inbox may be cloned and mirrored by anyone:
git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
ffmpegdev@gitmailbox.com
public-inbox-index ffmpegdev
Example config snippet for mirrors.
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git