Jump to content

Recommended Posts

Reaper47
Posted

Hello. Emby has added external audio track support a while ago. Let's say you have a "Movie.mkv" file and if you put "Movie.ac3" file in its folder, Emby will detect it and allow you to play it.

Unfortunately, this feature hasn't been working properly for me, as I reported in this thread, starting from this post. Hopefully devs will fix it soon.

Good news is, Kodi has very good support for external audio tracks. HDR, Dolby Vision and audio passtrough all work without issues, plus it supports ".mka" files with multiple audio tracks within them (which Emby currently does not do - it detects one only one track). It works when Kodi is pointed to files directly or via Native Mode in Emby For Kodi Addon.

I wanted to ask, would it be possible to add external audio support for Addon Mode? I'm currently using Native Mode specifically for this, but apparently Addon Mode is recommended. Native Mode also only works  in my home network, as it requires network shares for media files.

Thanks

quickmic
Posted
54 minutes ago, Reaper47 said:

Hello. Emby has added external audio track support a while ago. Let's say you have a "Movie.mkv" file and if you put "Movie.ac3" file in its folder, Emby will detect it and allow you to play it.

Unfortunately, this feature hasn't been working properly for me, as I reported in this thread, starting from this post. Hopefully devs will fix it soon.

Good news is, Kodi has very good support for external audio tracks. HDR, Dolby Vision and audio passtrough all work without issues, plus it supports ".mka" files with multiple audio tracks within them (which Emby currently does not do - it detects one only one track). It works when Kodi is pointed to files directly or via Native Mode in Emby For Kodi Addon.

I wanted to ask, would it be possible to add external audio support for Addon Mode? I'm currently using Native Mode specifically for this, but apparently Addon Mode is recommended. Native Mode also only works  in my home network, as it requires network shares for media files.

Thanks

Depends on Emby server's implementation. If they do muxing (and I think this is the proper way), it would simply show up as a new audio feed in the stream and no changes are required by the plugin. Frankly, I don't think they will implement it this way, as they are not doing it for transcoding either (which is kinda similar case) and it's also nasty there.

I never got any response from devs about that matter, even as it would be so easy to fix. A lot of workarounds wouldn't be required by the plugin if they do it properly.

Reaper47
Posted

As far as I understand, external audio is muxed real-time. So the file is remuxed/direct streamed instead of being direct played. Therefore, Kodi in addon mode does not "see" external audio - it only sees tracks that are actually muxed into main file, if it is direct played. Unless that's how I understand it 🤔

So, to my understanding, for it to work, it would have to either:

1) Emby would "expose" external audio file as a http stream, Kodi addon would then have to "trick" Kodi into "seeing" that this file is next to the main video file, just as in  Kodi documentation. Then Emby wouldn't have to do any processing - it would all happen on Kodi side, just as it does now with Native mode

2) There would have to be a popup before starting playback in Kodi, allowing to choose external audio. Then Emby would remux it.

3) Emby would have to "mux" external audio file into main file every time there is playback. Kodi would then receive the new file with external track already muxed in, so it would normally show up in track selection. Is that what you are suggesting? At one hand it sounds like the most universal solution, but it would also mean that files containing external audio would never be direct played (even if user does not select external track). Also I dunno if Emby supports real time mkv to mkv (or mp4 to mp4) muxing or does it only do ".ts".

Sadly it seems that this feature does not matter much for Emby devs. I've reported issues with it a whileago and they are still not fixed. You got no response. For now, it seems that the only way to enjoy playback with external audio tracks is with Native mode in Emby for Kodi addon, directly from Kodi or with Jellyfin.
 

quickmic
Posted (edited)

When Emby muxes the external audio track into the the stream, there are no changes required by the plugin. Multi audio is supported by http streams, actually Kodi handles that not the plugin and is already working for un-transcoded content.

The question is how does Emby server mux it. For transcoding (which is quite similar), Emby expects a pre-selection of the audio source, yes, and not muxing/transcoding all available audio streams into the stream. That's what I meant when I said, Emby doesn't do it properly. It wouldn't be a big deal to skip the pre-selection and simply mux all audiostream into the stream. If they would do that, I could skip all this extra pre-selection options and it would work like for un-transcodes content. Emby actually forces ffmpeg to remove all audio sources except the selected one.

A long time ago, I wrote a small script forcing ffmpeg to ignore Emby's "remove" parameter. Emby using ffmpeg map-parameter and the script/patch simply removed that and it's working. As a result, all streams have been transcoded and no pre-selection was required. Anyway, it never made it into the Emby.

Frankly, I didn't review Emby's external audio support yet. I need to have a look at it. Did you try transcoding in addon mode? Was the stream available in the selection options?

 

Edited by quickmic
Reaper47
Posted

Thank you for the detailed answer.

4 hours ago, quickmic said:

Did you try transcoding in addon mode? Was the stream available in the selection options?

To be honest I don't rembember 100% as I quickly switched to Native mode once I noticed it is not working. But I think it was not available.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...