Kodi Community Forum

Full Version: Is it possible to use a separate audio track for a video
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Is it possible to specify an external mp4a file as an audio track for an mp4 video file?

I have some Canadian videos in English which appear to have a separate external French audio track file. Both the video and audio files play on Kodi but I don't see a way to specify multiple input files like I can with VLC. TIA
No

But you can remux the video file with an extra audio track. mkvmerge.
(2015-03-20, 21:34)nickr Wrote: [ -> ]No

But you can remux the video file with an extra audio track. mkvmerge.

I mean from a programming viewpoint, not end-user. These are streams and I really can't load the whole file and remux. Whether there's an existing mux someone has built, or a way to specify to ffmpeg a separate audio stream in a manner similar to the way VLC handles it, for such situations. I can always create a proxy and do the remux on the fly same as mkvmerge, just really don't want to go to all that trouble and it will be crappy in python. My other alternative is to use vlc as the player, which I do for YT 1080 videos already to combine the audio and video streams.
I would be interested in this to? Would it be possible to add audio tracks to a ListItem via the Python GUI?
I need this functionality to support 1080p youtube video playback in the addon I'm developing. Since Youtube has no audio in its 1080p video stream, I need to load the seperate audio-streams in to the video. Since it's streaming, it's not an option to remux.

So any answers on how yet? Or if this is something that will be implemented in the future?
Why can't you remux on the fly?
(2015-12-20, 21:14)nickr Wrote: [ -> ]Why can't you remux on the fly?
I thought that wasn't possible. Could you point me in the right direction on how to accomplish this?
hi , is there any update?
i have to put together separated audio video m3u8 stream into one list item over python gui, is it possible or not?
(2016-03-17, 00:44)andrisaedma Wrote: [ -> ]hi , is there any update?
i have to put together separated audio video m3u8 stream into one list item over python gui, is it possible or not?
Maybe, or maybe that is easier to add now, see http://forum.kodi.tv/showthread.php?tid=263249
I'm trying out the DASH video playback in youtube. The dash video stream and audio stream I get from youtube-dl are in separate url's.

it's been 2 years since this post has been made.
Is it possible now, on krypton, to specify an audio stream to use together with the video?


I saw posts about inputstream.mpd but it us beyond my understanding.
I thought it be possible to craft an mpd file with the streams and have setResolvedUrl play it but no go.
Yeah this would be very useful. For instance I download some fan commentary for a movie and then I put it on USB stick and let's say I watch movie in Netflix addon and I choose other audio file.
I stumbled upon this post:
https://www.reddit.com/r/kodi/comments/5...for_films/

Which references this pull request:
https://github.com/xbmc/xbmc/pull/9286

Which seems to suggest that this feature exists.
The question is if I interpreted this correctly (so that this truly works) and if yes what Kodi Version it needs and how to name / format those separate video & audio files to make use of it. Can anybody help with expertise / answers?
(2018-09-16, 09:10)kaefert Wrote: [ -> ]I stumbled upon this post:
https://www.reddit.com/r/kodi/comments/5...for_films/

Which references this pull request:
https://github.com/xbmc/xbmc/pull/9286

Which seems to suggest that this feature exists.
The question is if I interpreted this correctly (so that this truly works) and if yes what Kodi Version it needs and how to name / format those separate video & audio files to make use of it. Can anybody help with expertise / answers?
It works for at least Kodi Krypton and Leia. For a movie with name;

<movie name>.mkv

This should be the format:

<movie name>.<track name>.<extension>

Example: Big Buck Bunny.Commentary.mka

Make sure that the audio track are properly encoded: Kodi should be able to play them as audio files.
(2018-09-16, 09:20)Basje Wrote: [ -> ]<movie name>.<track name>.<extension>
  
I have tested this and found it to be working here.
Initially, I could not get the <track name> to show up though, all of the audio-tracks added this way showed as "unknown".
Only after switching to <movie name>.<ISO 639-1 language code>.<extension> was I able to differentiate between multiple tracks.