Thanks, Paul
You are a genius. Your command worked with the two files I had sent you. I am 
now getting playback on the dCS Rossini from the beginning and (as far as I can 
hear) gapless playback between 4 and 5.
However, I still have an inkling that not all is well
I have attached the log of the two conversions that I did. Chapter 4 seems to 
convert ok with some messages but (as I see it) nothing serious. However 
Chapter 5 (the one that previously converted to 48kHz) has some serious error 
messages. Playback of the flac file seems ok.
The dts file was extracted from the BluRay using DVDAE and the 'direct stream 
demux' option.  Ffmpeg has more issues with some extracted "dts files than with 
others. Could it be that the issue is already at the stage of the 'direct 
stream demux' option?
As I am getting exactly the same results (same files extract @48kHz) using 
MakeMKV / MMH, there could be a problem at the ripping stage of the BluRay and 
not primarily with ffmpeg? What do you think?
Best regards
Rudi




-----Original Message-----
From: ffmpeg-user <ffmpeg-user-boun...@ffmpeg.org> On Behalf Of Paul B Mahol
Sent: Friday, 26. August 2022 21:57
To: FFmpeg user questions <ffmpeg-user@ffmpeg.org>
Subject: Re: [FFmpeg-user] Error decoding DTS-HD MA audio files

On Fri, Aug 26, 2022 at 4:12 PM <rfische...@gmail.com> wrote:

> Hello
>
> Am trying to extract DTS-HD MA audio files from the following Blu-Ray 
> (which I physically purchased)
>
> KARL RICHTER - J.S. Bach: Cantatas - Pure Audio Recordings < 
> https://pureaudiorecordings.com/en/product/karl-richter-j-s-bach-canta
> tas/
> >
>
>
> I am getting the same result both with DVDAE and with MakeMKV / MMH 
> which I believe both use ffmpeg to extract DTS-HD MA. About 80% of the 
> tracks are correctly extracted to 24/192kHz files and around 20% of 
> the tracks are extracted to 24/48kHz files which play back at ΒΌ speed. 
> I then corrected the speed using
>
>
>
> ffmpeg -i 1.flac -af asetrate=192000 2.flac
>
>
>
> This now works on some of my playback equipment. However when I launch 
> playback of a converted file, it shows 0/192kHz for around 5 seconds 
> and only then locks to the 24/192kHz stream and plays back. This 
> happens with files that were correctly extracted to 192kHz and to 
> those that I had to speed up after the fact. So there seems to be 
> something fundamentally wrong with the ffmpeg extraction of this 
> BluRay
>
>
>
> I have prepared some sample files on one drive
>
> https://1drv.ms/u/s!AmpEbEYrlrk5lWGskTYvPp0iv4L3?e=U7kCRC
>
> Chapter 4 extracts correctly to 192kHz
>
> Chapter 5 extracts to 48kHz
>

The Chapter 5 file dts-hd-ma have certain delay. Thus you get with ffmpeg first 
few frames in only dts core at 48kHz 16bit and later full dts-hd-ma kicks in 
with 192kHz and 32bit, but because filtering is not supporting changing of 
sample rate and/or sample format at runtime all remaining frames are filtered 
back to 48kHz and 16bit. This is evident if you run ffmpeg with '-v debug'
flag.

Workaround is to force filtering at 192kHz and 32bit right at start with this 
command:

ffmpeg -i Title1\ -\ Chapter\ 05.dts -af aformat=f=s32p:r=192000:cl=stereo 
out.flac




>
> Both flac extract to not play back correctly on dCS Rossini
>

Hardware playback of 24bit flac at 192000 Hz is not widely supported AFAIK.


>
>
>
> Could you please take a look at this? Thanks a lot
>
> Rudi
>
>
>
> _______________________________________________
> ffmpeg-user mailing list
> ffmpeg-user@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-user
>
> To unsubscribe, visit link above, or email 
> ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".
>
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email ffmpeg-user-requ...@ffmpeg.org with 
subject "unsubscribe".
D:\RF My Videos\ffmpeg Convert>rem this batch processes all files in folder 
'input' and puts the result in folder 'output'

D:\RF My Videos\ffmpeg Convert>FOR /F "tokens=*" %G IN ('dir /b /s *.dts') DO 
ffmpeg -i "%G" -af aformat=f=s32p:r=192000:cl=stereo "D:\RF My Videos\ffmpeg 
Convert\output\%~nG.flac"

D:\RF My Videos\ffmpeg Convert>ffmpeg -i "D:\RF My Videos\ffmpeg 
Convert\input\4.dts" -af aformat=f=s32p:r=192000:cl=stereo "D:\RF My 
Videos\ffmpeg Convert\output\4.flac"
ffmpeg version 2022-08-22-git-f23e3ce858-essentials_build-www.gyan.dev 
Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static 
--disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv 
--enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma 
--enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth 
--enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 
--enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx 
--enable-mediafoundation --enable-libass --enable-libfreetype 
--enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg 
--enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec 
--enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx 
--enable-libgme --enable-libopenmpt --enable-libopencore-amrwb 
--enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm 
--enable-libopencore-amrnb --enable-libopus --enable-libspeex 
--enable-libvorbis --enable-librubberband
  libavutil      57. 33.101 / 57. 33.101
  libavcodec     59. 42.102 / 59. 42.102
  libavformat    59. 30.100 / 59. 30.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 46.103 /  8. 46.103
  libswscale      6.  8.103 /  6.  8.103
  libswresample   4.  8.100 /  4.  8.100
  libpostproc    56.  7.100 / 56.  7.100
