PDA

View Full Version : slow audio file after (ffmpeg) conversion


petrum
3rd August 2006, 01:41
Hi,

I use 'ffmpeg' to convert a .AAC file to MP3 format:
bash-3.1$ ffmpeg.exe -y -i in.aac out.mp3 && mplayer.exe out.mp3
(see at the end the full output)
The output audio file is playable but too slow.

I've tried to change the '-ar' and '-ab' parameter, but it doesn't seem
to have any effect:
bash-3.1$ ffmpeg.exe -y -i in.aac out.mp3 -ar 32000 -ab 15 && mplayer.exe out.mp3
(no effect, see below)

How can I change the 'speed' of the music after convertion with ffmpeg?
(and get a playable MP3 file)

:thanks:,
Petru
P.S. Because I had to wait 5 days to post on this forum ;), I had the time to compile ffmpeg on Linux as well (thinking that my Cygwin build is bogus). I was surprised :confused: to see the same result: the output MP3 file is too slow, no matter what.
Please note the AAC file (the input) comes from an online radio. It plays well with 'mplayer.exe' and WinAmp.


1. Simple conversion : the output audio file too slow
----------------------------------------------------------------------
----------------------------------------------------------------------
bash-3.1$ ffmpeg.exe -y -i in.aac out.mp3 && mplayer.exe out.mp3
FFmpeg version SVN-r5804, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-faac --enable-faad
--enable-gpl
libavutil version: 49.0.0
libavcodec version: 51.10.0
libavformat version: 50.5.0
built on Jul 25 2006 07:42:27, gcc: 3.4.4 (cygming special) (gdc
0.12, using dmd 0.125)
Input #0, aac, from 'in.aac':
Duration: 00:00:03.9, start: 0.000000, bitrate: 15 kb/s
Stream #0.0: Audio: aac, 8000 Hz, mono, 15 kb/s
Output #0, mp3, to 'out.mp3':
Stream #0.0: Audio: mp3, 8000 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[mp3 @ 0x72e550]lame: output buffer too small (buffer index: 321, free
bytes: 1983)
size= 138kB time=17.7 bitrate= 64.0kbits/s
video:0kB audio:138kB global headers:0kB muxing overhead 0.000000%

MPlayer dev-SVN-r19147-3.4.4 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (Family: 15, Model:
35, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2
Playing out.mp3.
Audio file file format detected.
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 8000 Hz, 2 ch, s16le, 64.0 kbit/25.00% (ratio: 8000->32000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [win32] 8000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 15.6 (15.6) of 17.0 (17.0) 0.1%
Exiting... (End of file)
bash-3.1$

2. Changed the '-ar' and '-ab' param - no effect! :mad:
-----------------------------------------------------------------
-----------------------------------------------------------------
bash-3.1$ ffmpeg.exe -y -i in.aac out.mp3 -ar 32000 -ab 15 &&
mplayer.exe out.mp3
FFmpeg version SVN-r5804, Copyright (c) 2000-2004 Fabrice Bellard
configuration: --enable-mp3lame --enable-faac --enable-faad
--enable-gpl
libavutil version: 49.0.0
libavcodec version: 51.10.0
libavformat version: 50.5.0
built on Jul 25 2006 07:42:27, gcc: 3.4.4 (cygming special) (gdc
0.12, using dmd 0.125)
Input #0, aac, from 'in.aac':
Duration: 00:00:03.9, start: 0.000000, bitrate: 15 kb/s
Stream #0.0: Audio: aac, 8000 Hz, mono, 15 kb/s
Output #0, mp3, to 'out.mp3':
Stream #0.0: Audio: mp3, 8000 Hz, mono, 64 kb/s
Stream mapping:
Stream #0.0 -> #0.0
Press [q] to stop encoding
[mp3 @ 0x72e550]lame: output buffer too small (buffer index: 321, free
bytes: 1983)
size= 138kB time=17.7 bitrate= 64.0kbits/s
video:0kB audio:138kB global headers:0kB muxing overhead 0.000000%
MPlayer dev-SVN-r19147-3.4.4 (C) 2000-2006 MPlayer Team
CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 3800+ (Family: 15, Model:
35, Stepping: 2)
CPUflags: MMX: 1 MMX2: 1 3DNow: 1 3DNow2: 1 SSE: 1 SSE2: 1
Compiled for x86 CPU with extensions: MMX MMX2 3DNow 3DNowEx SSE SSE2

Playing out.mp3.
Audio file file format detected.
==========================================================================
Opening audio decoder: [mp3lib] MPEG layer-2, layer-3
AUDIO: 8000 Hz, 2 ch, s16le, 64.0 kbit/25.00% (ratio: 8000->32000)
Selected audio codec: [mp3] afm: mp3lib (mp3lib MPEG layer-2, layer-3)
==========================================================================
AO: [win32] 8000Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A: 15.6 (15.6) of 17.0 (17.0) 0.0%

Exiting... (End of file)
bash-3.1$

petrum
6th August 2006, 13:57
Hi,

I try to convert a aac file to MP3 format (using ffmpeg).
There is a disconnect btw. the input Duration and the output time. The duration is 51 sec., the output time is 102sec (please see below).
The output's time is double, and the sound is distorted (slower).
I've tried to change the '-ar', '-ab' parameters, but the duration/time are not affected.

How can I control the output time?
Where the problem could come from?

Regards,
Petru
P.S. The input file comes from an online radio station
It is playable with both WinAmp and mplayer.

bash-3.1$ ffmpeg.exe -y -i sr_program_2006_08_06_07_27_58.aac -acodec mp3 -ab 32 output.mp3
//...
Input #0, aac, from 'sr_program_2006_08_06_07_27_58.aac':
Duration: 00:00:51.1, start: 0.000000, bitrate: 32 kb/s
Stream #0.0: Audio: aac, 22050 Hz, stereo, 32 kb/s
Output #0, mp3, to 'output.mp3':
Stream #0.0: Audio: mp3, 22050 Hz, stereo, 32 kb/s
//...
size= 399kB time=102.2 bitrate= 32.0kbits/s
video:0kB audio:399kB global headers:0kB muxing overhead 0.000000%