[Cin] Any chance of adding FFMPeg's 'atempo' filter ?

gorge rankin nonoobspam at gmail.com
Sat Jun 19 16:37:52 CEST 2021


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210619/8214ccf2/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: main.cpp
Type: text/x-c++src
Size: 9033 bytes
Desc: not available
URL: <https://lists.cinelerra-gg.org/pipermail/cin/attachments/20210619/8214ccf2/attachment-0001.cpp>


More information about the Cin mailing list