[FFmpeg-user] Mangled sound when combining -acodec wmav2 -ar 44100 -ab 64k

Jan Ehrhardt phpdev at ehrhardt.nl
Mon Jul 2 02:26:53 CEST 2012


I am using ffmpeg to convert all kinds of video recordings to
WMV-format. Until now we used one of Sherpya's builds. Result:
http://elijst.nl/v512x288.php?clip=small
Version: N-32754-g936d4d4-Sherpya

When I tried to update to a newer ffmpeg, the transcoding seemed to
go perfectly. The result of ffmpeg version N-41195-g8a0efa9 is here:
http://elijst.nl/v512x288.php?clip=mangled

To be sure that the Windows build was not the culprit, I compiled
ffmpeg on our Centos 6 machine. The result was the same mangled
audio as with the Windows build. See the FFmpeg output at the end
of this message.

Then I tried other input videos and in the end I even used the
(correct) output of FFmpeg N-32754-g936d4d4-Sherpya as input for
FFmpeg git-2012-07-01-aa1cceb. Result: the same mangled sound !?

Most simple ffmpeg options with this effect:
ffmpeg -i small.wmv -vcodec wmv2 -acodec wmav2 -ar 44100 -ab 64k mangled.wmv

If I remove '-ar 44100' or '-ab 64k' everything goes fine. But I
cannot combine them. This seems a bug to me, but if you know ways
to combine -ar 44100 and -ab 64k anyway, I will feel obliged as well.
BTW: -async 0 -vsync 0 did not make any difference.

Source file if you want to try it: http://x32.elijst.nl/small.wmv
And the one with the mangled sound: http://x32.elijst.nl/mangled.wmv

Jan

PS. Notice the difference between 64 kb/s and 63 kb/s for the input
and output stream #0:1 below.

# ffmpeg -i small.wmv -vcodec wmv2 -acodec wmav2 -ar 44100 -ab 64k -y mangled.wmv
ffmpeg version git-2012-07-01-aa1cceb Copyright (c) 2000-2012 the FFmpeg developers
  built on Jul  1 2012 20:19:45 with gcc 4.4.6 20110731 (Red Hat 4.4.6-3)
  configuration: --enable-static
  libavutil      51. 63.100 / 51. 63.100
  libavcodec     54. 31.100 / 54. 31.100
  libavformat    54. 14.100 / 54. 14.100
  libavdevice    54.  0.100 / 54.  0.100
  libavfilter     3.  0.100 /  3.  0.100
  libswscale      2.  1.100 /  2.  1.100
  libswresample   0. 15.100 /  0. 15.100
Guessed Channel Layout for  Input Stream #0.1 : stereo
Input #0, asf, from 'small.wmv':
  Metadata:
    encoder         : Lavf53.12.0
  Duration: 00:00:10.04, start: 0.000000, bitrate: 732 kb/s
    Stream #0:0: Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 512x288, 25 tbr, 1k tbn, 1k tbc
    Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, s16, 64 kb/s
[graph 0 input from stream 0:0 @ 0x2b205e0] w:512 h:288 pixfmt:yuv420p tb:1/1000 fr:25/1 sar:0/1 sws_param:flags=2
[output stream 0:0 @ 0x2b20060] No opaque field provided
[graph 1 input from stream 0:1 @ 0x2b28d40] tb:1/1000 samplefmt:s16 samplerate:44100 chlayout:0x3
Output #0, asf, to 'mangled.wmv':
  Metadata:
    WM/EncodingSettings: Lavf54.14.100
    Stream #0:0: Video: wmv2 (WMV2 / 0x32564D57), yuv420p, 512x288, q=2-31, 200 kb/s, 1k tbn, 25 tbc
    Stream #0:1: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, stereo, s16, 63 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (wmv2 -> wmv2)
  Stream #0:1 -> #0:1 (wmav2 -> wmav2)
Press [q] to stop, [?] for help
frame=  250 fps=0.0 q=11.9 Lsize=     582kB time=00:00:09.93 bitrate= 479.8kbits/s
video:485kB audio:78kB subtitle:0 global headers:0kB muxing overhead 3.339020%



More information about the ffmpeg-user mailing list