ruuk / script.module.youtube.dl

⛔️ DEPRECATED: Access to youtube-dl stream extraction in an XBMC module
GNU General Public License v2.0
39 stars 40 forks source link

No Audio for most Youtube Stream #17

Closed firsttris closed 7 years ago

firsttris commented 7 years ago

Hello,

i created a little kodi addon using youtube-dl: https://github.com/firsttris/plugin.video.sendtokodi

the addon should actually serve as JSON-RPC endpoint for our iOS App SendToKodi. But i also discovered that you can use it the create Playlist files. (m3u) see Issue #8

so far... everything is working well,.. unless...

for some reason most Youtube Stream have no Audio:

Video Decoder mmal-h264 (hw) Audio Stream: unkown, unkown, 0 bits, 0 Hz

When i download the Youtube Video using youtube-dl commandline tool and play it on kodi (locally) i get audio:

Video Decoder mmal-vp8 (HW) Audio Stream FL;FR vorbis 32 bits, 44 100 khz

Any thoughts ?

regards Tristan

ruuk commented 7 years ago

If you try anything over 720p you're probably not going to get audio because it's MPEG-DASH, which has separate audio and video streams. Kodi was not able to play these type of streams until v17 and the addition of a binary add-on that adds this. I haven't investigated yet what is involved to take advantage of this.

firsttris commented 7 years ago

thx for your quick reply,, this explains why there is only the video stream. i will investigate.

firsttris commented 7 years ago

Example for Video with no audio

Booka Shade - Body Language https://www.youtube.com/watch?v=TLNdBIRTNM4

From script.module.youtube.dl generated url: https://r7---sn-4g57knrz.googlevideo.com/videoplayback?pl=23&itag=135&mime=video%2Fmp4&keepalive=yes&mm=31&mn=sn-4g57knrz&gir=yes&requiressl=yes&mt=1489305564&mv=m&ei=TwDFWO--E8qQW5HMuOgK&ms=au&key=yt6&clen=7504968&lmt=1431841259572815&dur=493.360&expire=1489327279&id=o-ANOx612Q_LRYhGbEGfRAt-NoThGisPuCagQjcV3hlQPU&source=youtube&initcwndbps=748750&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cupn%2Cexpire&ipbits=0&signature=C4004C44F702DB59FCC65821776B69613F6E8500.C4CF31C38D58711281090686E4A0AB5EADA6BEEA&ip=87.188.218.10&upn=XCAT-gWekNk&ratebypass=yes|User-Agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%3B+rv%3A10.0%29+Gecko%2F20150101+Firefox%2F47.0+%28Chrome%29

if i try to play this url in chrome i also do not get any audio.

Example for a video where audio is working:

Windsurfing - Chop Hop https://www.youtube.com/watch?v=bn3ebh3wkOA

From script.module.youtube.dl generated url: https://r20---sn-4g57knr7.googlevideo.com/videoplayback?signature=C3B979A7D66046B979D8456246CDB70FEAB167EA.B13FA8C6239212A308B4BC985789C0A23101E7C2&mv=m&pl=23&mt=1489305920&ms=au&ei=kAHFWIrUHsuj1gLDx5GIAw&mn=sn-4g57knr7&mm=31&key=yt6&source=youtube&mime=video%2Fmp4&dur=61.741&id=o-AEmVsxGRm47fOEbW_5eh3KcQZ0UT0wUO11QS_cMPaILR&itag=22&lmt=1472287631051123&requiressl=yes&ip=87.188.218.10&expire=1489327600&initcwndbps=817500&ipbits=0&ratebypass=yes&sparams=dur%2Cei%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&upn=0Pbbv21arJw&beids=%5B9465691%5D|User-Agent=Mozilla%2F5.0+%28X11%3B+Linux+x86_64%3B+rv%3A10.0%29+Gecko%2F20150101+Firefox%2F47.0+%28Chrome%29)

firsttris commented 7 years ago

when i do youtube-dl.exe -g i get the correct url and can play it in chrome

PS C:\Users\Tristan\Downloads> .\youtube-dl.exe -g https://www.youtube.com/watch?v=TLNdBIRTNM4

https://r7---sn-4g57knrz.googlevideo.com/videoplayback?requiressl=yes&ei=tg_FWLejIIX21gLa67ewAw&itag=43&ip=87.188.218.10&ms=au&mv=m&mt=1489309521&source=youtube&clen=7580394&dur=0.000&id=o-AFZujNHxXryXCdh--CAO3pzLg3lsQyWkEmQPT6v1gyAr&mn=sn-4g57knrz&gir=yes&mime=video%2Fwebm&upn=abx48ZjmhEA&ratebypass=yes&expire=1489331222&lmt=1298615494799627&pl=23&ipbits=0&initcwndbps=780000&signature=1C76835B1A7E4D449364AB39D770600D409A89AF.3E41291F8A20F1608CB9CED0CF60095CC4485A01&sparams=clen%2Cdur%2Cei%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&mm=31&key=yt6

firsttris commented 7 years ago

seems there are always multiple urls to a video, most of them are DASH Audio only, but at the the end of the array there is also a version without DASH

firsttris commented 7 years ago

issue is solved for me.