[FFmpeg-user] Adeclip limited to 16bits ?

Sylvain Leforestier sylvain.leforestier at gmail.com
Thu Oct 14 01:41:47 EEST 2021


Thank you Paul,

It is working perfectly :

Command : ffmpeg -i /home/papa/Matlab/t.wav *-c:a pcm_f32le* -filter:a
''adeclip=m=s:n=500:t=5''  /home/papa/Matlab/tt.wav -y

Giving (extract) the correct stream mapping :
       Duration: 00:03:54.87, bitrate: 2822 kb/s
         Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 44100 Hz,
stereo, flt, 2822 kb/s
     Stream mapping:
       Stream #0:0 -> #0:0 (pcm_f32le (native) -> pcm_f32le (native))
     Press [q] to stop, [?] for help
     Output #0, wav, to '/home/papa/Matlab/tt.wav':
       Metadata:
         ISFT            : Lavf58.29.100
         Stream #0:0: Audio: pcm_f32le ([3][0][0][0] / 0x0003), 44100 Hz,
stereo, flt, 2822 kb/s

Best regards.

Le mer. 13 oct. 2021 à 23:41, Paul B Mahol <onemda at gmail.com> a écrit :

> On Wed, Oct 13, 2021 at 11:31 PM Sylvain Leforestier <
> sylvain.leforestier at gmail.com> wrote:
>
> > Hi every boby,
> > I found pleasant to use ffmpeg to clean my records from old CD using
> Matlab
> > :
> >  *   audiowrite('t.wav',d/2,f,'bitspersample',32);*
> >
> >
> > *    [sta,ret]=system ('ffmpeg -i /home/papa/Matlab/t.wav -filter:a
> > ''adeclip=m=s:n=500:t=5'' /home/papa/Matlab/tt.wav -y');
> > du=audioread('tt.wav')*2;*
> >
> > I first write in floating32 the t.wav (with a factor 1/2 to let some
> > dynamic availability)
> > I use FFMPEG to declip t.wav in tt.wav but here is the issue the output
> is
> > s16 and it refuse to do it in floating format  :
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > *   'ffmpeg version 4.2.4-1ubuntu0.1 Copyright (c) 2000-2020 the FFmpeg
> > developers       built with gcc 9 (Ubuntu 9.3.0-10ubuntu2)
> >  configuration: --prefix=/usr --extra-version=1ubuntu0.1
> > --toolchain=hardened --libdir=/usr/lib/x86_64-linux-gnu
> > --incdir=/usr/include/x86_64-linux-gnu --arch=amd64 --enable-gpl
> > --disable-stripping --enable-avresample --disable-filter=resample
> > --enable-avisynth --enable-gnutls --enable-ladspa --enable-libaom
> > --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca
> > --enable-libcdio --enable-libcodec2 --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-librsvg
> --enable-librubberband
> > --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libspeex
> > --enable-libssh --enable-libtheora --enable-libtwolame
> --enable-libvidstab
> > --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp
> > --enable-libx265 --enable-libxml2 --enable-libxvid --enable-libzmq
> > --enable-libzvbi --enable-lv2 --enable-omx --enable-openal
> --enable-opencl
> > --enable-opengl --enable-sdl2 --enable-libdc1394 --enable-libdrm
> > --enable-libiec61883 --enable-nvenc --enable-chromaprint --enable-frei0r
> > --enable-libx264 --enable-shared       libavutil      56. 31.100 / 56.
> > 31.100       libavcodec     58. 54.100 / 58. 54.100       libavformat
> >  58. 29.100 / 58. 29.100       libavdevice    58.  8.100 / 58.  8.100
> >  libavfilter     7. 57.100 /  7. 57.100       libavresample   4.  0.  0 /
> >  4.  0.  0       libswscale      5.  5.100 /  5.  5.100
>  libswresample
> >   3.  5.100 /  3.  5.100       libpostproc    55.  5.100 / 55.  5.100
> > [0;33mGuessed Channel Layout for Input Stream #0.0 : stereo      [0mInput
> > #0, wav, from '/home/papa/Matlab/t.wav':       Duration: 00:03:54.87,
> > bitrate: 2822 kb/s         Stream #0:0: Audio: pcm_f32le ([3][0][0][0] /
> > 0x0003), 44100 Hz, stereo, flt, 2822 kb/s     Stream mapping:
>  Stream
> > #0:0 -> #0:0 (pcm_f32le (native) -> pcm_s16le (native))     Press [q] to
> > stop, [?] for help     Output #0, wav, to '/home/papa/Matlab/tt.wav':
> >  Metadata:         ISFT            : Lavf58.29.100         Stream #0:0:
> > Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411
> kb/s
> >        Metadata:           encoder         : Lavc58.54.100 pcm_s16le
> >  size=    1024kB time=00:00:06.56 bitrate=1277.2kbits/s speed=13.1x
> >  size=    2048kB time=00:00:12.91 bitrate=1298.9kbits/s speed=12.9x
> >  size=    3328kB time=00:00:19.54 bitrate=1395.2kbits/s speed=  13x
> >  size=    4352kB time=00:00:26.02 bitrate=1369.8kbits/s speed=  13x
> >  size=    5376kB time=00:00:32.66 bitrate=1348.3kbits/s speed=13.1x    *
> >
> > As you can see it maps before the f32le in s16le !
> > It seems (for my understanding) that the adeclip filter is only drawn for
> > 16 bits.
> >
> > My question : is a way to use adeclip in at least 24bits ?
> >
>
> Use different pcm encoder, for example
>
> -c:a pcm_f32le
>
> adeclip works in double floating point number internally.
>
>
>
> >
> > Best regards.
> > _______________________________________________
> > ffmpeg-user mailing list
> > ffmpeg-user at ffmpeg.org
> > https://ffmpeg.org/mailman/listinfo/ffmpeg-user
> >
> > To unsubscribe, visit link above, or email
> > ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
> >
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email
> ffmpeg-user-request at ffmpeg.org with subject "unsubscribe".
>


More information about the ffmpeg-user mailing list