MKA file tagging support in Kodi?
#46
(2019-07-05, 08:51)DaveBlake Wrote:
Quote:I wonder what component/tool Mp3tag, VLC and Foobar are using to read Matroska tags?
A good question. Mp3tag might be open source, worth a little digging (or asking them).  

I looked at foobar2000's Matroska (.mka) tags again today. It shows everything we need in Kodi and displays all the .mka tags in a simple vertical grid.

Image

Foobar is an open source project so I downloaded the foobar source and its ffmpeg source (both are just zipped).

Foobar SDK: https://www.foobar2000.org/SDK
ffmpeg Source (used in Foobar): https://www.foobar2000.org/ffmpeg

Looking through ffmpeg it appears to have structures that contain all the info from Matroska tags. (search for 'MATROSKA_ID_TAGTARGETS_TYPE'). It also looks like Foobar is using ffmpeg to get the Matroska tags. (I'm not a c++ programmer though, it will make more sense to you Dave).

I'm starting to think that maybe ffmpeg is handling all the Matroska Tags but its just not reporting them with its command-line FFMETADATA optionHuh
Reply
#47
@HomerJau I have alreday raised a PR to backport the TrueGD passthrough fix to v18.4  16353 (PR) Both are awaiting review though, as I'm not merging fixes into PAPlayer without one of the player experts approving.

I'll have a poke around the code you found when the sun stops shining (it is bound to rain soon), we're having a nice weekend.
Reply
#48
(2019-07-07, 08:20)DaveBlake Wrote: @HomerJau I have alreday raised a PR to backport the TrueGD passthrough fix to v18.4  16353 (PR) Both are awaiting review though, as I'm not merging fixes into PAPlayer without one of the player experts approving.

I'll have a poke around the code you found when the sun stops shining (it is bound to rain soon), we're having a nice weekend.

Thanks Dave. Enjoy the sunshine. It’s my birthday today so enjoying a few beers right now.
Reply
#49
Happy birthday Garry, have a beer on me Smile
Just for you I had a look at that Foobar2000 code over breakfast.
(2019-07-06, 04:07)HomerJau Wrote: Looking through ffmpeg it appears to have structures that contain all the info from Matroska tags.
Some but not all, it does not allow for TITLE to be at two metadata levels (album and track). See https://github.com/FFmpeg/FFmpeg/blob/ma...roskadec.c where the one ID MATROSKA_ID_TITLE is mapped only to track title.
(2019-07-06, 04:07)HomerJau Wrote: It also looks like Foobar is using ffmpeg to get the Matroska tags.
I don't see that at all. Clearly Foobar reads and shows the tags correctly as your screenshot demonstrates, but I don't see what it uses to read them. They may offer a download of the ffmpeg binaries, but I have doubts that is uses ffmpeg generally. I think download is just that there to support an optional component, the "FFmpeg Decoder Wrapper" that allows users to play any FFmpeg-supported audio format through foobar2000.

I doubt I will dig any deeper into foobar since it isn't using ffmpeg and isn't going to help us.
Reply
#50
(2019-07-07, 09:36)DaveBlake Wrote: Happy birthday Garry, have a beer on me Smile
Just for you I had a look at that Foobar2000 code over breakfast.
(2019-07-06, 04:07)HomerJau Wrote: Looking through ffmpeg it appears to have structures that contain all the info from Matroska tags.
Some but not all, it does not allow for TITLE to be at two metadata levels (album and track). See https://github.com/FFmpeg/FFmpeg/blob/ma...roskadec.c where the one ID MATROSKA_ID_TITLE is mapped only to track title.
(2019-07-06, 04:07)HomerJau Wrote: It also looks like Foobar is using ffmpeg to get the Matroska tags.
I don't see that at all. Clearly Foobar reads and shows the tags correctly as your screenshot demonstrates, but I don't see what it uses to read them. They may offer a download of the ffmpeg binaries, but I have doubts that is uses ffmpeg generally. I think download is just that there to support an optional component, the "FFmpeg Decoder Wrapper" that allows users to play any FFmpeg-supported audio format through foobar2000.

I doubt I will dig any deeper into foobar since it isn't using ffmpeg and isn't going to help us.

Thanks for taking a look Dave (and the b’day wishes).

Looks like we need to wait for an ffmpeg fix or new TagLib release that fully supports Matroska.

BTW: I also emailed mp3tag and asked whether they used ffmpeg and if not what they’ve used to read the Matroska tags. I may or may not get an answer.
Reply
#51
(2019-06-30, 07:06)HomerJau Wrote:
(2019-06-30, 00:44)henkypenky Wrote: In Kodi 17 I used a CUE sheet file (.cue) to describe Album Title, Artist, and track titles for mka files (one file per album containing either LPCM, DTS, DTSMA, or TrueHD audio streams). The album was added nicely to the library, the audio was passed through to my AVR, and album was playing gapless so all good. 

Thanks. This CUE sheet solution will work for me. I’ll give it a try.

It turned out that in Kodi 18 .cue files are only considered when mka file does not contain chapter info. This was different in Kodi 17 where both were considered whereby the cue file had precedence. Opened another issue for this incident: 16359 (GH issue)
Reply
#52
(2019-07-05, 03:17)HomerJau Wrote: All will be known once henkypunky’s sample file is available for testing.

@HomerJau Do you still need any info from me or is it obsolete?
Reply
#53
(2019-07-09, 22:10)henkypenky Wrote:
(2019-06-30, 07:06)HomerJau Wrote:
(2019-06-30, 00:44)henkypenky Wrote: In Kodi 17 I used a CUE sheet file (.cue) to describe Album Title, Artist, and track titles for mka files (one file per album containing either LPCM, DTS, DTSMA, or TrueHD audio streams). The album was added nicely to the library, the audio was passed through to my AVR, and album was playing gapless so all good. 

Thanks. This CUE sheet solution will work for me. I’ll give it a try.

It turned out that in Kodi 18 .cue files are only considered when mka file does not contain chapter info. This was different in Kodi 17 where both were considered whereby the cue file had precedence. Opened another issue for this incident: 16359 (GH issue)

CUE files work in 18 for me as I always split my files into individual songs/chapters. Easier to create playlists and choose random tracks from my iPad app.
Reply
#54
(2019-07-09, 22:13)henkypenky Wrote:
(2019-07-05, 03:17)HomerJau Wrote: All will be known once henkypunky’s sample file is available for testing.

@HomerJau Do you still need any info from me or is it obsolete?

Yes please. Although in the PR you didn’t want to send Dave one. If you’re worried about copyright infringement just provide the first 30 seconds (MkvToolnix will allow you to split a file into two after 30s, just send the first part. It will contain all the tags)
Reply
#55
(2019-07-10, 00:03)HomerJau Wrote:
(2019-07-09, 22:10)henkypenky Wrote:
(2019-06-30, 07:06)HomerJau Wrote: Thanks. This CUE sheet solution will work for me. I’ll give it a try.

It turned out that in Kodi 18 .cue files are only considered when mka file does not contain chapter info. This was different in Kodi 17 where both were considered whereby the cue file had precedence. Opened another issue for this incident: 16359 (GH issue) 

CUE files work in 18 for me as I always split my files into individual songs/chapters. Easier to create playlists and choose random tracks from my iPad app. 
I guess you do with your own tool, just spotted it. This is what I was looking for a long time! Will check it out later this week. When splitting, can I keep original audio codec? What about gapless play of splitted files? I would assume it will no more play gapless unless you convert to Flac?
Reply
#56
(2019-07-10, 00:06)HomerJau Wrote:
(2019-07-09, 22:13)henkypenky Wrote:
(2019-07-05, 03:17)HomerJau Wrote: All will be known once henkypunky’s sample file is available for testing.

@HomerJau Do you still need any info from me or is it obsolete? 

Yes please. Although in the PR you didn’t want to send Dave one. If you’re worried about copyright infringement just provide the first 30 seconds (MkvToolnix will allow you to split a file into two after 30s, just send the first part. It will contain all the tags) 
Ok, will do later today, latest on weekend. Where can I put the file? I guess all these pastebins only support text?
Reply
#57
(2019-07-10, 08:23)henkypenky Wrote:
(2019-07-10, 00:03)HomerJau Wrote:
(2019-07-09, 22:10)henkypenky Wrote: It turned out that in Kodi 18 .cue files are only considered when mka file does not contain chapter info. This was different in Kodi 17 where both were considered whereby the cue file had precedence. Opened another issue for this incident: 16359 (GH issue) 

CUE files work in 18 for me as I always split my files into individual songs/chapters. Easier to create playlists and choose random tracks from my iPad app. 
I guess you do with your own tool, just spotted it. This is what I was looking for a long time! Will check it out later this week. When splitting, can I keep original audio codec? What about gapless play of splitted files? I would assume it will no more play gapless unless you convert to Flac?

Splitting MKV or MKA retains the existing codec(s). No remixing it copying what’s in the original file.

I haven’t used 18.3 yet to play hapless content but I’d expect a small pause.

There’s a tool in Music Media Helper split and convert an MKV’s audio to FLAC. You choose which audio stream to convert.

I’ve added a new tool to create a CUE from already split mka files that are already tagged (I use mp3tag). I haven’t posted that new version yet as it includes a new split mka to chapters/songs that’s not quite completed.

EDIT: I only use MKA for Atmos and DTS:X audio, everything else is converted to FLAC
Reply
#58
(2019-07-10, 08:26)henkypenky Wrote:
(2019-07-10, 00:06)HomerJau Wrote:
(2019-07-09, 22:13)henkypenky Wrote: @HomerJau Do you still need any info from me or is it obsolete? 

Yes please. Although in the PR you didn’t want to send Dave one. If you’re worried about copyright infringement just provide the first 30 seconds (MkvToolnix will allow you to split a file into two after 30s, just send the first part. It will contain all the tags) 
Ok, will do later today, latest on weekend. Where can I put the file? I guess all these pastebins only support text?

If you can’t upload it somewhere, please PM me and you can email to my email address. It should be quite small.
Reply
 
Thread Rating:
  • 0 Vote(s) - 0 Average



Logout Mark Read Team Forum Stats Members Help
MKA file tagging support in Kodi?00