MMH: How to Create CUE files for MKV files

QuadraphonicQuad

Help Support QuadraphonicQuad:

MarkerB

Active Member
Joined
Jun 7, 2013
Messages
91
Location
New York State
Thanks again. Looks interesting. I could give it a go. Does it look like your PHP is compatible with nightrain? (I know nothing about PHP coding)
I don't see why not. It's not doing anything that complicated. Actually, it's fairly simple, and could probably be ported to AppleScript or JavaScript.

I could make it a web service, but then people would need to manually extract the chapter file with mkvextract, upload it to my site, and download the resulting CUE file. I'm not sure that's easy enough to make it useful.
 

ted_b

300 Club - QQ All-Star
QQ Supporter
Joined
Oct 28, 2005
Messages
344
Location
Denver area
Copying it worked, thanks. Unfortunately I am a command line idiot and don't know how to save the cue file. It's simply listed in the command lines, but not saved.

Yes, my mkvextract is located (installed) in your last option, namely C:\Program Files\MKVToolNix\mkvextract.exe
 

ted_b

300 Club - QQ All-Star
QQ Supporter
Joined
Oct 28, 2005
Messages
344
Location
Denver area
In comparing them they are only off by tenths of a second at most. I will wait to figue out how to save the cue, but doubt it will make a difference. Thx

1616614863299.png
 

MarkerB

Active Member
Joined
Jun 7, 2013
Messages
91
Location
New York State
Copying it worked, thanks. Unfortunately I am a command line idiot and don't know how to save the cue file. It's simply listed in the command lines, but not saved.
You can redirect the output to a file by appending the following to the end of the mkv2cue command, as in:

mkv2cue sourcevideo.mkv > C:\filepath\filename.cue
 

MarkerB

Active Member
Joined
Jun 7, 2013
Messages
91
Location
New York State
In comparing them they are only off by tenths of a second at most. I will wait to figue out how to save the cue, but doubt it will make a difference. Thx
Oh! I didn't realize this was for an Atmos rip. I've broken up Abbey Road's 5.1 mix into FLACs using mkv2cue and gotten no gaps, but an Atmos track? A CUE sheet works fine for WAVs and FLACs, which foobar can break up using a CUE sheet. However, I don't think anything can break up an MKV file using a CUE sheet. Furthermore, since Abbey Road's tracks mostly run together, I doubt any video player or Atmos receiver could ever sequentially play two video tracks without the huge gap that comes when restarting an Atmos decode.
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,873
Location
Melbourne, Australia
In comparing them they are only off by tenths of a second at most.

MMH doesn't convert milliseconds in video files to frames used in CUE files. I've just implemented Frame conversion that will be in the next MMH release. (It probably doesn't make any audible difference, although max frames is 75 so who knows how each player deals with frames > 75). I've never noticed any glitches.
 

ted_b

300 Club - QQ All-Star
QQ Supporter
Joined
Oct 28, 2005
Messages
344
Location
Denver area
I created the Mark-based cue file and ran it with the gapless track change test at Mean Mr Mustard->Polythene Pam and it failed, again, with fade out 5 seconds too early and start of next track immediately. I am starting to believe that Atmos chapters can't be gapless...no big deal really.

BYW, JRiver seems to be able to accept the ripped BDMV (before any MakeMKV involved) and then choose the Atmos layer/stream remotely. I'm doing all this without an Atmos pre/pro yet, though.
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,873
Location
Melbourne, Australia
with fade out 5 seconds too early and start of next track immediately

I reckon that’s a bug in JRiver. It’s forcing a fade. If it was a cut-out then maybe not. Post on their support forum.

INXS Atmos in Kodi with separate M4A files with Atmos plays gapless to me (I Need You Tonight - Mediate transition)
 

himey

2K Club - QQ Super Nova
Joined
Nov 11, 2013
Messages
2,331
I reckon that’s a bug in JRiver. It’s forcing a fade. If it was a cut-out then maybe not. Post on their support forum.

INXS Atmos in Kodi with separate M4A files with Atmos plays gapless to me (I Need You Tonight - Mediate transition)

jRiver also plays M4A split tracks gapless! I was able to play Abbey Road gapless with both direct file playback AND through my Plex server using Kodi! I remember trying Kodi 19 during the beta releases and they played, but not gapless. Excellent news.

I just realized I was extracting MKA files and not M4A! Not sure what the advantages are of each but so far I am having better luck with MKA files with both jRiver and Kodi.
 
Last edited:

MarkerB

Active Member
Joined
Jun 7, 2013
Messages
91
Location
New York State
INXS Atmos in Kodi with separate M4A files with Atmos plays gapless to me (I Need You Tonight - Mediate transition)
That's so surprising to me. Every receiver I've seen takes several seconds to start spitting out Atmos sound, which leads to me believe these players are able to butt splice the two track streams together as one continuous one. I didn't think an Atmos stream was breakable in the same way as WAV, FLAC, and other simpler codecs, to allow sample-perfect cutting and splicing.
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,873
Location
Melbourne, Australia
I just realized I was extracting MKA files and not M4A! Not sure what the advantages are of each but so far I am having better luck with MKA files with both jRiver and Kodi.

They are both containers that support TrueHD/Atmos and DTS-HDMA streams (No need to convert streams, these are lossless copies from the source)

M4A (mpeg audio, MP4 mpeg video) uses same tagging system as most other audio files so easy to use in most media players (except TrueHD/Atmos support in M4A is so new it’s not in JRiver, latest Kodi 19 was first)

MKA (Matroska = audio, MKV = matroska video) has its own complex tagging system which is not supported by any media players correctly or even most tagging apps. In Kodi I use CUE files to get MKA files ito the Kodi audio library. This is how I played Atmos BDAs in Kodi 18. In JRiver MKA with a CUE file or with Sidecar files will work.

In Kodi 19 I now create tagged M4A files.
 
Last edited:

ted_b

300 Club - QQ All-Star
QQ Supporter
Joined
Oct 28, 2005
Messages
344
Location
Denver area
In JRiver MKA with a CUE file or with Sidecar files will work.
Garry,
Are you saying, for the Abbey Roads of the world (BDA audio where video is not needed) we should extract to MKA instead of MKV? IF so, is MMH's Split to MKA where to do it?

Edit: I can report that the Abbey Road Atmos-selected MKA's (1-17) play nicely in JRiver, with gapless playback. Of course, as with everything I've reported, this is playing back via JRiver, not bitstreamed HDMI to pre/pro to confirm Atmos.
 
Last edited:

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,873
Location
Melbourne, Australia
For JRiver, we're on a quest to find a method to:

1. Get Atmos BDA tracks into the JRiver Audio Library
2. Ensure gapless playback for Atmos tracks in River Audio Library
3. (not critical but ideal) Have individual Audio files (allows adding any song to a playlist)

MMH's Split to MKA tool will do all this (based on himey's testing). After split and tagging, click Rename (to rename the files) then click the Create CUE for the split files which JRiver will read, without the need for sidecar xmls.

