Opened 3 months ago

Last modified 3 months ago

#6216 new defect

TrueHD encoder creates non bitexact files

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

Description

Summary of the bug:
How to reproduce:

./ffmpeg -i truehd.wav -f md5 -
ffmpeg version N-83737-g68ee800a9d Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-nonfree --enable-libx264 --enable-libx265 --enable-libfdk_aac --enable-libvpx --enable-libmp3lame --enable-libvorbis --enable-libopus --target-os=mingw32 --arch=x86_64 --cpu=haswell --extra-cflags='-D_WIN32_WINNT=0x0602' --cc='ccache gcc' --samples=../samples --prefix=/mingw64
  libavutil      55. 47.101 / 55. 47.101
  libavcodec     57. 82.100 / 57. 82.100
  libavformat    57. 66.103 / 57. 66.103
  libavdevice    57.  3.100 / 57.  3.100
  libavfilter     6. 74.100 /  6. 74.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'truehd.wav':
  Metadata:
    encoder         : Lavf57.66.103
  Duration: 00:00:02.02, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, md5, to 'pipe:':
  Metadata:
    encoder         : Lavf57.66.103
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc57.82.100 pcm_s16le
MD5=d886c9feaf7dddcdff3a5adcfa4c57bc
size=       0kB time=00:00:02.02 bitrate=   0.1kbits/s speed= 952x
video:0kB audio:348kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown
% ./ffmpeg -i truehd.wav -c:a truehd -strict -2 truehd.thd
ffmpeg version N-83737-g68ee800a9d Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-nonfree --enable-libx264 --enable-libx265 --enable-libfdk_aac --enable-libvpx --enable-libmp3lame --enable-libvorbis --enable-libopus --target-os=mingw32 --arch=x86_64 --cpu=haswell --extra-cflags='-D_WIN32_WINNT=0x0602' --cc='ccache gcc' --samples=../samples --prefix=/mingw64
  libavutil      55. 47.101 / 55. 47.101
  libavcodec     57. 82.100 / 57. 82.100
  libavformat    57. 66.103 / 57. 66.103
  libavdevice    57.  3.100 / 57.  3.100
  libavfilter     6. 74.100 /  6. 74.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Guessed Channel Layout for Input Stream #0.0 : stereo
Input #0, wav, from 'truehd.wav':
  Metadata:
    encoder         : Lavf57.66.103
  Duration: 00:00:02.02, bitrate: 1411 kb/s
    Stream #0:0: Audio: pcm_s16le ([1][0][0][0] / 0x0001), 44100 Hz, stereo, s16, 1411 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (pcm_s16le (native) -> truehd (native))
Press [q] to stop, [?] for help
Output #0, truehd, to 'truehd.thd':
  Metadata:
    encoder         : Lavf57.66.103
    Stream #0:0: Audio: truehd, 44100 Hz, stereo, s16, 128 kb/s
    Metadata:
      encoder         : Lavc57.82.100 truehd
size=      57kB time=00:00:02.02 bitrate= 231.8kbits/s speed= 103x
video:0kB audio:57kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: 0.000000%
./ffmpeg -i truehd.thd -f md5 -
ffmpeg version N-83737-g68ee800a9d Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-nonfree --enable-libx264 --enable-libx265 --enable-libfdk_aac --enable-libvpx --enable-libmp3lame --enable-libvorbis --enable-libopus --target-os=mingw32 --arch=x86_64 --cpu=haswell --extra-cflags='-D_WIN32_WINNT=0x0602' --cc='ccache gcc' --samples=../samples --prefix=/mingw64
  libavutil      55. 47.101 / 55. 47.101
  libavcodec     57. 82.100 / 57. 82.100
  libavformat    57. 66.103 / 57. 66.103
  libavdevice    57.  3.100 / 57.  3.100
  libavfilter     6. 74.100 /  6. 74.100
  libswscale      4.  3.101 /  4.  3.101
  libswresample   2.  4.100 /  2.  4.100
  libpostproc    54.  2.100 / 54.  2.100
Input #0, truehd, from 'truehd.thd':
  Duration: N/A, start: 0.000000, bitrate: N/A
    Stream #0:0: Audio: truehd, 44100 Hz, stereo, s32 (24 bit)
Stream mapping:
  Stream #0:0 -> #0:0 (truehd (native) -> pcm_s16le (native))
Press [q] to stop, [?] for help
Output #0, md5, to 'pipe:':
  Metadata:
    encoder         : Lavf57.66.103
    Stream #0:0: Audio: pcm_s16le, 44100 Hz, stereo, s16, 1411 kb/s
    Metadata:
      encoder         : Lavc57.82.100 pcm_s16le
[truehd @ 0000000002544f40] Lossless check failed - expected 07, calculated 04.
[truehd @ 0000000002544f40] Lossless check failed - expected 06, calculated 04.
[truehd @ 0000000002544f40] Lossless check failed - expected 00, calculated 02.
[truehd @ 0000000002544f40] Lossless check failed - expected 01, calculated 03.
MD5=cba280ea373fa6287016c9bca7900bac
size=       0kB time=00:00:01.99 bitrate=   0.1kbits/s speed= 104x
video:0kB audio:346kB subtitle:0kB other streams:0kB global headers:0kB muxing overhead: unknown

The resulting stream is also for some reason reported as 24bit (s32) instead of 16bit.

Attachments (1)

truehd.wav (348.1 KB) - added by jamrial 3 months ago.

Download all attachments as: .zip

Change History (2)

Changed 3 months ago by jamrial

comment:1 Changed 3 months ago by cehoyos

  • Keywords thd added; truehd removed
Note: See TracTickets for help on using tickets.