[FFmpeg-trac] #6570(avfilter:new): loudnorm filter changes sample rate

FFmpeg trac at avcodec.org
Sun Aug 6 22:15:29 EEST 2017


#6570: loudnorm filter changes sample rate
----------------------------------+--------------------------------------
             Reporter:  slhck     |                     Type:  defect
               Status:  new       |                 Priority:  normal
            Component:  avfilter  |                  Version:  git-master
             Keywords:  loudnorm  |               Blocked By:
             Blocking:            |  Reproduced by developer:  0
Analyzed by developer:  0         |
----------------------------------+--------------------------------------
 The `loudnorm` filter changes the sample rate of the input output stream,
 sometimes doubling it, sometimes it will be even higher.

 The desired behavior would be that the sample rate remains the same.

 {{{
 ./ffmpeg -f lavfi -i anullsrc=r=48000 -filter:a loudnorm -t 1 out.wav
 ffmpeg version N-86910-g797c232-tessus Copyright (c) 2000-2017 the FFmpeg
 developers
   built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
   configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-
 version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
 --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-
 libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-
 libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
 --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
 --enable-libzmq --enable-libzvbi --enable-version3 --disable-ffplay
 --disable-indev=qtkit
   libavutil      55. 69.100 / 55. 69.100
   libavcodec     57.102.100 / 57.102.100
   libavformat    57. 76.100 / 57. 76.100
   libavdevice    57.  7.100 / 57.  7.100
   libavfilter     6. 95.100 /  6. 95.100
   libswscale      4.  7.101 /  4.  7.101
   libswresample   2.  8.100 /  2.  8.100
   libpostproc    54.  6.100 / 54.  6.100
 Input #0, lavfi, from 'anullsrc=r=48000':
   Duration: N/A, start: 0.000000, bitrate: 768 kb/s
     Stream #0:0: Audio: pcm_u8, 48000 Hz, stereo, u8, 768 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_u8 (native) -> pcm_s16le (native))
 Press [q] to stop, [?] for help
 Output #0, wav, to 'out.wav':
   Metadata:
     ISFT            : Lavf57.76.100
     Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 192000 Hz,
 stereo, s16, 6144 kb/s
     Metadata:
       encoder         : Lavc57.102.100 pcm_s16le
 size=     750kB time=00:00:01.00 bitrate=6144.8kbits/s speed=6.65x
 video:0kB audio:750kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 0.013281%
 }}}

 {{{
 ./ffmpeg -f lavfi -i anullsrc=r=44100 -filter:a loudnorm -t 1 -c:a aac
 out.m4a
 ffmpeg version N-86910-g797c232-tessus Copyright (c) 2000-2017 the FFmpeg
 developers
   built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
   configuration: --cc=/usr/bin/clang --prefix=/opt/ffmpeg --extra-
 version=tessus --enable-avisynth --enable-fontconfig --enable-gpl
 --enable-libass --enable-libbluray --enable-libfreetype --enable-libgsm
 --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb
 --enable-libopencore-amrwb --enable-libopus --enable-libsnappy --enable-
 libsoxr --enable-libspeex --enable-libtheora --enable-libvidstab --enable-
 libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack
 --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid
 --enable-libzmq --enable-libzvbi --enable-version3 --disable-ffplay
 --disable-indev=qtkit
   libavutil      55. 69.100 / 55. 69.100
   libavcodec     57.102.100 / 57.102.100
   libavformat    57. 76.100 / 57. 76.100
   libavdevice    57.  7.100 / 57.  7.100
   libavfilter     6. 95.100 /  6. 95.100
   libswscale      4.  7.101 /  4.  7.101
   libswresample   2.  8.100 /  2.  8.100
   libpostproc    54.  6.100 / 54.  6.100
 Input #0, lavfi, from 'anullsrc=r=44100':
   Duration: N/A, start: 0.000000, bitrate: 705 kb/s
     Stream #0:0: Audio: pcm_u8, 44100 Hz, stereo, u8, 705 kb/s
 Stream mapping:
   Stream #0:0 -> #0:0 (pcm_u8 (native) -> aac (native))
 Press [q] to stop, [?] for help
 Output #0, ipod, to 'out.m4a':
   Metadata:
     encoder         : Lavf57.76.100
     Stream #0:0: Audio: aac (LC) (mp4a / 0x6134706D), 96000 Hz, stereo,
 fltp, 128 kb/s
     Metadata:
       encoder         : Lavc57.102.100 aac
 size=       2kB time=00:00:01.00 bitrate=  13.7kbits/s speed=6.96x
 video:0kB audio:1kB subtitle:0kB other streams:0kB global headers:0kB
 muxing overhead: 192.006805%
 [aac @ 0x7f8452003600] Qavg: 65030.441
 }}}

 This has also been observed by a user here:
 https://superuser.com/questions/1218471/

--
Ticket URL: <https://trac.ffmpeg.org/ticket/6570>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list