If you want to add music only files containing the above codecs to the Kodi Music Library, I recently found a way to do so.
Previously I always converted to FLAC as 5.1 (or 7.1 if the original music was in 7.1 format). Kodi has no issue playing MCH flac up to 7.1. But now I have an Atmos system I want to hear the true Atmos track.
With Atmos and DTS:X you need to have those tracks in their original codec (I was using MKV which is a lossless video format containing both HD video and audio codecs) and playback via HDMI passthrough to an AVR for decoding and playback. But Matroska MKV files are not easily added to the Kodi Music Library, they're seen as music videos.
If you convert to MKA files (Matroska Audio) the original codec is stored unaltered. However, due to a tag reading bug in Kodi its difficult to get them to be added to the Library and a second bug won't allow the Kodi audio player to bitstream Atmos, TrueHD, DTS:X and DTS-HDMA to your AVR. DTS:X and DTS-HDMA: This bug is fixed in latest Kodi 18.3 for DTS:X. Atmos/TrueHD will be fixed in future 18.4. (future as of post date). The tag reading issue will be solved at some point too.
Both the issues above can be solved now for MKA files with these two hacks:
—————-
EDIT: September 2020 - This method is no longer needed as Kodi and M4A files now support Atmos/TrueHD, DTS:X, DTS-HDMA streams. The recommended method is now to remux Atmos etc into M4A files and tag them just like a FLAC file, the tracks can then be scanned into the Kodi music library like any other music file. Latest version of MMH can split an MKV into M4A song files containing an Atmos stream and can tag the M4A files.
——————
1. Getting Kodi to Playback bitstreamed Atmos, TrueHD, DTS:X and DTS-HDMA audio only:
Add a new text file to Kodi's userdata folder:
File named: playercorefactory.xml
File contents:
<playercorefactory>
<players>
<player name="VideoPlayer" audio="true" video="false">
<hidexbmc>false</hidexbmc>
</player>
</players>
<rules action="prepend">
<rule filetypes="mka" player="VideoPlayer"/>
</rules>
</playercorefactory>
This file tells kodi to use its video player to play mka Audio files, meaning the audio track is bitstreamed to the AVR. Its video player can handle bitstreaming everything.
2. Getting Kodi to Import MKA Files into its Music Library:
Create an CUE file containing the album files: Example:
REM GENRE "Rock"
REM DATE 1987
PERFORMER "INXS"
TITLE "Kick 30"
FILE "01. Guns In The Sky.mka" WAVE
TRACK 01 AUDIO
TITLE "Guns In The Sky"
PERFORMER "INXS"
INDEX 01 00:00:00
FILE "02. New Sensation.mka" WAVE
TRACK 02 AUDIO
TITLE "New Sensation"
PERFORMER "INXS"
INDEX 01 00:00:00
FILE "03. Devil Inside.mka" WAVE
TRACK 03 AUDIO
TITLE "Devil Inside"
PERFORMER "INXS"
INDEX 01 00:00:00
etc
EDIT: Currently this CUE method will only work in Kodi if the mka files have no chapters.
I've added a new tool to Music Media Helper (MMH) to Split MKV files containing chapters and convert to individual mka files per song using your selected audio track (I.e. ‘Atmos’). MKVs can be created using MakeMKV pretty easily (directly from your BDAs or BDVs, and its kind of freeware).
I've modified MMH's Tag and Rename tool to support MKA files and auto-creation of CUE files based on the MKA file names and its tags.
I'll release that tomorrow, I need to update docs and do final testing.
NOTE: MMH wont tag MKA (yet), use free MP3TAG to do that.
THX
Garry
Previously I always converted to FLAC as 5.1 (or 7.1 if the original music was in 7.1 format). Kodi has no issue playing MCH flac up to 7.1. But now I have an Atmos system I want to hear the true Atmos track.
With Atmos and DTS:X you need to have those tracks in their original codec (I was using MKV which is a lossless video format containing both HD video and audio codecs) and playback via HDMI passthrough to an AVR for decoding and playback. But Matroska MKV files are not easily added to the Kodi Music Library, they're seen as music videos.
If you convert to MKA files (Matroska Audio) the original codec is stored unaltered. However, due to a tag reading bug in Kodi its difficult to get them to be added to the Library and a second bug won't allow the Kodi audio player to bitstream Atmos, TrueHD, DTS:X and DTS-HDMA to your AVR. DTS:X and DTS-HDMA: This bug is fixed in latest Kodi 18.3 for DTS:X. Atmos/TrueHD will be fixed in future 18.4. (future as of post date). The tag reading issue will be solved at some point too.
Both the issues above can be solved now for MKA files with these two hacks:
—————-
EDIT: September 2020 - This method is no longer needed as Kodi and M4A files now support Atmos/TrueHD, DTS:X, DTS-HDMA streams. The recommended method is now to remux Atmos etc into M4A files and tag them just like a FLAC file, the tracks can then be scanned into the Kodi music library like any other music file. Latest version of MMH can split an MKV into M4A song files containing an Atmos stream and can tag the M4A files.
——————
1. Getting Kodi to Playback bitstreamed Atmos, TrueHD, DTS:X and DTS-HDMA audio only:
Add a new text file to Kodi's userdata folder:
File named: playercorefactory.xml
File contents:
<playercorefactory>
<players>
<player name="VideoPlayer" audio="true" video="false">
<hidexbmc>false</hidexbmc>
</player>
</players>
<rules action="prepend">
<rule filetypes="mka" player="VideoPlayer"/>
</rules>
</playercorefactory>
This file tells kodi to use its video player to play mka Audio files, meaning the audio track is bitstreamed to the AVR. Its video player can handle bitstreaming everything.
2. Getting Kodi to Import MKA Files into its Music Library:
Create an CUE file containing the album files: Example:
REM GENRE "Rock"
REM DATE 1987
PERFORMER "INXS"
TITLE "Kick 30"
FILE "01. Guns In The Sky.mka" WAVE
TRACK 01 AUDIO
TITLE "Guns In The Sky"
PERFORMER "INXS"
INDEX 01 00:00:00
FILE "02. New Sensation.mka" WAVE
TRACK 02 AUDIO
TITLE "New Sensation"
PERFORMER "INXS"
INDEX 01 00:00:00
FILE "03. Devil Inside.mka" WAVE
TRACK 03 AUDIO
TITLE "Devil Inside"
PERFORMER "INXS"
INDEX 01 00:00:00
etc
EDIT: Currently this CUE method will only work in Kodi if the mka files have no chapters.
I've added a new tool to Music Media Helper (MMH) to Split MKV files containing chapters and convert to individual mka files per song using your selected audio track (I.e. ‘Atmos’). MKVs can be created using MakeMKV pretty easily (directly from your BDAs or BDVs, and its kind of freeware).
I've modified MMH's Tag and Rename tool to support MKA files and auto-creation of CUE files based on the MKA file names and its tags.
I'll release that tomorrow, I need to update docs and do final testing.
NOTE: MMH wont tag MKA (yet), use free MP3TAG to do that.
THX
Garry
Last edited: