Dolby Atmos for music

quick qtn: how do I create a single mka file from an mkv source?

Rather than create individual audio (mka) files, I’d like to use a single MKA, then use cue file, I’ve heard this is a better approach, but can’t see the option in MMH.

thanks

I don’t know about MMH but with mkvtoolnixgui you can just open the file and uncheck everything other than the audio track you want and then click the start multiplex button and it will spit out a mka.

ah, ok. Do I keep the chapters box ticked?

if you want to do the auto split by chapters to get one mka file per song then I think you have to tick the chapters selection if memory serves. I’ve done this on a few discs but it’s been a while.

Assuming the MKV source is singular, you can render just the audio streams you want to a single MKA file (with chapters/tracks) using MKVToolNix.

See below.

1 Like

I haven’t tested since the swtich to Nexus, but in Matrix and earlier, it was necessary to remove the chapters from the mka files (the chapters being present would make it not read the metadata from the cue file, but it would not get the info it needs from the chapters or any mka metadata that was present)

Before you remove the chapters though, you should split it into multiple mka files first (if you want separate files), or create the cue file first (based on the chapter timing points) if you want to keep it as one file.

I’m pretty sure it also needs to be just one audio track present in the mka file, but I haven’t tested how Nexus behaves on that.

Thanks - I was creating chapters in the mka, then creating a cue file, but when adding to Kodi, it was seeing it as a single track, ie ignoring the cue file.
When I went back in & removed the chapters, it all seems ok, adds to Kodi as an album & uses the cue to navigate correctly.

1 Like

Hi - thought I had this sussed, but still a few niggles. I’ve taken the Allman Bros “Idlewild South” bluray, ripped an mkv, & used MKV to create a single MKA, no chapters.

I’ve then created a cue file, & added to my lib. However, even though the cue file has performer with a prefix of “The”, & album title as “Idlewild South (5.1)”, it ignores this (artist:Allman Brothers Band, title: Idlewild South), however tracks are labelled correctly.
Any ideas how I can modify album artist & album title to display correctly please?

Cue:
PERFORMER “The Allman Brothers Band”
TITLE “Idlewild South (5.1)”
REM DATE 1970
REM GENRE “Southern Rock”
FILE “The Allman Brothers Band - Idlewild South (5.1).mka” WAVE

Your file is using smart quotes and they need to be straight quotes. I’m guessing you used a word processor that automatically swaps which quotes are used. You would need to un-automatic that or use a plain text editor instead. Note that you may not be able to see the difference between the two quote types on this site as it may show both types the same.

You sir, are a genius!

I’d have never figured that out, great spot, many thanks :slight_smile:

1 Like

VLC on my PC was actually really helpful as I just copy and pasted your text and then added what was missing and then opened it in VLC which returned an error message with a UNC path that had the escape characters inserted which made the issue very obvious. I find Notepad++ a better fit for playing with this kind of stuff.

1 Like

that’s useful, thanks!

I usually use notepad++ for edits, but somewhere along the way I must have done something “unusual” with this one, which had me stumped!

Good to know vlc will highlight the issue though :+1:

Observation and Analysis:

I’ve conducted various tests to assess the playback of ATMOS audio on my Vero4K+ device, running Kodi (version 20.2) with OSMC (2023.08.01). I used audio passthrough mode to transmit the unaltered ATMOS audio stream to my Audio/Video Receiver (AVR), allowing the AVR to employ ATMOS object metadata for audio dissemination and channel mixing. I used a MKV rip of the main tracks of ‘Abbey Road - The Beatles’, as ‘test data’.

My assessment has covered both the lossless ATMOS TrueHD format, frequently encountered on Blu-Rays, and the lossy ATMOS EAC3-JOC format, commonly employed in streaming, such as .M4A files from services like Tidal and Apple Music. These formats inherently contain object positioning metadata, a crucial element absent in typical coversions to FLAC.

When attempting to play these formats using the Kodi audio player (PAPlayer), I’ve encountered several issues, as described below:

For ATMOS EAC3-JOC files in .M4A format, there are two problems when starting and during playback of a file or files. The first second or so of each file is not played back. Furthermore, playing a set of separate files located in the same folder (effectively a playlist), leads to gaps in playback between the tracks. This ‘gapless playback’ issue doesn’t affect multi-channel FLACs or MP3s, suggesting that an improvement in Kodi (PAPlayer) could rectify this in a future update.

Now, let’s delve into the process of ripping ATMOS TrueHD audio from Blu-ray discs. Typically, users can rip the audio to an .MKV file using MakeMKV and then proceed with processing the file. Since our goal is isolate the audio content, it seems logical to convert each track of the ATMOS TrueHD stream into a .MKA file, utilizing the embedded MKV/MKA Chapter information and tools like MKVToolNix and ‘Music Media Helper’ (MMH). Regrettably, this approach yields the same gapless playback problem as observed with .M4A files mentioned earlier.

As a slight variation, creating a single MKA file from the source MKV (containing only the ATMOS TrueHD audio stream) using MKVToolNix, might seem like a solution to avoid the gapless issue. However, a new problem arises related to track timing during playback using a separately generated CUE file (from the embedded Chapter Index of the MKA file).

[It’s also worth noting that as described in an earlier post,

Kodi/PAPlayer cannot currently use the the embedded Chapter Index in an .MKA file. Further to this, there is a problem using a separate CUE file when the associated .MKA file already contained a Chapter Index. To make the CUE file usable by the PAPlayer, the Chapter Index has to be removed completely from the MKA file. There is a limitation with the PAPlayer as it should ideally support embedded Chapter Indexes in .MKA files.]

