Playing shared reddit video links


#1

From sync at least if I share a reddit video by link it sends the video link:
https://v.redd.it/f8mx538fqff21

With that URL it’s possible to make a .strm file with the following that will play it:

#KODIPROP:inputstreamaddon=inputstream.adaptive
#KODIPROP:inputstream.adaptive.manifest_type=mpd
https://v.redd.it/f8mx538fqff21/DASHPlaylist.mpd

I’m not sure if you can play this with some combination of the yatse plugin for kodi or just a direct inputstream adaptive API call somehow?


#2

Youtube DL is supposed to already handle reddit, so should work with Yatse plugin.

But no logs so hard to know what is happening :slight_smile:


#3

Ah I didn’t know it would do that… from the logs it seems like it doesn’t know what to do with the link it recieves. I imagine it would have better success if it recieved the .mpd URL but the bare link is what’s shared by my reddit client at least.

10:45:09.884 T:139908702242560 NOTICE: URLResolver: Initializing URLResolver version: 5.0.15
10:45:10.607 T:139908702242560 NOTICE: [script.yatse.kodi] YoutubeDL patched!
10:45:10.609 T:139908702242560 NOTICE: [script.yatse.kodi] Starting script version: 1.4.6
10:45:10.610 T:139908702242560 NOTICE: [script.yatse.kodi] Parameters: {‘action’: ‘share’, ‘queue’: ‘false’, ‘data’: ‘https%3A%2F%2Fv.redd.it%2Fnzhdg56gvhf21’, ‘type’: ‘unresolvedurl’}
10:45:10.610 T:139908702242560 WARNING: using DialogBusy from python results in nop now
10:45:10.611 T:139908702242560 NOTICE: [script.yatse.kodi] Trying to resolve with YoutubeDL: https://v.redd.it/nzhdg56gvhf21
10:45:11.199 T:139908702242560 ERROR: ERROR: requested format not available
10:45:11.200 T:139908702242560 ERROR: [script.yatse.kodi] Url not resolved by YoutubeDL: https://v.redd.it/nzhdg56gvhf21
10:45:11.200 T:139908702242560 NOTICE: [script.yatse.kodi] Trying to resolve with urlResolver: https://v.redd.it/nzhdg56gvhf21
10:45:11.209 T:139908702242560 NOTICE: [script.yatse.kodi] Trying to play as basic url: https://v.redd.it/nzhdg56gvhf21
10:45:11.209 T:139908702242560 NOTICE: [script.yatse.kodi] Playing url: https://v.redd.it/nzhdg56gvhf21
10:45:11.861 T:139909786637248 NOTICE: VideoPlayer::OpenFile: https://v.redd.it/nzhdg56gvhf21
10:45:12.331 T:139908641105664 NOTICE: Creating InputStream
10:45:14.426 T:139908641105664 NOTICE: Creating Demuxer
10:45:14.727 T:139908641105664 ERROR: Open - error probing input format, https://www.reddit.com/r/funny/comments/aoq6gs/this_music_reminds_me_of_something/
10:45:14.727 T:139908641105664 ERROR: OpenDemuxStream - Error creating demuxer
10:45:14.727 T:139908641105664 NOTICE: CVideoPlayer::OnExit()
10:45:14.753 T:139909786637248 NOTICE: CVideoPlayer::CloseFile()
10:45:14.753 T:139909786637248 NOTICE: VideoPlayer: waiting for threads to exit
10:45:14.754 T:139909786637248 NOTICE: VideoPlayer: finished waiting


#4

Nope youtube dl is supposed to handle those urls correctly.

I need full logs to have your Kodi version / OS and YoutubeDL version.


#5

Please try to install attached plugin and see if it fixes the issues. (Will need news logs in all cases)

script.yatse.kodi-1.5.0.zip (212.0 KB)


#6

That one does work, though without sound (the inputstream.adaptive .strm method pasted above works with sound…)

A full log of that one working is here:

https://pastebin.com/FG8WA02Z

edit: probably related to the m3u8 link it’s playing there but any video longer than about 10-15 seconds that should have sound is broken - it plays the first 10-15 seconds and skips back to the start for as long as the video is supposed to be. The DASH method seems to work normally on the same vids.

some test cases:
3 min with sound: https://v.redd.it/1kc5eiqmxff21 - skips after 15ish seconds
1 min without sound: https://v.redd.it/ezayfkxjnnf21 - plays normally

edit again:
Even youtube does that same thing with the 1.5.0 version, and also don’t play sound. After reverting I see the 1.4.6 version can play the non-sound ones, but fails on the sound ones.


#7

Ok so have to tweak the youtube DL params :frowning: But it’s not that easy as it’s hard to know what the active Kodi version will support.

Do you think you can play with youtubeDL client and help with that?

Previously I was only using the format “best” Seems “bestvideo/bestaudio/best” is not correct to find the correct ones but best only did find nothing for reddit link for example.

“bestvideo+bestaudio/best” returns some different lists of available streams but don’t know if there’s correct one in that either :slight_smile: