Any chance of adding FFMPeg's 'atempo' filter ?
I'm still learning Cin, so if this filter is already in place, then I apologize. FFMpeg has a nice audio "filter" called "atempo". https://ffmpeg.org/ffmpeg-filters.html#atempo This filter is already in other projects, such as Kdenlive and Shotcut. What it does is, you can speed up audio, and will adjust the pitch so that the audio sounds more normal, but faster. It does not sound like "Alvin and the Chipmunks" :) This behavior can be seen when you watch a YT video, click the gear icon, and select a speed greater or less than 1. I'm attaching the FFMpeg sample code that I had modified/played with years ago when I was learning it. I 'tweaked' it today, so it will compile in Ubuntu 21.04 using a c++ compiler. I used Qt. There's depreciation warnings and this certainly isn't production code. But it should help others to grasp the concepts to implement it. My Qt pro file has this: TEMPLATE = app CONFIG += console c++11 CONFIG -= app_bundle CONFIG -= qt SOURCES += main.cpp LIBS += -lavcodec -lavformat -lavutil -lswresample -lasound -lavfilter -lasound I put an Option 1 and Option 2 in the main.cpp file. Option 1 simple writes your infile - no modifications to out.raw. Option 2 applies the atempo filter. So comment and rebuild accordingly. It should only take 2 seconds or so to compile. I'm hoping, that perhaps someday, I can simply drop an effect onto my timeline so that I can speed up video/audio in one go and have nicer sounding audio for my needs. Thank you in advance for your consideration.
Gorge, F_atempo is the audio plugin by ffmpeg that is already available in Cinelerra. If you have trouble locating it in the Resources Audio Effects folder let us know. I checked and it is in the manual too but only the one liner so I will "borrow" your definition (so thanks for that!) Still reading the rest of your email to try to understand what you are doing. P.S. I like Alvin and the Chipmunks. On Sat, Jun 19, 2021 at 8:38 AM gorge rankin via Cin < [email protected]> wrote:
I'm still learning Cin, so if this filter is already in place, then I apologize.
FFMpeg has a nice audio "filter" called "atempo".
https://ffmpeg.org/ffmpeg-filters.html#atempo
This filter is already in other projects, such as Kdenlive and Shotcut.
What it does is, you can speed up audio, and will adjust the pitch so that the audio sounds more normal, but faster.
It does not sound like "Alvin and the Chipmunks" :)
This behavior can be seen when you watch a YT video, click the gear icon, and select a speed greater or less than 1.
I'm attaching the FFMpeg sample code that I had modified/played with years ago when I was learning it.
I 'tweaked' it today, so it will compile in Ubuntu 21.04 using a c++ compiler. I used Qt. There's depreciation warnings and this certainly isn't production code. But it should help others to grasp the concepts to implement it.
My Qt pro file has this:
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
LIBS += -lavcodec -lavformat -lavutil -lswresample -lasound -lavfilter -lasound
I put an Option 1 and Option 2 in the main.cpp file.
Option 1 simple writes your infile - no modifications to out.raw.
Option 2 applies the atempo filter.
So comment and rebuild accordingly. It should only take 2 seconds or so to compile.
I'm hoping, that perhaps someday, I can simply drop an effect onto my timeline so that I can
speed up video/audio in one go and have nicer sounding audio for my needs.
Thank you in advance for your consideration.
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Gorge, Well, it crashed for me -- guess I should have tested it first. I will try different parameters. On Sat, Jun 19, 2021 at 8:38 AM gorge rankin via Cin < [email protected]> wrote:
I'm still learning Cin, so if this filter is already in place, then I apologize.
FFMpeg has a nice audio "filter" called "atempo".
https://ffmpeg.org/ffmpeg-filters.html#atempo
This filter is already in other projects, such as Kdenlive and Shotcut.
What it does is, you can speed up audio, and will adjust the pitch so that the audio sounds more normal, but faster.
It does not sound like "Alvin and the Chipmunks" :)
This behavior can be seen when you watch a YT video, click the gear icon, and select a speed greater or less than 1.
I'm attaching the FFMpeg sample code that I had modified/played with years ago when I was learning it.
I 'tweaked' it today, so it will compile in Ubuntu 21.04 using a c++ compiler. I used Qt. There's depreciation warnings and this certainly isn't production code. But it should help others to grasp the concepts to implement it.
My Qt pro file has this:
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
LIBS += -lavcodec -lavformat -lavutil -lswresample -lasound -lavfilter -lasound
I put an Option 1 and Option 2 in the main.cpp file.
Option 1 simple writes your infile - no modifications to out.raw.
Option 2 applies the atempo filter.
So comment and rebuild accordingly. It should only take 2 seconds or so to compile.
I'm hoping, that perhaps someday, I can simply drop an effect onto my timeline so that I can
speed up video/audio in one go and have nicer sounding audio for my needs.
Thank you in advance for your consideration.
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
F_atempo doesn't crash for me, even trying various values. I don't understand how it works though; it doesn't seem to affect the speed of the sound track.
That's odd, it's a tweaked version and my notes from ffmpeg's documentation examples. https://github.com/FFmpeg/FFmpeg/tree/master/doc/examples In the file I do hardcode paths to the input files and output files, you should adjust accordingly. When it runs , a terminal comes up to show you the technical info. But the outfile is created. Then you simply ffplay that outfile. Hope that helps :) Phyllis wrote: Gorge, Well, it crashed for me -- guess I should have tested it first. I will try different parameters. On Sat, Jun 19, 2021 at 12:44 PM Phyllis Smith via Cin < [email protected]> wrote:
Gorge, Well, it crashed for me -- guess I should have tested it first. I will try different parameters.
On Sat, Jun 19, 2021 at 8:38 AM gorge rankin via Cin < [email protected]> wrote:
I'm still learning Cin, so if this filter is already in place, then I apologize.
FFMpeg has a nice audio "filter" called "atempo".
https://ffmpeg.org/ffmpeg-filters.html#atempo
This filter is already in other projects, such as Kdenlive and Shotcut.
What it does is, you can speed up audio, and will adjust the pitch so that the audio sounds more normal, but faster.
It does not sound like "Alvin and the Chipmunks" :)
This behavior can be seen when you watch a YT video, click the gear icon, and select a speed greater or less than 1.
I'm attaching the FFMpeg sample code that I had modified/played with years ago when I was learning it.
I 'tweaked' it today, so it will compile in Ubuntu 21.04 using a c++ compiler. I used Qt. There's depreciation warnings and this certainly isn't production code. But it should help others to grasp the concepts to implement it.
My Qt pro file has this:
TEMPLATE = app
CONFIG += console c++11
CONFIG -= app_bundle
CONFIG -= qt
SOURCES += main.cpp
LIBS += -lavcodec -lavformat -lavutil -lswresample -lasound -lavfilter -lasound
I put an Option 1 and Option 2 in the main.cpp file.
Option 1 simple writes your infile - no modifications to out.raw.
Option 2 applies the atempo filter.
So comment and rebuild accordingly. It should only take 2 seconds or so to compile.
I'm hoping, that perhaps someday, I can simply drop an effect onto my timeline so that I can
speed up video/audio in one go and have nicer sounding audio for my needs.
Thank you in advance for your consideration.
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
-- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Gorge, About crashing: That's odd, it's a tweaked version
Not the main.cpp program but the F_atempo plugin inside of Cinelerra. Andrea is much more expert at testing the ffmpeg plugins and it did not crash for him as stated in his email. I did get the plugin to not crash but I do not know what it is doing.
When it runs , a terminal comes up to show you the technical info. But the outfile is created.
I am still trying to compile the program because I have to put the include <libavcodec/avcodec.h> in the right place. Then I will test it. ...Phyllis
On Saturday, June 19, 2021, Phyllis Smith via Cin < [email protected]> wrote:
Gorge, About crashing:
That's odd, it's a tweaked version
Not the main.cpp program but the F_atempo plugin inside of Cinelerra. Andrea is much more expert at testing the ffmpeg plugins and it did not crash for him as stated in his email. I did get the plugin to not crash but I do not know what it is doing.
random internet search says: The parameter for atempo must be between 0.5 and 2.0. If you want to slow it down even more, you can use the atempo filter more than once. Eg. to slow it down by 4: ffmpeg -i input.mp4 -filter:a "atempo=0.5,atempo=0.5" -vn output.aac https://muzso.hu/2015/04/25/how-to-speed-up-slow-down-an-audio-stream-with-f...
When it runs , a terminal comes up to show you the technical info. But the outfile is created.
I am still trying to compile the program because I have to put the include <libavcodec/avcodec.h> in the right place. Then I will test it. ...Phyllis
On Saturday, June 19, 2021, Andrew Randrianasulu <[email protected]> wrote:
On Saturday, June 19, 2021, Phyllis Smith via Cin < [email protected]> wrote:
Gorge, About crashing:
That's odd, it's a tweaked version
Not the main.cpp program but the F_atempo plugin inside of Cinelerra. Andrea is much more expert at testing the ffmpeg plugins and it did not crash for him as stated in his email. I did get the plugin to not crash but I do not know what it is doing.
random internet search says:
The parameter for atempo must be between 0.5 and 2.0. If you want to slow it down even more, you can use the atempo filter more than once. Eg. to slow it down by 4: ffmpeg -i input.mp4 -filter:a "atempo=0.5,atempo=0.5" -vn output.aac
https://muzso.hu/2015/04/25/how-to-speed-up-slow-down-an- audio-stream-with-ffmpeg
more random internet search unearth those finds: https://patchwork.ffmpeg.org/project/ffmpeg/patch/20171202191342.25358-1-one... adds scaletempo filter, probably not in mainstream due to discussion about how useful or not this new filter might be. for rubberband apparently you need librubberband installed and pass configuration flag to ffmpeg (cingg's build system allow this) ---- Apply time-stretching and pitch-shifting with librubberband. To enable compilation of this filter, you need to configure FFmpeg with --enable-librubberband. ----
When it runs , a terminal comes up to show you the technical info. But the outfile is created.
I am still trying to compile the program because I have to put the include <libavcodec/avcodec.h> in the right place. Then I will test it. ...Phyllis
For what it's worth, here on Ubuntu 21.04 : ldd /usr/bin/ffmpeg |igrep rubber: librubberband.so.2 => /lib/x86_64-linux-gnu/librubberband.so.2 dpkg -l ffmpeg: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-========================-============-================================================================ ii ffmpeg 7:4.3.2-0+deb11u1ubuntu1 amd64 Tools for transcoding, streaming and playing of multimedia files On Sat, Jun 19, 2021 at 4:28 PM Andrew Randrianasulu via Cin < [email protected]> wrote:
On Saturday, June 19, 2021, Andrew Randrianasulu <[email protected]> wrote:
On Saturday, June 19, 2021, Phyllis Smith via Cin < [email protected]> wrote:
Gorge, About crashing:
That's odd, it's a tweaked version
Not the main.cpp program but the F_atempo plugin inside of Cinelerra. Andrea is much more expert at testing the ffmpeg plugins and it did not crash for him as stated in his email. I did get the plugin to not crash but I do not know what it is doing.
random internet search says:
The parameter for atempo must be between 0.5 and 2.0. If you want to slow it down even more, you can use the atempo filter more than once. Eg. to slow it down by 4: ffmpeg -i input.mp4 -filter:a "atempo=0.5,atempo=0.5" -vn output.aac
https://muzso.hu/2015/04/25/how-to-speed-up-slow-down-an-audio-stream-with-f...
more random internet search unearth those finds:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/20171202191342.25358-1-one...
adds scaletempo filter, probably not in mainstream due to discussion about how useful or not this new filter might be.
for rubberband apparently you need librubberband installed and pass configuration flag to ffmpeg (cingg's build system allow this) ---- Apply time-stretching and pitch-shifting with librubberband.
To enable compilation of this filter, you need to configure FFmpeg with --enable-librubberband. ----
When it runs , a terminal comes up to show you the technical info. But the outfile is created.
I am still trying to compile the program because I have to put the include <libavcodec/avcodec.h> in the right place. Then I will test it. ...Phyllis
--
Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
On Saturday, June 19, 2021, gorge rankin via Cin <[email protected]> wrote:
For what it's worth, here on Ubuntu 21.04 :
ldd /usr/bin/ffmpeg |igrep rubber: librubberband.so.2 => /lib/x86_64-linux-gnu/librubberband.so.2
dpkg -l ffmpeg: Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-inst/ trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name Version Architecture Description +++-==============-========================-============-=== ============================================================= ii ffmpeg 7:4.3.2-0+deb11u1ubuntu1 amd64 Tools for transcoding, streaming and playing of multimedia files
then setting those variables before CinGG compilation hopefully will enable rubberband EXTRA_LIBS=" -lrubberband" \ FFMPEG_EXTRA_CFG=" --enable-librubberband" \ you can put any interesting/useful for you switches and libs here....
On Sat, Jun 19, 2021 at 4:28 PM Andrew Randrianasulu via Cin < [email protected]> wrote:
On Saturday, June 19, 2021, Andrew Randrianasulu <[email protected]> wrote:
On Saturday, June 19, 2021, Phyllis Smith via Cin < [email protected]> wrote:
Gorge, About crashing:
That's odd, it's a tweaked version
Not the main.cpp program but the F_atempo plugin inside of Cinelerra. Andrea is much more expert at testing the ffmpeg plugins and it did not crash for him as stated in his email. I did get the plugin to not crash but I do not know what it is doing.
random internet search says:
The parameter for atempo must be between 0.5 and 2.0. If you want to slow it down even more, you can use the atempo filter more than once. Eg. to slow it down by 4: ffmpeg -i input.mp4 -filter:a "atempo=0.5,atempo=0.5" -vn output.aac
https://muzso.hu/2015/04/25/how-to-speed-up-slow-down-an- audio-stream-with-ffmpeg
more random internet search unearth those finds:
https://patchwork.ffmpeg.org/project/ffmpeg/patch/ [email protected]/#21029
adds scaletempo filter, probably not in mainstream due to discussion about how useful or not this new filter might be.
for rubberband apparently you need librubberband installed and pass configuration flag to ffmpeg (cingg's build system allow this) ---- Apply time-stretching and pitch-shifting with librubberband.
To enable compilation of this filter, you need to configure FFmpeg with --enable-librubberband. ----
When it runs , a terminal comes up to show you the technical info. But the outfile is created.
I am still trying to compile the program because I have to put the include <libavcodec/avcodec.h> in the right place. Then I will test it. ...Phyllis
--
Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
Hi all! My variant of speed change without change voice tone: https://peervideo.ru/videos/watch/c4bdfef6-74a9-4799-b5ee-3df90344abf1 -- Ugin
On Sunday, June 20, 2021, preobraz--- via Cin <[email protected]> wrote:
Hi all!
My variant of speed change without change voice tone: https://peervideo.ru/videos/watch/c4bdfef6-74a9-4799-b5ee-3df90344abf1
cool! it uses L_AM Pitchshifter (ladspa plugins?) and built-in speed curve?
-- Ugin -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
OH I just uploaded a YT talking viewer thru compiling it and a demo. OK good to know, I'll delete the YT video. On Sat, Jun 19, 2021 at 3:49 PM Phyllis Smith via Cin < [email protected]> wrote:
Gorge, About crashing:
That's odd, it's a tweaked version
Not the main.cpp program but the F_atempo plugin inside of Cinelerra. Andrea is much more expert at testing the ffmpeg plugins and it did not crash for him as stated in his email. I did get the plugin to not crash but I do not know what it is doing.
When it runs , a terminal comes up to show you the technical info. But the outfile is created.
I am still trying to compile the program because I have to put the include <libavcodec/avcodec.h> in the right place. Then I will test it. ...Phyllis -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
actually, in case anyone is wondering , here is how to build and demo the atempo filter in case you'd like to see it in action. https://www.youtube.com/watch?v=h1QHc0pN8wI YT is still processing, so it might be blurry. give it an hour or two and the 1440 p version should look brilliant. bye for now On Sat, Jun 19, 2021 at 4:14 PM gorge rankin <[email protected]> wrote:
OH I just uploaded a YT talking viewer thru compiling it and a demo. OK good to know, I'll delete the YT video.
On Sat, Jun 19, 2021 at 3:49 PM Phyllis Smith via Cin < [email protected]> wrote:
Gorge, About crashing:
That's odd, it's a tweaked version
Not the main.cpp program but the F_atempo plugin inside of Cinelerra. Andrea is much more expert at testing the ffmpeg plugins and it did not crash for him as stated in his email. I did get the plugin to not crash but I do not know what it is doing.
When it runs , a terminal comes up to show you the technical info. But the outfile is created.
I am still trying to compile the program because I have to put the include <libavcodec/avcodec.h> in the right place. Then I will test it. ...Phyllis -- Cin mailing list [email protected] https://lists.cinelerra-gg.org/mailman/listinfo/cin
participants (6)
-
Andrea paz -
Andrew Randrianasulu -
gorge rankin -
Phyllis Smith -
preobraz@gmail.com -
Stefan de Konink