Split to MKA can also to do both Rename (to rename the files) and Tag (to create the JRiver Sidecar XML files - since MKA tagging is not supported in JRiver). This would work too.

This tool makes individual audio files (MKA) and to me that's the goal IF MKA is gapless in JRiver.
 
Last edited:

himey

2K Club - QQ Super Nova
Joined
Nov 11, 2013
Messages
2,331
They are both containers that support TrueHD/Atmos and DTS-HDMA streams (No need to convert streams, these are lossless copies from the source)

M4A (mpeg audio, MP4 mpeg video) uses came tagging system as most other audio files so easy to use in most media players (except TrueHD/Atmos support in M4A is so new it’s not in JRiver, latest Kodi 19 was first)

MKA (Matroska = audio, MKV = matroska video) has its own complex tagging system which is not supported by any media players correctly or even most tagging apps. In Kodi I use CUE files to get MKA files ito the Kodi audio library. This is how I play Atmos BDAs in Kodi. In JRiver MKA with a CUE file or with Sidecar files will work.

Plex seems to handle MKA files/tags correctly which I use for Kodi (PlexKodiConnect add-on). I don't use the Kodi library.

JRiver handles MKA, although you have to add the album titles and release year to the library.

Foobar handles MKA files/tags with the FFMpeg wrapper.

M4A files aren't working in Plex or jRiver.

I also kept the full MKVs in the video section of jRiver for background video graphics which can be an added touch on some releases.
 

ted_b

300 Club - QQ All-Star
QQ Supporter
Joined
Oct 28, 2005
Messages
344
Location
Denver area
Garry
As you know I've been having those MMH issues with Musicbrainz but my silver lining is now that these files are MKA then MP3tag can tag them (which I did).

1616711710126.png
 

himey

2K Club - QQ Super Nova
Joined
Nov 11, 2013
Messages
2,331
For JRiver, we're on a quest to find a method to:

1. Get Atmos BDA tracks into the JRiver Audio Library
2. Ensure gapless playback for Atmos tracks in River Audio Library
3. (not critical but ideal) Have individual Audio files (allows adding any song to a playlist)

MMH's Split to MKA tool will do all this (based on himey's testing). After split and tagging, click Rename (to rename the files) then click the Create CUE for the split files which JRiver will read, without the need for sidecar xmls.

Split to MKA can also to do both Rename (to rename the files) and Tag (to create the JRiver Sidecar XML files - since MKA tagging is not supported in JRiver). This would work too.

This tool makes individual audio files (MKA) and to me that's the goal IF MKA is gapless in JRiver.

I should have used the sidecar XML. I may go back and add those, but I manually added the album titles and release year. I tagged all MKAs with MP3TAG but jRiver only recognized the artists.
 

himey

2K Club - QQ Super Nova
Joined
Nov 11, 2013
Messages
2,331
Garry
As you know I've been having those MMH issues with Musicbrainz but my silver lining is now that these files are MKA then MP3tag can tag them (which I did).

View attachment 65077

I might need to update my jRiver or MP3TAG. My album titles (and release date) aren't making it from MP3TAG to jRiver on MKA files, but I did add them manually as I mentioned.

Foobar seemed to handle the MKA tags fine.
 

HomerJAU

Moderator: MCH Media Players
Staff member
Moderator
Moderator
Joined
Jun 13, 2013
Messages
4,873
Location
Melbourne, Australia
but my silver lining is now that these files are MKA then MP3tag can tag them (which I did).

MMH should also tag the MKAs if you use the Tag option (for those without MMH issues in Win7 like Ted is having)

I added MKA tagging so that when using MMH to split into MKAs you could tag at same time and not have to then open the files in MP3tag as another step.

Everything MMH can do you can do with other tools. The aim of MMH is to simplify workflow, minimising the number of tools you need, and steps required.
 
Top