Dynamic of audio samples

As Peder says, you must first create the three directories where you put the script (wav-tmp, wav-lv2, wav-norm), put your files to process in wav-tmp.
After processing, you will find in wav-lv2 the files compressed via the lv2 plugins, in wav-norm these files after lv2 compression and normalization with sox.

Hi @lherg,

I created 3 folders:

~$ mkdir ./wav-tmp
~$ mkdir ./wav-lv2
~$ mkdir ./wav-norm

I see these 3 folders present in /home, OK.

In the “wav-tmp” folder I put 3 .wav files:

:~/wav-tmp$ ls
B0.wav C1.wav D1.wav

The “wav-lv2” and “wav-norm” folders that I created, however, are empty for now.

In the script there are these paths:
REP_IN=./wav-tmp
REP_LV2=./wav-lv2
REP_NORM=./wav-norm

Now, I run your script, which I saved in a text file with the name “test”:

:~$ ./test
Conversion de: ./wav-tmp/B0.wav
Vers: ./wav-norm/B0.wav.
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x55e034af0f00] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/B0.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
[AVFilterGraph @ 0x55e034b395c0] No option name near 'http\://calf.sourceforge.net/plugins/Compressor:c=  bypass=0.000000|  level_in=1.000000|  threshold=0.125000|  ratio=6.000000|  attack=0.000000|  release=250.000000|  makeup=1.000000|  knee=2.828430|  detection=0.000000|  stereo_link=0.000000|  mix=1.000000'
[AVFilterGraph @ 0x55e034b395c0] Error parsing a filter description around: 
[AVFilterGraph @ 0x55e034b395c0] Error parsing filterchain 'lv2=http\\://calf.sourceforge.net/plugins/Compressor:c=  bypass=0.000000|  level_in=1.000000|  threshold=0.125000|  ratio=6.000000|  attack=0.000000|  release=250.000000|  makeup=1.000000|  knee=2.828430|  detection=0.000000|  stereo_link=0.000000|  mix=1.000000' around: 
[aost#0:0/pcm_s16le @ 0x55e034b38500] Error initializing a simple filtergraph
Error opening output file ./wav-lv2/B0.wav.
Error opening output files: Invalid argument
sox FAIL formats: can't open input file `./wav-lv2/B0.wav': No such file or directory
Conversion de: ./wav-tmp/C1.wav
Vers: ./wav-norm/C1.wav.
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x55d7a47f4f00] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/C1.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
[AVFilterGraph @ 0x55d7a483d5c0] No option name near 'http\://calf.sourceforge.net/plugins/Compressor:c=  bypass=0.000000|  level_in=1.000000|  threshold=0.125000|  ratio=6.000000|  attack=0.000000|  release=250.000000|  makeup=1.000000|  knee=2.828430|  detection=0.000000|  stereo_link=0.000000|  mix=1.000000'
[AVFilterGraph @ 0x55d7a483d5c0] Error parsing a filter description around: 
[AVFilterGraph @ 0x55d7a483d5c0] Error parsing filterchain 'lv2=http\\://calf.sourceforge.net/plugins/Compressor:c=  bypass=0.000000|  level_in=1.000000|  threshold=0.125000|  ratio=6.000000|  attack=0.000000|  release=250.000000|  makeup=1.000000|  knee=2.828430|  detection=0.000000|  stereo_link=0.000000|  mix=1.000000' around: 
[aost#0:0/pcm_s16le @ 0x55d7a483c500] Error initializing a simple filtergraph
Error opening output file ./wav-lv2/C1.wav.
Error opening output files: Invalid argument
sox FAIL formats: can't open input file `./wav-lv2/C1.wav': No such file or directory
Conversion de: ./wav-tmp/D1.wav
Vers: ./wav-norm/D1.wav.
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x5578cf2cef00] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/D1.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
[AVFilterGraph @ 0x5578cf3175c0] No option name near 'http\://calf.sourceforge.net/plugins/Compressor:c=  bypass=0.000000|  level_in=1.000000|  threshold=0.125000|  ratio=6.000000|  attack=0.000000|  release=250.000000|  makeup=1.000000|  knee=2.828430|  detection=0.000000|  stereo_link=0.000000|  mix=1.000000'
[AVFilterGraph @ 0x5578cf3175c0] Error parsing a filter description around: 
[AVFilterGraph @ 0x5578cf3175c0] Error parsing filterchain 'lv2=http\\://calf.sourceforge.net/plugins/Compressor:c=  bypass=0.000000|  level_in=1.000000|  threshold=0.125000|  ratio=6.000000|  attack=0.000000|  release=250.000000|  makeup=1.000000|  knee=2.828430|  detection=0.000000|  stereo_link=0.000000|  mix=1.000000' around: 
[aost#0:0/pcm_s16le @ 0x5578cf316500] Error initializing a simple filtergraph
Error opening output file ./wav-lv2/D1.wav.
Error opening output files: Invalid argument
sox FAIL formats: can't open input file `./wav-lv2/D1.wav': No such file or directory

Am I doing something wrong?
a.

Try using only three \ in after http, instead of the four.
Or maybe even just two.

The different number of \ in the errors “No option name near 'http\://calf.sourceforge.net…” and
“Error parsing filterchain 'lv2=http\\://calf.sourceforge.net…” suggests that the escaping has left stray backslashes around in the actual command that’s been run.

I tried, it doesn’t change, the same errors remain.
a.

No idea then.

Maybe try lherg’s built-in ffmpeg acompressor script instead, to avoid the external lv2 plugin hassle.

In the fmpeg documentation https://ffmpeg.org/ffmpeg-filters.html#toc-lv2 they don’t have exactly the same syntax:
ffmpeg -y -i $filename -af "lv2=p=http\\://calf.sourceforge.net/plugins/Compressor:c=

It works for me both ways with or without the p.

Afterwards I have no more ideas either. try with acompressor.

I don’t have the same version off mmpeg:
ffmpeg version 4.4.2-0ubuntu0.22.04.1 Copyright (c) 2000-2021 the FFmpeg developers
built with gcc 11 (Ubuntu 11.2.0-19ubuntu1)
configuration: --prefix=/usr --extra-version=0ubuntu0.22.04.1 --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl --disable-stripping --enable-gnutls --enable-ladspa --enable-libaom --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libcdio --enable-libcodec2 --enable-libdav1d --enable-libflite --enable-libfontconfig --enable-libfreetype --enable-libfribidi --enable-libgme --enable-libgsm --enable-libjack --enable-libmp3lame --enable-libmysofa --enable-libopenjpeg --enable-libopenmpt --enable-libopus --enable-libpulse --enable-librabbitmq --enable-librubberband --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libsrt --enable-libssh --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvorbis --enable-libvpx --enable-libwebp --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzimg --enable-libzmq --enable-libzvbi --enable-lv2 --enable-omx --enable-openal --enable-opencl --enable-opengl --enable-sdl2 --enable-pocketsphinx --enable-librsvg --enable-libmfx --enable-libdc1394 --enable-libdrm --enable-libiec61883 --enable-chromaprint --enable-frei0r --enable-libx264 --enable-shared
libavutil 56. 70.100 / 56. 70.100
libavcodec 58.134.100 / 58.134.100
libavformat 58. 76.100 / 58. 76.100
libavdevice 58. 13.100 / 58. 13.100
libavfilter 7.110.100 / 7.110.100
libswscale 5. 9.100 / 5. 9.100
libswresample 3. 9.100 / 3. 9.100
libpostproc 55. 9.100 / 55. 9.100

I think I see the problem.
Looking at the ffmpeg documentation it’s
lv2=p=http\\\\://calf.sourceforge.net/plugins/Vinyl:c=drone=0.2|aging=0.5
with “:c=drone=…”
But the way you wrote it, with the code indentation, it appears as

lv2=http\\\\://calf.sourceforge.net/plugins/Compressor:c=\
  bypass=0.000000|

so the spaces in front of “bypass” and the other variables makes the expanded, running, code look like
lv2=http\\://calf.sourceforge.net/plugins/Compressor:c= bypass=0.000000| level_in
and I think the “:c= bypass=…” makes ffmpeg complain, since it sees a c equal to two spaces and not equal to bypass=…

So unless ffmpeg is actually able to cope with all the extra spaces and there’s something else going on this should work a bit better

#!/bin/bash
REP_IN=./wav-tmp
REP_LV2=./wav-lv2
REP_NORM=./wav-norm

for filename in $REP_IN/*.wav; do
  echo "Conversion de: $filename"
  fbname=$(basename "$filename")
  echo "Vers: $REP_NORM/$fbname".

  #LV2 Calf compressor
  ffmpeg -y -i $filename \
-af "lv2=http\\\\://calf.sourceforge.net/plugins/Compressor:c=\
bypass=0.000000|\
level_in=1.000000|\
threshold=0.125000|\
ratio=6.000000|\
attack=0.000000|\
release=250.000000|\
makeup=1.000000|\
knee=2.828430|\
detection=0.000000|\
stereo_link=0.000000|\
mix=1.000000" $REP_LV2/$fbname

  #Sox norm -3dB
  sox $REP_LV2/$fbname $REP_NORM/$fbname norm -3
done
1 Like

Hi @peder ,
I saved your new script as “test_02”, here you can see where it is:

a@a:~$ find  -name test_02
./test_02

These are the 3 directories I created:

a@a:~$ find ./ -type d -name wav-tmp 
./wav-tmp
a@a:~$ find ./ -type d -name wav-lv2
./wav-lv2
a@a:~$ find ./ -type d -name wav-norm
./wav-norm

As you can see, the 4 paths are correct.

In the “wav-tmp” folder there are these 3 audio files:

a@a:~$ cd wav-tmp
a@a:~/wav-tmp$ ls
B0.wav  C1.wav  D1.wav
a@a:~/wav-tmp$

Now I run your script:

a@a:~$ ./test_02
Conversion de: ./wav-tmp/B0.wav
Vers: ./wav-norm/B0.wav.
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x55a6d4026f00] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/B0.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
[AVFilterGraph @ 0x55a6d406f680] No option name near 'http\://calf.sourceforge.net/plugins/Compressor:c=bypass=0.000000|level_in=1.000000|threshold=0.125000|ratio=6.000000|attack=0.000000|release=250.000000|makeup=1.000000|knee=2.828430|detection=0.000000|stereo_link=0.000000|mix=1.000000'
[AVFilterGraph @ 0x55a6d406f680] Error parsing a filter description around: 
[AVFilterGraph @ 0x55a6d406f680] Error parsing filterchain 'lv2=http\\://calf.sourceforge.net/plugins/Compressor:c=bypass=0.000000|level_in=1.000000|threshold=0.125000|ratio=6.000000|attack=0.000000|release=250.000000|makeup=1.000000|knee=2.828430|detection=0.000000|stereo_link=0.000000|mix=1.000000' around: 
[aost#0:0/pcm_s16le @ 0x55a6d406e600] Error initializing a simple filtergraph
Error opening output file ./wav-lv2/B0.wav.
Error opening output files: Invalid argument
sox FAIL formats: can't open input file `./wav-lv2/B0.wav': No such file or directory
Conversion de: ./wav-tmp/C1.wav
Vers: ./wav-norm/C1.wav.
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x5600a9d3df00] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/C1.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
[AVFilterGraph @ 0x5600a9d86680] No option name near 'http\://calf.sourceforge.net/plugins/Compressor:c=bypass=0.000000|level_in=1.000000|threshold=0.125000|ratio=6.000000|attack=0.000000|release=250.000000|makeup=1.000000|knee=2.828430|detection=0.000000|stereo_link=0.000000|mix=1.000000'
[AVFilterGraph @ 0x5600a9d86680] Error parsing a filter description around: 
[AVFilterGraph @ 0x5600a9d86680] Error parsing filterchain 'lv2=http\\://calf.sourceforge.net/plugins/Compressor:c=bypass=0.000000|level_in=1.000000|threshold=0.125000|ratio=6.000000|attack=0.000000|release=250.000000|makeup=1.000000|knee=2.828430|detection=0.000000|stereo_link=0.000000|mix=1.000000' around: 
[aost#0:0/pcm_s16le @ 0x5600a9d85600] Error initializing a simple filtergraph
Error opening output file ./wav-lv2/C1.wav.
Error opening output files: Invalid argument
sox FAIL formats: can't open input file `./wav-lv2/C1.wav': No such file or directory
Conversion de: ./wav-tmp/D1.wav
Vers: ./wav-norm/D1.wav.
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x5577bb75cf00] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/D1.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
[AVFilterGraph @ 0x5577bb7a5680] No option name near 'http\://calf.sourceforge.net/plugins/Compressor:c=bypass=0.000000|level_in=1.000000|threshold=0.125000|ratio=6.000000|attack=0.000000|release=250.000000|makeup=1.000000|knee=2.828430|detection=0.000000|stereo_link=0.000000|mix=1.000000'
[AVFilterGraph @ 0x5577bb7a5680] Error parsing a filter description around: 
[AVFilterGraph @ 0x5577bb7a5680] Error parsing filterchain 'lv2=http\\://calf.sourceforge.net/plugins/Compressor:c=bypass=0.000000|level_in=1.000000|threshold=0.125000|ratio=6.000000|attack=0.000000|release=250.000000|makeup=1.000000|knee=2.828430|detection=0.000000|stereo_link=0.000000|mix=1.000000' around: 
[aost#0:0/pcm_s16le @ 0x5577bb7a4600] Error initializing a simple filtergraph
Error opening output file ./wav-lv2/D1.wav.
Error opening output files: Invalid argument
sox FAIL formats: can't open input file `./wav-lv2/D1.wav': No such file or directory
a@a:~$

This is what I did, but I’m probably still doing something wrong.
Thank you,
a.

EDIT:
If it helps, this is my version of ffmpeg:

a@a:~$ ffmpeg -v
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
Missing argument for option 'v'.
Error splitting the argument list: Invalid argument
a@a:~$

My version works fine here; maybe your ffmpeg isn’t compiled with LV2 support.
What does ffmpeg -v warning -filters| grep lv2 say?

It should be …C lv2 N->A Apply LV2 effect and if it doesn’t then you won’t be able to use LV2 plugins with ffmpeg and have to do with the built in acompressor.

Yeah, when I run a non-lv2 ffmpeg I too get the
“No option name near 'http\://calf.sourceforge.net/plugins/Compressor:c=bypass=0.000000…”
error

Nothing happens, it gives no result.

At the beginning, when @lherg wrote to me:

PS: The lv2/ffmpeg solution will work if you build yourself ffmeg with --enable-lv2

then I had tried rebuilding ffmpeg from source with the option –enable-lv2, but it was giving me errors, so I had given up.
For this reason I asked him how his script should be modified to use acompressor (which I have) instead of lv2, but I don’t know yet…

I will try again to rebuild ffmpg from source with that option, being more careful.

Thank you,
a.

While I like ffmpeg, I use sox to batch process audio samples sets (e.g avldrums). Notably sox is pretty good at automatically striping silence, and sox’s built in compander is decent (and avoids issues that calf’s DSP has). For the case at hand, sox seems the more appropriate tool. It is a lot easier to use than ffmpeg and its CLI does not change every other version, YMMV.

1 Like

He posted the acompressor version early on in this topic :
'Dynamic of audio samples - #12 by lherg

I did not see it!
Using that script, everything works… :slight_smile:

:~$ ./test_03
Convert from: ./wav-tmp/B0.wav
To: ./wav-norm/B0.wav
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x55b33b142ec0] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/B0.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s24le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to './wav-lv2/B0.wav':
  Metadata:
    ISFT            : Lavf60.16.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc60.31.102 pcm_s16le
[out#0/wav @ 0x55b33b189540] video:0kB audio:8504kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000896%
size=    8504kB time=00:00:49.34 bitrate=1411.7kbits/s speed= 302x    
Convert from: ./wav-tmp/C1.wav
To: ./wav-norm/C1.wav
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x56170bf5aec0] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/C1.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s24le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to './wav-lv2/C1.wav':
  Metadata:
    ISFT            : Lavf60.16.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc60.31.102 pcm_s16le
[out#0/wav @ 0x56170bfa1540] video:0kB audio:8504kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000896%
size=    8504kB time=00:00:49.34 bitrate=1411.7kbits/s speed= 326x    
Convert from: ./wav-tmp/D1.wav
To: ./wav-norm/D1.wav
ffmpeg version 6.1.1 Copyright (c) 2000-2023 the FFmpeg developers
  built with gcc 11 (Ubuntu 11.4.0-1ubuntu1~22.04)
  configuration: 
  libavutil      58. 29.100 / 58. 29.100
  libavcodec     60. 31.102 / 60. 31.102
  libavformat    60. 16.100 / 60. 16.100
  libavdevice    60.  3.100 / 60.  3.100
  libavfilter     9. 12.100 /  9. 12.100
  libswscale      7.  5.100 /  7.  5.100
  libswresample   4. 12.100 /  4. 12.100
[aist#0:0/pcm_s24le @ 0x55778b762ec0] Guessed Channel Layout: stereo
Input #0, wav, from './wav-tmp/D1.wav':
  Duration: 00:00:49.36, bitrate: 2116 kb/s
  Stream #0:0: Audio: pcm_s24le ([1][0][0][0] / 0x0001), 44100 Hz, 2 channels, s32 (24 bit), 2116 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s24le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, wav, to './wav-lv2/D1.wav':
  Metadata:
    ISFT            : Lavf60.16.100
  Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc60.31.102 pcm_s16le
[out#0/wav @ 0x55778b7a9540] video:0kB audio:8504kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000896%
size=    8504kB time=00:00:49.34 bitrate=1411.7kbits/s speed= 322x

Thanks @peder and @lherg.
Now I will listen to the results with and without compression.
a.

Glad you achieved your goals, if the ffmpeg compression solution doesn’t suit you, you can look up how to compress audio with sox like Robin suggests. I didn’t know this was possible, but it is possible (Man Sox look for the compand parameter) and therefore probably a simpler solution. I found this post which is interesting:

The ratio seems a little complicated to manage but hey…

Afterwards, this is the question we must ask ourselves in these cases: is it not better to redo our recordings if they require too much processing? Sometimes it’s not possible…

If you need to correct the dynamics of your takes it is probably because they are not have been uniform: The position of the microphone has changed, the musician is no longer in shape :slight_smile: etc… Dynamics processing problems will correct the most obvious problems but you will add others:pumping, different background noises between one note and the others… Sometimes it is better to start again from the beginning. The better your tacks, the better your results will be.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.