Convert LPCM audio tracks while leaving DTS tracks intact?

Everything related to MakeMKV
Post Reply
mattias83
Posts: 53
Joined: Fri Mar 21, 2014 9:44 am

Convert LPCM audio tracks while leaving DTS tracks intact?

Post by mattias83 » Fri Jun 20, 2014 8:06 pm

Is there a way to convert LPCM audio tracks to flac while keeping the DTS-HD or Dolby TrueHD tracks intact? I know I can select the flac profile but then it wants to convert all audio tracks to flac. Many blu-ray discs have LPCM and DTS tracks on the same disc and I would like to convert the LPCM tracks while leaving the DTS tracks alone.

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by ndjamena » Fri Jun 20, 2014 9:29 pm

Edit the profile.

mattias83
Posts: 53
Joined: Fri Mar 21, 2014 9:44 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by mattias83 » Sat Jun 21, 2014 2:27 am

So there is a way then. But I have no experience editing the profile. How would I do that?

I was hoping there was an easy way, like right-clicking on each audio track and selecting whether to convert or not.

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by ndjamena » Sat Jun 21, 2014 3:26 am

Save this as pcmflac.mmcp.xml in your MakeMKV directory and then select the PCM->FLAC profile in the program (or set it as default as may be).

Code: Select all

