[FFmpeg-user] Question about mp3 bit rate mode
桃源老師
xanadu6291 at dream.jp
Mon Jan 30 18:23:13 EET 2017
In Addition...
> 2017/01/30 11:54 A.M. 桃源老師 <xanadu6291<at>dream.jp> wrote:
>
> Hello ffmpeg experts...
>
> I have question about mp3 bit rate mode.
>
> When I run the following command, the resulting duration.mp3 is VBR. I have confirmed it's bit rate mode with mediainfo, mpg123, and SinkuSuperLite (on Windows).
>
> $ ffmpeg -f lavfi -i sine=d=300 duration.mp3
> ffmpeg version N-83152-gf7e9275 Copyright (c) 2000-2017 the FFmpeg developers
> built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
> configuration: --prefix=/Volumes/ffmpeg_compile --pkg-config-flags=--static --disable-ffserver --enable-gpl --enable-version3 --enable-nonfree --enable-libmp3lame --enable-libfdk-aac --enable-libvo-amrwbenc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvorbis --enable-libspeex --enable-libopus --enable-libgsm --enable-libtwolame --enable-libsoxr --enable-libwavpack --enable-libmodplug --enable-libopenjpeg --enable-libwebp --enable-libtheora --enable-libx264 --enable-libopenh264 --enable-libx265 --enable-libxvid --enable-libvpx --enable-libxavs --enable-libfreetype --enable-fontconfig --enable-libfribidi --enable-libass --enable-libbluray --enable-libvidstab --enable-libschroedinger --enable-libsnappy --enable-libzmq
> libavutil 55. 43.100 / 55. 43.100
> libavcodec 57. 74.100 / 57. 74.100
> libavformat 57. 62.100 / 57. 62.100
> libavdevice 57. 2.100 / 57. 2.100
> libavfilter 6. 69.100 / 6. 69.100
> libswscale 4. 3.101 / 4. 3.101
> libswresample 2. 4.100 / 2. 4.100
> libpostproc 54. 2.100 / 54. 2.100
> Input #0, lavfi, from 'sine=d=300':
> Duration: N/A, start: 0.000000, bitrate: 705 kb/s
> Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
> Output #0, mp3, to 'duration.mp3':
> Metadata:
> TSSE : Lavf57.62.100
> Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, s16p
> Metadata:
> encoder : Lavc57.74.100 libmp3lame
> Stream mapping:
> Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
> Press [q] to stop, [?] for help
> size= 2344kB time=00:05:00.01 bitrate= 64.0kbits/s speed= 128x
> video:0kB audio:2344kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.009457%
>
> And when I run the following command, the resulting duration.mp3 is CBR. Confirmed with same program as above.
>
> $ ffmpeg -f lavfi -i sine=d=300 -write_xing 0 duration.mp3
> ffmpeg version N-83152-gf7e9275 Copyright (c) 2000-2017 the FFmpeg developers
> built with Apple LLVM version 8.0.0 (clang-800.0.42.1)
> configuration: --prefix=/Volumes/ffmpeg_compile --pkg-config-flags=--static --disable-ffserver --enable-gpl --enable-version3 --enable-nonfree --enable-libmp3lame --enable-libfdk-aac --enable-libvo-amrwbenc --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvorbis --enable-libspeex --enable-libopus --enable-libgsm --enable-libtwolame --enable-libsoxr --enable-libwavpack --enable-libmodplug --enable-libopenjpeg --enable-libwebp --enable-libtheora --enable-libx264 --enable-libopenh264 --enable-libx265 --enable-libxvid --enable-libvpx --enable-libxavs --enable-libfreetype --enable-fontconfig --enable-libfribidi --enable-libass --enable-libbluray --enable-libvidstab --enable-libschroedinger --enable-libsnappy --enable-libzmq
> libavutil 55. 43.100 / 55. 43.100
> libavcodec 57. 74.100 / 57. 74.100
> libavformat 57. 62.100 / 57. 62.100
> libavdevice 57. 2.100 / 57. 2.100
> libavfilter 6. 69.100 / 6. 69.100
> libswscale 4. 3.101 / 4. 3.101
> libswresample 2. 4.100 / 2. 4.100
> libpostproc 54. 2.100 / 54. 2.100
> Input #0, lavfi, from 'sine=d=300':
> Duration: N/A, start: 0.000000, bitrate: 705 kb/s
> Stream #0:0: Audio: pcm_s16le, 44100 Hz, mono, s16, 705 kb/s
> File 'duration.mp3' already exists. Overwrite ? [y/N] y
> Output #0, mp3, to 'duration.mp3':
> Metadata:
> TSSE : Lavf57.62.100
> Stream #0:0: Audio: mp3 (libmp3lame), 44100 Hz, mono, s16p
> Metadata:
> encoder : Lavc57.74.100 libmp3lame
> Stream mapping:
> Stream #0:0 -> #0:0 (pcm_s16le (native) -> mp3 (libmp3lame))
> Press [q] to stop, [?] for help
> size= 2344kB time=00:05:00.01 bitrate= 64.0kbits/s speed= 134x
> video:0kB audio:2344kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.001875%
The command which produces VBR mp3 file, "$ ffmpeg -f lavfi -i sine=d=300 duration.mp3"'s duration is 5:43 on Mac and is 5:01 on Windows.
The command which produces CBR mp3 file, "$ ffmpeg -f lavfi -i sine=d=300 -write_xing 0 duration.mp3"'s duration is 5:00 on Mac/Win.
So the issue of wrong duration is not only on Mac but also on Win, I think...
Best Regards,
Miya aka Tougen-Roushi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2370 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-user/attachments/20170131/efc33008/attachment.bin>
More information about the ffmpeg-user
mailing list