So, consequently, when seeking through the Track Indexes (in the CUE file), the timing of track markers in relation to the actual audio playback becomes progressively delayed, especially the further we are into the playback of the .MKA file.

Additionally, during track transitions of continuous playback, and more noticeably on later tracks of the MKA file, a few seconds of audio are lost altogether, which is the opposite of the expected gapless playback experience. It is evident that the CUE timings are also not functioning correctly with the MKA file format.

To further investigate, I experimented with other various container file formats, including M4A (with embedded MLP), MLP, and MLP with out splitting, and TrueHD (THD). These were all created using the’Music Media Helper’ (MMH), and I encountered similar issues as for the MKA files.

In contrast, utilizing the original MKV container with the ATMOS TrueHD format resolves these problems. Playback in this format employs the ‘VideoPlayer’ rather than the ‘PAPlayer,’ resulting in seamless, gapless playback, accurate track indexing/timing, and seeking—characteristics akin to movie playback.

In summary, here are the key points for the two ATMOS audio formats:

ATMOS EAC3-JOC: Both the start of playback and gapless playback of multiple files in a playlist (a set of files in a folder) needs improvement within the Kodi (PAPlayer) and should ideally function as smoothly as it already does for multichannel (7.1) FLACs, independent of passthrough settings.

ATMOS TrueHD: Treating the ATMOS TrueHD stream as a movie or video in the original MKV format offers a satisfactory solution. The only necessary adjustment is to update your advancedsettings.xml file to include .MKV as a playable audio (music extension) format:

<advancedsettings version="1.0">
  <musicextensions>
    <add>.mkv</add>
  </musicextensions>
</advancedsettings>

It is plausible that the ‘PAPlayer’ could be enhanced to function similarly to the ‘VideoPlayer’ with MKA files whilst resolving timing issues to provide a more seamless audio playback experience.

Had you considered on some of these problematic situations with paplayer to context menu>play using>videoplayer as I believe if you have success with that then you could perhaps use a playercorefactory.xml to setup a file naming keyword to use for just atmos tracks to switch players.

Thanks for that, this link (Kodi: Adding support for Atmos, TrueHD and DTS:X, DTS-HDMA audio only files | QuadraphonicQuad Home Audio Forum) seems to cover it.

Seems that seeking and gapless playback are the real issues. I’ll try the Videoplayer for both the ATMOS types I described. I’ll report back in a while.

Is there no noise on this issue on the Kodi forum?

Most of the MKA issues concerning gapless playback and delayed start of playback at the beginning of a file are addressed here, at least for lesser DTS/Dolby multichannel formats, but more than likely covers ATMOS streams too.

This doesn’t look like its getting fixed anytime soon, which is a shame…

So in summary:

1. Gapless playback of ATMOS [EAC3-JOC] and [TrueHD]

Playback the the ‘raw’ ATMOS audio from .M4A and .MKA files/tracks, results in a pause of about 1 sec at the start and between tracks even when the recording actually has no gaps but smooth transitions between the tracks.

This ‘gapless playback’ issue doesn’t affect multi-channel FLACs or MP3s, suggesting that an improvement in Kodi (PAPlayer) could rectify this in a future update (i.e. buffer the passthrough audio stream to compensate for the extra processing required in preparing to open and read the next file/track).

To experience the ATMOS streams properly they have to be passed through to the AVR unchanged from the source media, re muxing cannot happen as Kodi does not know (nor is it licensed) to render ATMOS audio streams, whereas an ATMOS capable AVR does.

2. Kodi should Support Tagged/Chapter Indexed MKAs (ATMOS TrueHD), as it already does for MKVs.

Changing the player to ‘Videoplayer’ from ‘PAPlayer’ for MKA files by way of a ‘playercorefactory.xml’ config file i.e.

<?xml version="1.0" encoding="utf-8"?>
<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 improved the track transitions during continuous playback of a single MKA file, (i.e. they were gapless and not delayed).

Using the embedded Chapter Index in the MKA file to create a CUE file does not result in accurate CUE timings when played back. It should. Perhaps the audio is actually playing slightly quicker because as all the other audio streams have been previously removed (which would have added to processing time). The syncronisation between actual playback and the Chapter Indexes is poor, This can of course be corrected manually in the CUE file, but this really shouldn’t be necessary, and is a workaround.

1 Like

Had a look around the Kodi git hub stuff and open issues concerning MKA, (and hopefully M4A), can anyone put some weight around getting these resolved ? This would be great for the playback of ATMOS media (audio) in particular.

Hi there. Some of the Github issues were opened by me (henkypunky). It’s a drama with the PAPPlayer. For a while the workaround to remove chapters from (single) mka file accompanied by a CUE file was working fine, i.e. was playing gapless. With one of the last OSMC updates (don’t know which exactly) it broke again, i.e. there is a gap of about 1 sec between tracks but the pause is also not exactly in-between but slightly lagging as others were mentioning above. @thechrisgregory So seems right now the last resort is to configure the video player for mka files, correct? Not clear to me from your writing above - is a CUE file still needed for this configuration or can it cope with the embedded chapter info?

Still wondering if the issues are OSMC specific or general issues with Kodi. Seems the PAPlayer has become a step child in the community.

Using the embedded Chapter Index in the MKA file to create a CUE file does not result in accurate CUE timings when played back.

The best approach I have found, is to rip a Blu-Ray ATMOS stream (and possibly a basic video stream if present) to an MKV file. Consequently this plays fine with no gaps using the Videoplayer. The videoplayer also uses the chapter info.

1 Like