<?xml version="1.0" encoding="utf-8"?>
<profile>
    <!-- profile name - Default -->
    <name lang="eng">PCM->FLAC</name>

    <!-- Common MKV flags -->
    <mkvSettings 
        ignoreForcedSubtitlesFlag="true"
        useISO639Type2T="false"
        setFirstAudioTrackAsDefault="true"
        setFirstSubtitleTrackAsDefault="false"
        setFirstForcedSubtitleTrackAsDefault="true"
        insertFirstChapter00IfMissing="true"
    />

    <!-- Settings overridable in preferences -->
    <profileSettings
        app_DefaultSelectionString="-sel:all,+sel:(favlang|nolang),+sel:lossless,-sel:(havemulti|havelossless),-sel:mvcvideo,=100:all,-10:favlang"
    />

    <!-- Output formats currently supported by MakeMKV -->
	<!-- Direct Copy -->
    <outputSettings name="copy" outputFormat="directCopy">
        <description lang="eng">Copy track as is</description>
    </outputSettings>

	<!-- PCM Output -->
    <outputSettings name="lpcm" outputFormat="LPCM-raw">
        <description lang="eng">Save as raw LPCM</description>
    </outputSettings>

    <outputSettings name="wavex" outputFormat="LPCM-wavex">
        <description lang="eng">Save as LPCM in WAV container</description>
    </outputSettings>

	<!-- FLAC Encoding -->
    <outputSettings name="flac-fast" outputFormat="FLAC">
        <description lang="eng">Save as FLAC (fast compression)</description>
        <extraArgs>-compression_level 5</extraArgs>
    </outputSettings>

    <outputSettings name="flac-best" outputFormat="FLAC">
        <description lang="eng">Save as FLAC (best compression)</description>
        <extraArgs>-compression_level 12</extraArgs>
    </outputSettings>

    <outputSettings name="flac-placebo" outputFormat="FLAC">
        <description lang="eng">Save as FLAC (placebo compression)</description>
        <extraArgs>-compression_level 12 -lpc_coeff_precision 15 -lpc_passes 8 -lpc_type 3</extraArgs>
    </outputSettings>

	<!-- Subtitle Compression -->
    <outputSettings name="copyzlib" outputFormat="directCopy">
        <description lang="eng">Copy track as is (zlib compressed)</description>
        <mkvTrackSettings compression="zlib" compressionLevel="9" />
    </outputSettings>

	<!-- AAC Encoding -->
    <outputSettings name="aac" outputFormat="AAC">
        <description lang="eng">Save as Mpeg-4 AAC-LC</description>
        <extraArgs>codec=libfdk_aac profile=LC</extraArgs>
        <extraArgs>afterburner=1</extraArgs>
    </outputSettings>

    <outputSettings name="he-aac" outputFormat="AAC">
        <description lang="eng">Save as Mpeg-4 HE-AAC</description>
        <extraArgs>codec=libfdk_aac profile=HE-AAC signaling=explicit_sbr</extraArgs>
        <extraArgs>afterburner=1</extraArgs>
    </outputSettings>

    <!-- stereo inputs only -->
    <outputSettings name="he-aacv2" outputFormat="AAC">
        <description lang="eng">Save as Mpeg-4 HE-AACv2</description>
        <extraArgs>codec=libfdk_aac profile=HE-AACv2 signaling=explicit_hierarchical</extraArgs>
        <extraArgs>afterburner=1</extraArgs>
    </outputSettings>

    <outputSettings name="aac-gpl" outputFormat="AAC">
        <description lang="eng">Save as Mpeg-4 AAC-LC (ffmpeg encoder)</description>
        <extraArgs>codec=aac -strict -2</extraArgs>
        <extraArgs>aac_coder=twoloop</extraArgs>
    </outputSettings>

	<!-- AC3 Encoding -->
    <outputSettings name="AC3-192" outputFormat="AC3">
        <description lang="eng">Save as AC3 (192kbps)</description>
		<extraArgs>-b 192k</extraArgs>
    </outputSettings>

    <outputSettings name="AC3-224" outputFormat="AC3">
        <description lang="eng">Save as AC3 (224kbps)</description>
		<extraArgs>-b 224k</extraArgs>
    </outputSettings>

    <outputSettings name="AC3-448" outputFormat="AC3">
        <description lang="eng">Save as AC3 (448kbps)</description>
		<extraArgs>-b 448k</extraArgs>
    </outputSettings>

    <outputSettings name="AC3-640" outputFormat="AC3">
        <description lang="eng">Save as AC3 (640kbps)</description>
		<extraArgs>-b 640k</extraArgs>
    </outputSettings>
	
    <!-- Audio downmix settings -->
    <audioMixSettings name="stereo16"
        outputBPS="16"
        outputChannelLayout="stereo"
        mix="DolbyPrologic2">
        <description lang="eng">Stereo 16-bit Dolby PrologicII downmix</description>
    </audioMixSettings>

    <audioMixSettings name="stereo16raw"
        outputBPS="16"
        outputChannelLayout="stereo"
        centerMixLevel="-3dB"
        surroundMixLevel="-6dB"
        lfeMixLevel="0">
        <description lang="eng">Stereo 16-bit downmix</description>
    </audioMixSettings>

    <audioMixSettings name="16B51"
        outputBPS="16"
        outputChannelLayout="5.1">
        <description lang="eng">6.1 DTS-MA to 16-bit 5.1 (For WDTV Live SMP)</description>
    </audioMixSettings>

    <!-- Default rule - copy as is -->
    <trackSettings input="default">
        <output outputSettingsName="copy" 
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>

    <!-- Save LPCM mono or stereo as FLAC -->
    <trackSettings input="LPCM-stereo">
        <output outputSettingsName="lpcm"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>

    <!-- Save multi-channel LPCM as FLAC -->
    <trackSettings input="LPCM-multi">
        <output outputSettingsName="wavex"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>

    <!-- Save TRUEHD as FLAC -->
    <trackSettings input="TRUEHD-stereo">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
    </trackSettings>
    <trackSettings input="TRUEHD-multi">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
    </trackSettings>
    <trackSettings input="MLP-stereo">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>
    <trackSettings input="MLP-multi">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>

    <!-- Save DTS-HDMA as FLAC -->
    <trackSettings input="DTSHDMA-stereo">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
    </trackSettings>
    <trackSettings input="DTSHDMA-multi">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString,-sel:all"
                audioMix="16B51">
        </output>
    </trackSettings>

    <!-- Save DTS-HD as FLAC -->
    <trackSettings input="DTSHD-stereo">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>
    <trackSettings input="DTSHD-multi">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>

    <!-- Save DTS-HD LBR (low quality) as FLAC (just to decode) -->
    <trackSettings input="DTSHDLBR-stereo">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="AC3-192"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>
    <trackSettings input="DTSHDLBR-multi">
        <output outputSettingsName="copy"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="flac-best"
                defaultSelection="$app_DefaultSelectionString,-sel:all">
        </output>
        <output outputSettingsName="AC3-448"
                defaultSelection="$app_DefaultSelectionString">
        </output>
        <output outputSettingsName="AC3-192"
                defaultSelection="$app_DefaultSelectionString,-sel:all"
                audioMix="stereo16">
        </output>
    </trackSettings>

    <!-- Compress subtitles with ZLIB compression -->
    <trackSettings input="PGS">
        <output outputSettingsName="copyzlib"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>
    <trackSettings input="PGS-forced">
        <output outputSettingsName="copyzlib"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>

    <trackSettings input="VOBSUB">
        <output outputSettingsName="copyzlib"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>
    <trackSettings input="VOBSUB-forced">
        <output outputSettingsName="copyzlib"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>
   
    <trackSettings input="VOBSUBHD">
        <output outputSettingsName="copyzlib"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>
    <trackSettings input="VOBSUBHD-forced">
        <output outputSettingsName="copyzlib"
                defaultSelection="$app_DefaultSelectionString">
        </output>
    </trackSettings>
   
</profile>
Last edited by ndjamena on Sun Nov 30, 2014 9:31 am, edited 13 times in total.

mattias83
Posts: 53
Joined: Fri Mar 21, 2014 9:44 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by mattias83 » Sat Jun 21, 2014 3:39 am

Great, thank you very much!

mattias83
Posts: 53
Joined: Fri Mar 21, 2014 9:44 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by mattias83 » Sat Jun 21, 2014 4:02 am

Well for some reason it doesn't list the profile under the drop-down options for profiles. The file is named pcmflac.mmcp.xml and is in the main program folder. When I click profile I get the same standard list, with no option for the pcm-flac profile.

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by ndjamena » Sat Jun 21, 2014 4:08 am

Did you get an error message when MakeMKV loaded?

-Edit- I'm using it right how to rip The Avengers. I added HRA to FLAC and am testing it out on an Italian track.

mattias83
Posts: 53
Joined: Fri Mar 21, 2014 9:44 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by mattias83 » Sat Jun 21, 2014 4:10 am

mattias83 wrote:Well for some reason it doesn't list the profile under the drop-down options for profiles. The file is named pcmflac.mmcp.xml and is in the main program folder. When I click profile I get the same standard list, with no option for the pcm-flac profile.
Nope, no error message - it just won't give me the pcm-flac option.

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by ndjamena » Sat Jun 21, 2014 4:13 am

You need to save it as utf-8, not ANSI. What OS are you using?

mattias83
Posts: 53
Joined: Fri Mar 21, 2014 9:44 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by mattias83 » Sat Jun 21, 2014 4:15 am

ndjamena wrote:You need to save it as utf-8, not ANSI. What OS are you using?
Windows 7 32bit.

mattias83
Posts: 53
Joined: Fri Mar 21, 2014 9:44 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by mattias83 » Sat Jun 21, 2014 4:20 am

Okay - saved a new file as utf-8 and now it shows up. Thanks again.

mattias83
Posts: 53
Joined: Fri Mar 21, 2014 9:44 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by mattias83 » Sat Jun 21, 2014 4:41 am

Just tried it - worked perfectly. Thank you again.

ndjamena
Posts: 830
Joined: Mon Jan 07, 2013 12:23 am

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by ndjamena » Tue Nov 11, 2014 10:14 pm

*cough*

I changed the profile to no longer "copy" PCM tracks and added a few things.

VideoJunkie888
Posts: 10
Joined: Thu Jun 19, 2014 5:41 pm

Re: Convert LPCM audio tracks while leaving DTS tracks intac

Post by VideoJunkie888 » Thu Nov 27, 2014 2:36 pm

Thankyou so much ndjamena :D

the above .xml file works perfectly for me...

Many, thanks and much appreciation for your help!

Post Reply