Fast bulk audio conversion

MKV playback, recompression, remuxing, codec packs, players, howtos, etc.
Post Reply
Ramirez
Posts: 5
Joined: Fri Jul 24, 2020 12:14 pm

Fast bulk audio conversion

Post by Ramirez »

The main reason for me to use makemkv is to convert DTS-HD streams into FLAC. I haven't found any other program that is capable of doing this and therefore im stuck it. But there are a couple of problems that are bugging me:
  1. makemkv only converts mkv files with less then ~13 audio Tracks, if it contains more the application does nothing and has to be closed with the task manager. (could because the test VM only had 16 logical cores?)
  2. BatchMKV runs through files sequentially and therefore is extremely slow.
  3. DTS-HD 2.1 (Samples can be found here https://nyaa.si/view/1121811) can't be converted correctly. Converting the DTS-HD 2.1 track in "Kore ga Hontou no Anzio-sen Desu" resulted in a broken bass track after 20 minutes.
  4. Remuxing 12 audio tracks into a single mkv and converting it, results for some tracks in av-synth warnings while converting them from the original files does not.
  5. I haven't found a way to read only the DTS-HD files as input and convert them with makemkvcon64.exe tool
So my questions are:
  • Do I have to worry about those av-synth errors?
  • Is there any reason why makemkv doesn't support DTS-HD 2.1 to FLAC 2.1?
  • How can I input DTS-HD files directly for conversion into makemkvcon64.exe
It would be awesome if someone could help me make this bat file work, including warning outputs like av-synth problems.

Code: Select all

for %%x in (*.dts) do (
	START "DtsToFlac" makemkvcon64.exe 'input' "%%x" 'parameters'  ''output' "%%~nx.flac"
)
Woodstock
Posts: 9939
Joined: Sun Jul 24, 2011 11:21 pm

Re: Fast bulk audio conversion

Post by Woodstock »

For what you're doing, ffmpeg would be the more appropriate tool, since MakeMKV uses the ffmpeg libraries for the conversions it does. It is also easier to script.
MakeMKV Frequently Asked Questions
How to aid in finding the answer to your problem: Activating Debug Logging
mike admin
Posts: 4065
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: Fast bulk audio conversion

Post by mike admin »

Ramirez wrote:
Sat Jul 25, 2020 9:45 am
makemkv only converts mkv files with less then ~13 audio Tracks, if it contains more the application does nothing and has to be closed with the task manager. (could because the test VM only had 16 logical cores?)
This is wrong. There are quite a few few BD discs with over 30 audio tracks and I successfully created MKV with 100+ distinct tracks out of these. There is a soft limit for 384 tracks, after which MakeMKV will start do things more slowly, but really track count should be unlimited. I would appreciate (better a small one) MKV sample.
Ramirez wrote:
Sat Jul 25, 2020 9:45 am
DTS-HD 2.1 (Samples can be found here https://nyaa.si/view/1121811) can't be converted correctly. Converting the DTS-HD 2.1 track in "Kore ga Hontou no Anzio-sen Desu" resulted in a broken bass track after 20 minutes.
Please do a test dump for a single title like this from original BD - http://www.makemkv.com/onlinehelp/testdump.html
Ramirez wrote:
Sat Jul 25, 2020 9:45 am
I haven't found a way to read only the DTS-HD files as input and convert them with makemkvcon64.exe tool
ffmpeg is much better choice for this one.
Ramirez
Posts: 5
Joined: Fri Jul 24, 2020 12:14 pm

Re: Fast bulk audio conversion

Post by Ramirez »

mike admin wrote:
Sat Jul 25, 2020 8:19 pm
This is wrong. There are quite a few few BD discs with over 30 audio tracks and I successfully created MKV with 100+ distinct tracks out of these. There is a soft limit for 384 tracks, after which MakeMKV will start do things more slowly, but really track count should be unlimited. I would appreciate (better a small one) MKV sample.
I only noted my observations. When I try to convert the audio tracks inside this file (8.40GB, 24 DTS-HD tracks) from DTS-HD to flac with flac_best, makemkv stucks at around 3/4 analyzing. makemkv.exe and makemkvcon64.exe both have 0% cpu usage fter that and closing the program won't stop the makemkvcon64exe thread.
mike admin wrote:
Sat Jul 25, 2020 8:19 pm
Please do a test dump for a single title like this from original BD - http://www.makemkv.com/onlinehelp/testdump.html
I don't have access to the original BD. I might get it but in generell I only have DTS-HD files and nothing more. When I tried to convert The mkv with DTS-HD 2.1 to FLAC 2.1 with *TESTDUMP*, makemkv even crashed. Here is the log.
mike admin wrote:
Sat Jul 25, 2020 8:19 pm
ffmpeg is much better choice for this one.
ffmpeg doesn't support lossless DTS-HD to FLAC conversion, it will only convert the lossy core DTS Track to FLAC. As I mentioned, makemkv is the only program to my knowledge that supports DTS-HD conversion and not only DTS conversion. It would be great if I could in-cooperate the makemkv DTS-HD encoder into ffmpeg, because I already do all the other encoding with it.
Ramirez
Posts: 5
Joined: Fri Jul 24, 2020 12:14 pm

Re: Fast bulk audio conversion

Post by Ramirez »

Woodstock wrote:
Sat Jul 25, 2020 2:28 pm
For what you're doing, ffmpeg would be the more appropriate tool, since MakeMKV uses the ffmpeg libraries for the conversions it does. It is also easier to script.
The template srcipt I posted is my ffmpeg script for PCM to FLAC (see below for the original). ffmpeg does not support lossless DTS-HD to FLAC conversion and that's the big problem I'm facing here.

Code: Select all

for %%x in (*.wav) do (
	START "ffmpeg" %ffmpeg% -i "%%x" -c:a flac -compression_level 12  "%%~nx.flac"
)
FredK
Posts: 15
Joined: Wed Feb 13, 2019 1:53 pm

Re: Fast bulk audio conversion

Post by FredK »

Ramirez wrote:
Mon Jul 27, 2020 8:20 pm
[...
ffmpeg doesn't support lossless DTS-HD to FLAC conversion, it will only convert the lossy core DTS Track to FLAC.
...
After a rip with makemkv (checkbox DTS HD MA set) and a subsequent demux of the mkv with tsMuxeR the conversion to FLAC was successful. I renamed the DTS MA HD track from *.dts to *.dtshd and applied ffmpeg on the two DTS-HD files. The 6/24/48 file is the lossy core and the 6/24/96 is the lossless one.

The Blu-ray was "Back to Front" by Peter Gabriel.
Ramirez
Posts: 5
Joined: Fri Jul 24, 2020 12:14 pm

Re: Fast bulk audio conversion

Post by Ramirez »

FredK wrote:
Tue Jul 28, 2020 7:39 am
After a rip with makemkv (checkbox DTS HD MA set) and a subsequent demux of the mkv with tsMuxeR the conversion to FLAC was successful. I renamed the DTS MA HD track from *.dts to *.dtshd and applied ffmpeg on the two DTS-HD files. The 6/24/48 file is the lossy core and the 6/24/96 is the lossless one.

The Blu-ray was "Back to Front" by Peter Gabriel.
That's interesting. ffmpeg introduced full DTS-HD MA support a while ago, but the old version I used back then when searching for a way to convert the DTS-HD MA tracks, only had partial support, namely only core DTS. In this case the topic can be closed. The 2.1 FLAC incompatibly is an ffmpeg problem and I can use ffmpeg to convert the audio files. Also ffmpeg produces the same results with *.dts and *.dtshd.

Code: Select all

 for %%x in (*.dts) do (
	START "ffmpeg" %ffmpeg% -i "%%x" -c:a flac -compression_level 12  "%%~nx.flac"
)
mike admin
Posts: 4065
Joined: Wed Nov 26, 2008 2:26 am
Contact:

Re: Fast bulk audio conversion

Post by mike admin »

Ramirez wrote:
Mon Jul 27, 2020 8:20 pm
ffmpeg doesn't support lossless DTS-HD to FLAC conversion, it will only convert the lossy core DTS Track to FLAC. As I mentioned, makemkv is the only program to my nowledge that supports DTS-HD conversion
MakeMKV was the first and only tool to brging DTS-HD decoding to the world, but that changed long ago. Few years back an open source libcdadec popped out of nowhere featuring open-source DTS-HD decoder and was adopted by ffmpeg. Recent builds of ffmpeg do extract DTS-HD flawlessly. And, given MakeMKV uses ffmpeg for audio transcoding, 2.1 should work. At least I did test it and it worked on my test system...
Ramirez
Posts: 5
Joined: Fri Jul 24, 2020 12:14 pm

Re: Fast bulk audio conversion

Post by Ramirez »

mike admin wrote:
Tue Jul 28, 2020 11:05 pm
MakeMKV was the first and only tool to brging DTS-HD decoding to the world, but that changed long ago. Few years back an open source libcdadec popped out of nowhere featuring open-source DTS-HD decoder and was adopted by ffmpeg. Recent builds of ffmpeg do extract DTS-HD flawlessly. And, given MakeMKV uses ffmpeg for audio transcoding, 2.1 should work. At least I did test it and it worked on my test system...
Did you listend to the complete 2.1 FLAC track and checked all channels?
2.1 is not officially supported by FLAC. The original flac.exe throws an error and ffmpeg a warning that the channel layout FL FR LFE is not officially supported. It still creates a 2.1 FLAC file though. The problem I had, was that the FLAC LFE channel had not the same duration as the DTS-HD LFE channel. I don't know why this happend but it did. At the moment I'm experimenting with extracting tracks separate and gluing them back together from WAVE and FLAC.
Post Reply