Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#7215 closed defect (fixed)

xWMA 22KHz files produce garbled output

Reported by: kerohazel Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: xwma
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Summary of the bug:

I have several xWMA audio files from a game (Hydrophobia: Prophecy). Some play correctly, others produce garbled noise. I noticed that all the files that play correctly are 44.1 or 48 KHz. The ones that do not are all 22050 Hz. Note the overflow errors in the output below.

How to reproduce (one of the garbled files):

$ ffplay -v 9 -loglevel 99 -i Fear\ Sound\ 1.xWMA
ffplay version N-91062-gf995aa8 Copyright (c) 2003-2018 the FFmpeg developers
  built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
  configuration:
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 19.101 / 58. 19.101
  libavformat    58. 13.102 / 58. 13.102
  libavdevice    58.  4.100 / 58.  4.100
  libavfilter     7. 22.100 /  7. 22.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
Initialized opengl renderer.
[NULL @ 0x7f588c000940] Opening 'Fear Sound 1.xWMA' for reading
[file @ 0x7f588c0012c0] Setting default whitelist 'file,crypto'
Probing mp3 score:1 size:2048
Probing xwma score:100 size:2048   0KB vq=    0KB sq=    0B f=0/0
[xwma @ 0x7f588c000940] Format xwma probed with size=2048 and score=100
[xwma @ 0x7f588c000940] Before avformat_find_stream_info() pos: 250 bytes read:32768 seeks:0 nb_streams:1
[xwma @ 0x7f588c000940] max_analyze_duration 5000000 reached at 5109388 microseconds st:0
[xwma @ 0x7f588c000940] stream 0: start_time: -418293516410647.438 duration: 18.019
[xwma @ 0x7f588c000940] format: start_time: -9223372036854.775 duration: 18.019 bitrate=20 kb/s
[xwma @ 0x7f588c000940] After avformat_find_stream_info() pos: 33694 bytes read:45772 seeks:0 frames:35
Input #0, xwma, from 'Fear Sound 1.xWMA':
  Duration: 00:00:18.02, bitrate: 20 kb/s
    Stream #0:0, 35, 1/22050: Audio: wmav2 (a[1][0][0] / 0x0161), 22050 Hz, 1 channels, fltp, 48 kb/s
