Opened 2 years ago
Closed 2 years ago
#9922 closed defect (invalid)
unexpected sample format of mp3
Reported by: | Mia Sia | Owned by: | |
---|---|---|---|
Priority: | normal | Component: | undetermined |
Version: | git-master | Keywords: | |
Cc: | Mia Sia | Blocked By: | |
Blocking: | Reproduced by developer: | no | |
Analyzed by developer: | no |
Description
Summary of the bug:
How to reproduce:
PS C:\Users\user\Downloads> ffmpeg -i .\in.wav -sample_fmt s32p -c:a libmp3lame out.mp3 ffmpeg version 2022-05-08-git-f77ac5131c-full_build-www.gyan.dev Copyright (c) 2000-2022 the FFmpeg developers built with gcc 11.3.0 (Rev1, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enabled --enable-libsoxr --enable-chromaprint libavutil 57. 24.101 / 57. 24.101 libavcodec 59. 27.100 / 59. 27.100 libavformat 59. 23.100 / 59. 23.100 libavdevice 59. 6.100 / 59. 6.100 libavfilter 8. 38.100 / 8. 38.100 libswscale 6. 6.100 / 6. 6.100 libswresample 4. 6.100 / 4. 6.100 libpostproc 56. 5.100 / 56. 5.100 Guessed Channel Layout for Input Stream #0.0 : stereo Input #0, wav, from '.\in.wav': Metadata: encoder : Lavf59.23.100 Duration: 00:00:10.00, bitrate: 1536 kb/s Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 48000 Hz, stereo, s16, 1536 kb/s File 'out.mp3' already exists. Overwrite? [y/N] y Stream mapping: Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame)) Press [q] to stop, [?] for help Output #0, mp3, to 'out.mp3': Metadata: TSSE : Lavf59.23.100 Stream #0:0: Audio: mp3, 48000 Hz, stereo, '''s32p''' Metadata: encoder : Lavc59.27.100 libmp3lame size= 157kB time=00:00:10.00 bitrate= 128.5kbits/s speed=33.3x video:0kB audio:157kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.147653% ---- PS C:\Users\user\Downloads> ffprobe -i out.mp3 ffprobe version 2022-05-08-git-f77ac5131c-full_build-www.gyan.dev Copyright (c) 2007-2022 the FFmpeg developers built with gcc 11.3.0 (Rev1, Built by MSYS2 project) configuration: --enable-gpl --enable-version3 --enable-static --disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv --enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma --enable-libsnappy --enable-zlib --enable-librist --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth --enable-libbluray --enable-libcaca --enable-sdl2 --enable-libdav1d --enable-libdavs2 --enable-libuavs3d --enable-libzvbi --enable-librav1e --enable-libsvtav1 --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs2 --enable-libxvid --enable-libaom --enable-libjxl --enable-libopenjpeg --enable-libvpx --enable-mediafoundation --enable-libass --enable-frei0r --enable-libfreetype --enable-libfribidi --enable-liblensfun --enable-libvidstab --enable-libvmaf --enable-libzimg --enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec --enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-libshaderc --enable-vulkan --enable-libplacebo --enable-opencl --enable-libcdio --enable-libgme --enable-libmodplug --enable-libopenmpt --enable-libopencore-amrwb --enable-libmp3lame --enable-libshine --enable-libtheora --enable-libtwolame --enable-libvo-amrwbenc --enable-libilbc --enable-libgsm --enable-libopencore-amrnb --enable-libopus --enable-libspeex --enable-libvorbis --enable-ladspa --enable-libbs2b --enable-libflite --enable-libmysofa --enable-librubberband --enable-libsoxr --enable-chromaprint libavutil 57. 24.101 / 57. 24.101 libavcodec 59. 27.100 / 59. 27.100 libavformat 59. 23.100 / 59. 23.100 libavdevice 59. 6.100 / 59. 6.100 libavfilter 8. 38.100 / 8. 38.100 libswscale 6. 6.100 / 6. 6.100 libswresample 4. 6.100 / 4. 6.100 libpostproc 56. 5.100 / 56. 5.100 Input #0, mp3, from 'out.mp3': Metadata: encoder : Lavf59.23.100 Duration: 00:00:10.03, start: 0.023021, bitrate: 128 kb/s Stream #0:0: Audio: mp3, 48000 Hz, stereo, '''fltp''', 128 kb/s Metadata: encoder : Lavc59.27
Attachments (1)
Change History (2)
by , 2 years ago
comment:1 by , 2 years ago
Component: | avformat → undetermined |
---|---|
Keywords: | libmp3lame removed |
Resolution: | → invalid |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
This is just how FFmpeg works: You cannot choose the sample format a particular decoder returns, you have to check what it returns. In the past, the sample formats some decoders returned changed (without a version bump) and for a given stream the sample format may change because of compile time options.
Decoding to float is faster on many modern platforms, the mp3 decoder therefore outputs floats.
libmp3lame accepts different input sample formats, some of them certainly faster than others.