[dca @ 000002b38e7f3180] Residual encoded channels are present without core
Input #0, dts, from 'D:\RF My Videos\ffmpeg Convert\input\4.dts':
  Duration: N/A, start: 0.000000, bitrate: N/A
  Stream #0:0: Audio: dts (DTS-HD MA), 192000 Hz, stereo, s32p (24 bit)
Stream mapping:
  Stream #0:0 -> #0:0 (dts (dca) -> flac (native))
Press [q] to stop, [?] for help
[dca @ 000002b38e7ddb40] Residual encoded channels are present without core
Error while decoding stream #0:0: Invalid argument
[flac @ 000002b38e8790c0] encoding as 24 bits-per-sample
Output #0, flac, to 'D:\RF My Videos\ffmpeg Convert\output\4.flac':
  Metadata:
    encoder         : Lavf59.30.100
  Stream #0:0: Audio: flac, 192000 Hz, stereo, s32 (24 bit), 128 kb/s
    Metadata:
      encoder         : Lavc59.42.102 flac
[dca @ 000002b38e7ddb40] DSYNC check failed43.3kbits/s speed=51.9x
Error while decoding stream #0:0: Invalid data found when processing input
size=   47363kB time=00:01:17.07 bitrate=5033.8kbits/s speed=54.1x
video:0kB audio:47354kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.017092%

D:\RF My Videos\ffmpeg Convert>ffmpeg -i "D:\RF My Videos\ffmpeg 
Convert\input\5.dts" -af aformat=f=s32p:r=192000:cl=stereo "D:\RF My 
Videos\ffmpeg Convert\output\5.flac"
ffmpeg version 2022-08-22-git-f23e3ce858-essentials_build-www.gyan.dev 
Copyright (c) 2000-2022 the FFmpeg developers
  built with gcc 12.1.0 (Rev2, Built by MSYS2 project)
  configuration: --enable-gpl --enable-version3 --enable-static 
--disable-w32threads --disable-autodetect --enable-fontconfig --enable-iconv 
--enable-gnutls --enable-libxml2 --enable-gmp --enable-bzlib --enable-lzma 
--enable-zlib --enable-libsrt --enable-libssh --enable-libzmq --enable-avisynth 
--enable-sdl2 --enable-libwebp --enable-libx264 --enable-libx265 
--enable-libxvid --enable-libaom --enable-libopenjpeg --enable-libvpx 
--enable-mediafoundation --enable-libass --enable-libfreetype 
--enable-libfribidi --enable-libvidstab --enable-libvmaf --enable-libzimg 
--enable-amf --enable-cuda-llvm --enable-cuvid --enable-ffnvcodec 
--enable-nvdec --enable-nvenc --enable-d3d11va --enable-dxva2 --enable-libmfx 
--enable-libgme --enable-libopenmpt --enable-libopencore-amrwb 
--enable-libmp3lame --enable-libtheora --enable-libvo-amrwbenc --enable-libgsm 
--enable-libopencore-amrnb --enable-libopus --enable-libspeex 
--enable-libvorbis --enable-librubberband
  libavutil      57. 33.101 / 57. 33.101
  libavcodec     59. 42.102 / 59. 42.102
  libavformat    59. 30.100 / 59. 30.100
  libavdevice    59.  8.101 / 59.  8.101
  libavfilter     8. 46.103 /  8. 46.103
  libswscale      6.  8.103 /  6.  8.103
  libswresample   4.  8.100 /  4.  8.100
  libpostproc    56.  7.100 / 56.  7.100
[dca @ 000001c006c031c0] No valid DCA sub-stream found
[dts @ 000001c006beaec0] Estimating duration from bitrate, this may be 
inaccurate
Input #0, dts, from 'D:\RF My Videos\ffmpeg Convert\input\5.dts':
  Duration: 00:20:53.49, start: 0.000000, bitrate: 1536 kb/s
  Stream #0:0: Audio: dts (DTS), 48000 Hz, stereo, s32p (24 bit), 1536 kb/s
Stream mapping:
  Stream #0:0 -> #0:0 (dts (dca) -> flac (native))
Press [q] to stop, [?] for help
[dca @ 000001c006c17d00] No valid DCA sub-stream found
Error while decoding stream #0:0: Invalid data found when processing input
[flac @ 000001c006c552c0] encoding as 24 bits-per-sample
Output #0, flac, to 'D:\RF My Videos\ffmpeg Convert\output\5.flac':
  Metadata:
    encoder         : Lavf59.30.100
  Stream #0:0: Audio: flac, 192000 Hz, stereo, s32 (24 bit), 128 kb/s
    Metadata:
      encoder         : Lavc59.42.102 flac
Error while decoding stream #0:0: Invalid data found when processing input
size=  204968kB time=00:05:23.15 bitrate=5195.9kbits/s speed=58.2x
video:0kB audio:204960kB subtitle:0kB other streams:0kB global headers:0kB 
muxing overhead: 0.003949%

D:\RF My Videos\ffmpeg Convert>pause
Press any key to continue . . .











_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to