detected 4 logical cores
[ffplay_abuffer @ 0x7f588c055140] Setting 'sample_rate' to value '22050'
[ffplay_abuffer @ 0x7f588c055140] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f588c055140] Setting 'channels' to value '1'
[ffplay_abuffer @ 0x7f588c055140] Setting 'time_base' to value '1/22050'
[ffplay_abuffer @ 0x7f588c055140] tb:1/22050 samplefmt:fltp samplerate:22050 chlayout:(null)
[ffplay_abuffersink @ 0x7f588c055240] auto-inserting filter 'auto_resampler_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f588c003f40] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x7f588c055dc0] [SWR @ 0x7f588c0560c0] Using fltp internally between filters
[auto_resampler_0 @ 0x7f588c055dc0] ch:1 chl:1 channels fmt:fltp r:22050Hz -> ch:1 chl:1 channels fmt:s16 r:22050Hz
[wmav2 @ 0x7f588c002cc0] overflow (120 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 1 times
[wmav2 @ 0x7f588c002cc0] overflow (488 > 466) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 6 times
[wmav2 @ 0x7f588c002cc0] overflow (475 > 466) in spectral RLE, ignoring
Audio frame changed from rate:22050 ch:1 fmt:fltp layout:0 channels serial:-1 to rate:22050 ch:1 fmt:fltp layout:0 channels serial:1
[ffplay_abuffer @ 0x7f5878001a00] Setting 'sample_rate' to value '22050'
[ffplay_abuffer @ 0x7f5878001a00] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f5878001a00] Setting 'channels' to value '1'
[ffplay_abuffer @ 0x7f5878001a00] Setting 'time_base' to value '1/22050'
[ffplay_abuffer @ 0x7f5878001a00] tb:1/22050 samplefmt:fltp samplerate:22050 chlayout:(null)
[ffplay_abuffersink @ 0x7f5878009080] auto-inserting filter 'auto_resampler_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f5878001700] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x7f587800a740] [SWR @ 0x7f587800ac00] Using fltp internally between filters
[auto_resampler_0 @ 0x7f587800a740] ch:1 chl:1 channels fmt:fltp r:22050Hz -> ch:1 chl:1 channels fmt:s16 r:22050Hz
[wmav2 @ 0x7f588c002cc0] overflow (605 > 466) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (239 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] len -1 invalid
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 1 times
[wmav2 @ 0x7f588c002cc0] overflow (513 > 466) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (118 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (243 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 1 times
[wmav2 @ 0x7f588c002cc0] overflow (245 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (260 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (244 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (142 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (117 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (858 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (487 > 466) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (275 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (476 > 466) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (254 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] Exponent out of range: 103
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 3 times
[wmav2 @ 0x7f588c002cc0] overflow (245 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 1 times
[wmav2 @ 0x7f588c002cc0] overflow (122 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (259 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (473 > 466) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (469 > 466) in spectral RLE, ignoring
    Last message repeated 1 times
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 1 times
[wmav2 @ 0x7f588c002cc0] overflow (154 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (120 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (166 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (503 > 466) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 1 times
[wmav2 @ 0x7f588c002cc0] len -1 invalid
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 2 times
[wmav2 @ 0x7f588c002cc0] overflow (667 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
    Last message repeated 1 times
[wmav2 @ 0x7f588c002cc0] overflow (590 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (469 > 466) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (933 > 932) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (141 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (1156 > 932) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (234 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] overflow (118 > 116) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (243 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow
[wmav2 @ 0x7f588c002cc0] overflow (343 > 233) in spectral RLE, ignoring
[wmav2 @ 0x7f588c002cc0] frame_len overflow

For comparison, here is a file that does play correctly:

$ ffplay -v 9 -loglevel 99 -i Tactical\ Moves.xWMA
ffplay version N-91062-gf995aa8 Copyright (c) 2003-2018 the FFmpeg developers
  built with gcc 6.2.0 (Ubuntu 6.2.0-5ubuntu12) 20161005
  configuration:
  libavutil      56. 18.102 / 56. 18.102
  libavcodec     58. 19.101 / 58. 19.101
  libavformat    58. 13.102 / 58. 13.102
  libavdevice    58.  4.100 / 58.  4.100
  libavfilter     7. 22.100 /  7. 22.100
  libswscale      5.  2.100 /  5.  2.100
  libswresample   3.  2.100 /  3.  2.100
Initialized opengl renderer.
[NULL @ 0x7f0dc4000940] Opening 'Tactical Moves.xWMA' for reading
[file @ 0x7f0dc40012c0] Setting default whitelist 'file,crypto'
Probing xwma score:100 size:2048
[xwma @ 0x7f0dc4000940] Format xwma probed with size=2048 and score=100
[xwma @ 0x7f0dc4000940] Before avformat_find_stream_info() pos: 1506 bytes read:32768 seeks:0 nb_streams:1
[xwma @ 0x7f0dc4000940] max_analyze_duration 5000000 reached at 5203175 microseconds st:0
[xwma @ 0x7f0dc4000940] stream 0: start_time: -209146758205323.719 duration: 134.676
[xwma @ 0x7f0dc4000940] format: start_time: -9223372036854.775 duration: 134.676 bitrate=48 kb/s
[xwma @ 0x7f0dc4000940] After avformat_find_stream_info() pos: 39416 bytes read:65536 seeks:0 frames:16
Input #0, xwma, from 'Tactical Moves.xWMA':
  Duration: 00:02:14.68, bitrate: 48 kb/s
    Stream #0:0, 16, 1/44100: Audio: wmav2 (a[1][0][0] / 0x0161), 44100 Hz, 1 channels, fltp, 48 kb/s
detected 4 logical cores
[ffplay_abuffer @ 0x7f0dc4068f80] Setting 'sample_rate' to value '44100'
[ffplay_abuffer @ 0x7f0dc4068f80] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f0dc4068f80] Setting 'channels' to value '1'
[ffplay_abuffer @ 0x7f0dc4068f80] Setting 'time_base' to value '1/44100'
[ffplay_abuffer @ 0x7f0dc4068f80] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:(null)
[ffplay_abuffersink @ 0x7f0dc406a200] auto-inserting filter 'auto_resampler_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f0dc4049f40] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x7f0dc406a980] [SWR @ 0x7f0dc406ad80] Using fltp internally between filters
[auto_resampler_0 @ 0x7f0dc406a980] ch:1 chl:1 channels fmt:fltp r:44100Hz -> ch:1 chl:1 channels fmt:s16 r:44100Hz
Audio frame changed from rate:44100 ch:1 fmt:fltp layout:0 channels serial:-1 to rate:44100 ch:1 fmt:fltp layout:0 channels serial:1
[ffplay_abuffer @ 0x7f0dac011a40] Setting 'sample_rate' to value '44100'
[ffplay_abuffer @ 0x7f0dac011a40] Setting 'sample_fmt' to value 'fltp'
[ffplay_abuffer @ 0x7f0dac011a40] Setting 'channels' to value '1'
[ffplay_abuffer @ 0x7f0dac011a40] Setting 'time_base' to value '1/44100'
[ffplay_abuffer @ 0x7f0dac011a40] tb:1/44100 samplefmt:fltp samplerate:44100 chlayout:(null)
[ffplay_abuffersink @ 0x7f0dac012d80] auto-inserting filter 'auto_resampler_0' between the filter 'ffplay_abuffer' and the filter 'ffplay_abuffersink'
[AVFilterGraph @ 0x7f0dac011500] query_formats: 2 queried, 0 merged, 3 already done, 0 delayed
[auto_resampler_0 @ 0x7f0dac014440] [SWR @ 0x7f0dac0148c0] Using fltp internally between filters
[auto_resampler_0 @ 0x7f0dac014440] ch:1 chl:1 channels fmt:fltp r:44100Hz -> ch:1 chl:1 channels fmt:s16 r:44100Hz

I can provide any of the xWMA files in question if needed. Just to make sure the files weren't corrupted somehow, I found a small standalone Windows xWMA player here (http://www.din.or.jp/~ch3/down_e.html) and it played the 22KHz file with no issues.

Attachments (1)

Fear Sound 1.xWMA (44.7 KB ) - added by kerohazel 6 years ago.
22050 Hz file that produces garbled output when played

Download all attachments as: .zip

Change History (4)

comment:1 by Carl Eugen Hoyos, 6 years ago

Component: ffmpegavcodec

Please provide a sample.

by kerohazel, 6 years ago

Attachment: Fear Sound 1.xWMA added

22050 Hz file that produces garbled output when played

comment:2 by Carl Eugen Hoyos, 5 years ago

Component: avcodecavformat
Resolution: fixed
Status: newclosed

Fixed by bananaman255 in 02ea060b29769342e61711ab098a6f05778d04ad

comment:3 by kerohazel, 5 years ago

Great job, Bananaman! I can confirm that all the files sound perfect now.

Note: See TracTickets for help on using tickets.