Opened 9 years ago

Closed 8 years ago

#4714 closed defect (fixed)

wmalossless decoder is not lossless

Reported by: ami_stuff Owned by:
Priority: normal Component: avcodec
Version: git-master Keywords: wmalossless
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

ffmpeg's decoder doesn't decode the end of the file (there should be a little more data decoded, see wav file for comparision)

ffmpeg -i test.wav -f s16le input.pcm

ffmpeg -i test.wma -f s16le ffmpeg.pcm

input.pcm should match ffmpeg.pcm, but it doesn't

input wav file:

http://www.datafilehost.com/d/f8487fd6

input wma file:

http://www.datafilehost.com/d/c0e70968

C:\>ffmpeg -i test.wma out.wav
ffmpeg version N-73510-g033dc39 Copyright (c) 2000-2015 the FFmpeg developers
  built with gcc 4.9.2 (GCC)
  configuration: --enable-gpl --enable-version3 --disable-w32threads --enable-av
isynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enab
le-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --
enable-libdcadec --enable-libfreetype --enable-libgme --enable-libgsm --enable-l
ibilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enab
le-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --en
able-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --ena
ble-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc
 --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enabl
e-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-lzma --ena
ble-decklink --enable-zlib
  libavutil      54. 28.100 / 54. 28.100
  libavcodec     56. 47.100 / 56. 47.100
  libavformat    56. 40.100 / 56. 40.100
  libavdevice    56.  4.100 / 56.  4.100
  libavfilter     5. 21.100 /  5. 21.100
  libswscale      3.  1.101 /  3.  1.101
  libswresample   1.  2.100 /  1.  2.100
  libpostproc    53.  3.100 / 53.  3.100
Input #0, asf, from 'test.wma':
  Metadata:
    WMFSDKNeeded    : 0.0.0.0000
    DeviceConformanceTemplate: N1
    WM/WMADRCPeakReference: 32767
    WM/WMADRCPeakTarget: 32767
    WM/WMADRCAverageReference: 11722
    WM/WMADRCAverageTarget: 11722
    WMFSDKVersion   : 11.0.5721.5275
    IsVBR           : 1
  Duration: 00:00:30.01, start: 0.000000, bitrate: 894 kb/s
    Stream #0:0(pol): Audio: wmalossless (c[1][0][0] / 0x0163), 44100 Hz, stereo
, s16p, 1152 kb/s
Output #0, wav, to 'out.wav':
  Metadata:
    WMFSDKNeeded    : 0.0.0.0000
    DeviceConformanceTemplate: N1
    WM/WMADRCPeakReference: 32767
    WM/WMADRCPeakTarget: 32767
    WM/WMADRCAverageReference: 11722
    WM/WMADRCAverageTarget: 11722
    WMFSDKVersion   : 11.0.5721.5275
    IsVBR           : 1
    ISFT            : Lavf56.40.100
    Stream #0:0(pol): Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo
, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc56.47.100 pcm_s16le
Stream mapping:
  Stream #0:0 -> #0:0 (wmalossless (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 38894, curre
nt: 28665; changing to 38894. This may result in incorrect timestamps in the out
put file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 38894, curre
nt: 30713; changing to 38894. This may result in incorrect timestamps in the out
put file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 38894, curre
nt: 32761; changing to 38894. This may result in incorrect timestamps in the out
put file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 38894, curre
nt: 34809; changing to 38894. This may result in incorrect timestamps in the out
put file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 38894, curre
nt: 32766; changing to 38894. This may result in incorrect timestamps in the out
put file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 38894, curre
nt: 34814; changing to 38894. This may result in incorrect timestamps in the out
put file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 139262, curr
ent: 139224; changing to 139262. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 206843, curr
ent: 204756; changing to 206843. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 206843, curr
ent: 206804; changing to 206843. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 358395, curr
ent: 358357; changing to 358395. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 389108, curr
ent: 387066; changing to 389108. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 409595, curr
ent: 409557; changing to 409595. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 460796, curr
ent: 460757; changing to 460796. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 632830, curr
ent: 632791; changing to 632830. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 837630, curr
ent: 837591; changing to 837630. This may result in incorrect timestamps in the
output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 1005563, cur
rent: 1005524; changing to 1005563. This may result in incorrect timestamps in t
he output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 1056763, cur
rent: 1056724; changing to 1056763. This may result in incorrect timestamps in t
he output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 1107963, cur
rent: 1107924; changing to 1107963. This may result in incorrect timestamps in t
he output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 1159163, cur
rent: 1159124; changing to 1159163. This may result in incorrect timestamps in t
he output file.
[wav @ 034f41e0] Non-monotonous DTS in output stream 0:0; previous: 1228797, cur
rent: 1228758; changing to 1228797. This may result in incorrect timestamps in t
he output file.
size=    5160kB time=00:00:30.09 bitrate=1404.7kbits/s
video:0kB audio:5160kB subtitle:0kB other streams:0kB global headers:0kB muxing
overhead: 0.001476%

Change History (6)

comment:1 by Carl Eugen Hoyos, 9 years ago

Component: undeterminedavcodec
Keywords: wmalossless added
Version: unspecifiedgit-master

I tested the following:

$ mplayer test.wma -ac wma9dmo -ao pcm

The output file is shorter than FFmpeg's output (and bitexact for the size).
Is there a tool that decodes a longer file? (Is your wav file the input or the output file?)

in reply to:  1 comment:2 by ami_stuff, 9 years ago

Replying to cehoyos:

I tested the following:

$ mplayer test.wma -ac wma9dmo -ao pcm

The output file is shorter than FFmpeg's output (and bitexact for the size).
Is there a tool that decodes a longer file? (Is your wav file the input or the output file?)

Here is the output (test.wma -> freac.wav) from "fre:ac" audio converter (it matches test.wav file which I used to encode test.wma file):

http://www.datafilehost.com/d/7d5b08b7

http://www.freac.org/index.php

Last edited 8 years ago by ami_stuff (previous) (diff)

in reply to:  1 comment:3 by ami_stuff, 9 years ago

Replying to cehoyos:

I tested the following:

$ mplayer test.wma -ac wma9dmo -ao pcm

The output file is shorter than FFmpeg's output (and bitexact for the size).
Is there a tool that decodes a longer file? (Is your wav file the input or the output file?)

Yup, mplayer with binary codec is even worst than ffmpeg's decoder (less data is decoded):

ffmpeg -i mplayer.wav/ffmpeg.wav/freac.wav -f s16le mplayer.pcm/ffmpeg.pcm/freac.pcm

mplayer.pcm - 5275648 bytes
ffmpeg.pcm - 5283840 bytes
freac.pcm - 5294592 bytes

so to reproduce this one would need to run "fre:ac" program under windows and decode
test.wma to freac_win.wav then next:

ffmpeg -i freac_win.wav -f s16le freac_win.pcm

and freac_win.pcm will match:

ffmpeg -i test.wav -f s16le test.pcm

"test.wav" is the file I used to encode test.wma

Last edited 9 years ago by ami_stuff (previous) (diff)

comment:4 by Elon Musk, 8 years ago

Bug report is now useless because uploaded files are gone.

in reply to:  4 comment:5 by ami_stuff, 8 years ago

Replying to richardpl:

Bug report is now useless because uploaded files are gone.

http://www.datafilehost.com/d/fa8ff496

comment:6 by Elon Musk, 8 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.