[FFmpeg-trac] #6288(undetermined:new): Wrong bitrate information on produced .mp3 when using "-acodec copy" on low bitrate input
FFmpeg
trac at avcodec.org
Mon Apr 3 14:47:37 EEST 2017
#6288: Wrong bitrate information on produced .mp3 when using "-acodec copy" on low
bitrate input
-------------------------------------+-------------------------------------
Reporter: kohlhaas | Type: defect
Status: new | Priority: normal
Component: | Version:
undetermined | unspecified
Keywords: mp3 bitrate | Blocked By:
Blocking: | Reproduced by developer: 0
Analyzed by developer: 0 |
-------------------------------------+-------------------------------------
What i try to do: I am trying to get the audio stream from a .flv and save
it as .mp3 with "-acodec copy". The input file's audio stream is mp3 with
bitrate less than 56kB/s.
Problem: When inspecting the output file with VLC media player, it shows a
bitrate of 56 kB/s. For a input file with audio stream bitrate of 16kB/s,
the output file showed a bitrate of 32kB/s.
The actual file size fits the lower bitrate of the input stream.
I did not get this problem when the input stream had a bitrate of 56kB/s
or more.
Consequence: When using the file in a HTML <audio>-Tag, some browsers
(Safari, maybe others too) estimate a shorter duration than the file
actually has.
Command line:
{{{
ffmpeg -i input.flv -acodec copy output.mp3
}}}
I tried this with several .flv files, also some from the web
(http://www.mediacollege.com/adobe/flash/video/tutorial/example-flv.html)
and also with a .mp3 file.
verbose -report output:
{{{
ffmpeg started on 2017-04-03 at 13:43:55
Report written to "ffmpeg-20170403-134355.log"
Command line:
ffmpeg -v 9 -loglevel 99 -i 20051210-w50s.flv -acodec copy output.mp3
-report
ffmpeg version N-84348-gdb7a05d Copyright (c) 2000-2017 the FFmpeg
developers
built with gcc 6.3.0 (GCC)
configuration: --enable-gpl --enable-version3 --enable-cuda --enable-
cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc
--enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r
--enable-gnutls --enable-iconv --enable-libass --enable-libbluray
--enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme
--enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame
--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264
--enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy
--enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame
--enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-
libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-
libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma
--enable-zlib
libavutil 55. 50.100 / 55. 50.100
libavcodec 57. 83.101 / 57. 83.101
libavformat 57. 66.105 / 57. 66.105
libavdevice 57. 3.100 / 57. 3.100
libavfilter 6. 78.100 / 6. 78.100
libswscale 4. 3.101 / 4. 3.101
libswresample 2. 4.100 / 2. 4.100
libpostproc 54. 2.100 / 54. 2.100
Splitting the commandline.
Reading option '-v' ... matched as option 'v' (set logging level) with
argument '9'.
Reading option '-loglevel' ... matched as option 'loglevel' (set logging
level) with argument '99'.
Reading option '-i' ... matched as input url with argument
'20051210-w50s.flv'.
Reading option '-acodec' ... matched as option 'acodec' (force audio codec
('copy' to copy stream)) with argument 'copy'.
Reading option 'output.mp3' ... matched as output url.
Reading option '-report' ... matched as option 'report' (generate a
report) with argument '1'.
Finished splitting the commandline.
Parsing a group of options: global .
Applying option v (set logging level) with argument 9.
Applying option loglevel (set logging level) with argument 99.
Applying option report (generate a report) with argument 1.
Successfully parsed a group of options.
Parsing a group of options: input url 20051210-w50s.flv.
Successfully parsed a group of options.
Opening an input file: 20051210-w50s.flv.
[file @ 00000000004eac40] Setting default whitelist 'file,crypto'
[flv @ 00000000003285a0] Format flv probed with size=2048 and score=100
[flv @ 00000000003285a0] Before avformat_find_stream_info() pos: 13 bytes
read:32768 seeks:0 nb_streams:0
[flv @ 00000000003285a0] All info found
[flv @ 00000000003285a0] After avformat_find_stream_info() pos: 55624
bytes read:65536 seeks:0 frames:103
Input #0, flv, from '20051210-w50s.flv':
Metadata:
audiodelay : 0
canSeekToEnd : 1
creationdate : Fri Feb 03 11:52:46 2006
:
Duration: 00:00:16.92, start: 0.000000, bitrate: 316 kb/s
Stream #0:0, 62, 1/1000: Audio: mp3, 22050 Hz, stereo, s16p, 40 kb/s
Stream #0:1, 41, 1/1000: Video: vp6f, 1 reference frame, yuv420p,
360x288 (368x288), 0/1, 266 kb/s, 25 fps, 25 tbr, 1k tbn
Successfully opened the file.
Parsing a group of options: output url output.mp3.
Applying option acodec (force audio codec ('copy' to copy stream)) with
argument copy.
Successfully parsed a group of options.
Opening an output file: output.mp3.
[file @ 0000000000546f20] Setting default whitelist 'file,crypto'
Successfully opened the file.
Output #0, mp3, to 'output.mp3':
Metadata:
audiodelay : 0
canSeekToEnd : 1
creationdate : Fri Feb 03 11:52:46 2006
:
TSSE : Lavf57.66.105
Stream #0:0, 0, 1/1000: Audio: mp3, 22050 Hz, stereo, s16p, 40 kb/s
Stream mapping:
Stream #0:0 -> #0:0 (copy)
Press [q] to stop, [?] for help
cur_dts is invalid (this is harmless if it occurs once at the start per
stream)
size= 60kB time=00:00:12.14 bitrate= 40.3kbits/s speed=24.2x
No more output streams to write to, finishing.
size= 83kB time=00:00:16.92 bitrate= 40.2kbits/s speed=24.8x
video:0kB audio:83kB subtitle:0kB other streams:0kB global headers:0kB
muxing overhead: 0.385763%
Input file #0 (20051210-w50s.flv):
Input stream #0:0 (audio): 649 packets read (84767 bytes);
Input stream #0:1 (video): 41 packets read (45536 bytes);
Total: 690 packets (130303 bytes) demuxed
Output file #0 (output.mp3):
Output stream #0:0 (audio): 649 packets muxed (84767 bytes);
Total: 649 packets (84767 bytes) muxed
0 frames successfully decoded, 0 decoding errors
[AVIOContext @ 000000000053ffe0] Statistics: 1 seeks, 651 writeouts
[AVIOContext @ 00000000004f2e00] Statistics: 649512 bytes read, 2 seeks
}}}
--
Ticket URL: <https://trac.ffmpeg.org/ticket/6288>
FFmpeg <https://ffmpeg.org>
FFmpeg issue tracker
More information about the FFmpeg-trac
mailing list