Playing YouTube Videos that have seperate URLs for Audio/Video
#1
Hi all!
You might all know, but to me it was new that YouTube videos actually are seperated in Video streams AND Audio streams. So in the end, to play the video i get two URLs, one for the Video and an other for the Audio stream. Is Kodi able able to play two URLs at the same time, one for video and the other for audio?
I am currently using "setResolvedUrl", and it plays the YouTube Video well, except that there is no audio, since its missing the second stream for the audio.
If anyone has a hint for me how to solve that with Kodi it would be great.
Reply
#2
my youtube for trailers (and probably the kodi repo addon) puts the streams into a dash manifest and then gets kodi to play that manifest.
Does require some sort of proxy to be able to play that generated manifest though.

Here is my basic code:
https://github.com/matthuisman/slyguy.ad...gin.py#L98
Reply
#3
Thank you very much!
Reply
#4
(2024-07-23, 02:27)matthuisman Wrote: my youtube for trailers (and probably the kodi repo addon) puts the streams into a dash manifest and then gets kodi to play that manifest.
Does require some sort of proxy to be able to play that generated manifest though.

Here is my basic code:
https://github.com/matthuisman/slyguy.ad...gin.py#L98

First of all: Thank you Matt! Your code helped me to get into this topic.
But after all, i am struggling with this. Basically i am doing the same as you since i adapted your code. I am using yt_dlp to get the info and then create a mpd out of it which currently is served by a nginx. But for whatever yt_dlp options i use, i dont get ANY data that includes something like "indexRange" or "initRange". I think i can say that your code doesn't lookup these segments in the actual manifest_url, it assumes that data just after the yt_dlp run (at least for audio). When i run your code, suprise, i get: No such Key "indexRange". I also looked into the code of the official YouTube addon, and they also work with "indexRange", no clue where they get them.

What am i doing wrong? I dont get these segments. Inputstream Adaptive successfully parses my MPD, but then reports 403 from googlevideo, no such segment...(since i dont have any indexRange tags in my mpd at all i guess). I've also "intercepted" a MPD from the official plugin, and they somehow have "<SegmentBase indexRange="739-12206">" in their MPD, no clue where they get them.

Thanks for any hint!
Reply
#5
i had to modify yt-dlp to give those
source is here: https://github.com/matthuisman/slyguy.ad...lib/yt_dlp
cant remember exactly what changes, but you should be able to hopefully find them
Reply
#6
Okay, getting crazy Wink I'll look at that. Thank you very much for your reply!
Reply

Logout Mark Read Team Forum Stats Members Help
Playing YouTube Videos that have seperate URLs for Audio/Video0