Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: v.redd.it #72

Closed
jtara1 opened this issue Jan 15, 2018 · 10 comments
Closed

Feature Request: v.redd.it #72

jtara1 opened this issue Jan 15, 2018 · 10 comments

Comments

@jtara1
Copy link

jtara1 commented Jan 15, 2018

Example link:

https://www.reddit.com/r/formula1/comments/7qn3db/one_of_my_favourite_slow_motion_images_of_the/

in the HTML source of the link above, I find what might be a direct link to the video, but it redirects to the link with the comments and the video.

https://v.redd.it/s0tmbazdv3a01

More examples for unit testing found at https://www.reddit.com/domain/v.redd.it/

@mikf
Copy link
Owner

mikf commented Jan 15, 2018

v.redd.it videos seem to only be available through HLS/m3u8 and DASH/mpd:
https://github.com/rg3/youtube-dl/blob/1d1d60f6dd4d7c33dc690ff5c68fdab11e6c0af7/youtube_dl/extractor/reddit.py#L32-L38

gallery-dl is not going to support any video manifests, so unless there is an obvious way to get a direct link to those videos, this is not going to to happen.

You could always just use --write-unsupported and call youtube-dl on the resulting file to get these videos.

@mikf
Copy link
Owner

mikf commented Jan 15, 2018

Nevermind ... there is apparently a direct link in reddit's JSON response (see this reddit thread), but this wouldn't contain any audio.

If this is OK for you, then I'm just going to use this.

@jtara1
Copy link
Author

jtara1 commented Jan 15, 2018

I'd personally prefer to use youtube-dl if it means I get the audio.

@mikf mikf closed this as completed Jan 16, 2018
@mikf mikf added the wont-fix label Jan 16, 2018
@mikf mikf mentioned this issue Sep 30, 2018
@kattjevfel
Copy link
Contributor

Doing a hella necrobump here, but can this be re-evaulated?
Seeing how we're using youtube-dl for twitter, why can't we do the same here? Having to parse the unsupported_files.txt log all the time and strapping it to youtube-dl gets tiring, would be nice if was at the very least an option to use ytdl.

https://github.com/Kattus/scripts/blob/6c7d609c0ffd290337579fe51290320496175b89/redditsaved.sh#L19-L24

@mikf mikf removed the wont-fix label Jan 21, 2020
@mikf mikf reopened this Jan 21, 2020
@Hrxn
Copy link
Contributor

Hrxn commented Jan 21, 2020

It seems that this is also still an open issue in youtube-dl, by the way.

Issue here: ytdl-org/youtube-dl#14748
(Plus some closed duplicates)

So this is probably something that should be addressed if properly fixed upstream.

@mikf
Copy link
Owner

mikf commented Jan 31, 2020

Videos from Reddit submissions (e.g. https://www.reddit.com/r/formula1/comments/7qn3db/one_of_my_favourite_slow_motion_images_of_the/) will now get downloaded with the youtube-dl downloader (ae07f92).

Should I also add an extractor that recognizes v.redd.it URLs directly and only forwards them to youtube-dl? I initially decided against it, because you can just use youtube-dl itself if you've went through the trouble of getting a v.redd.it URL from a video post ...

@Hrxn
Copy link
Contributor

Hrxn commented Jan 31, 2020

Should I also add an extractor that recognizes v.redd.it URLs directly and only forwards them to youtube-dl? I initially decided against it, because you can just use youtube-dl itself if you've went through the trouble of getting a v.redd.it URL from a video post ...

Exactly, I think the Reddit post URLs should be enough.

@kattjevfel
Copy link
Contributor

kattjevfel commented Jan 31, 2020

Getting the video works great, however the filename seems all messed up, I see in your commit it's trying (I think) to get the ID and title, that does work when having downloader.ytdl.outtmpl unset, but since I have that set for twitter for example (and honestly, would like for reddit too), it breaks.

With downloader.ytdl.outtmpl set to default:

0tydvhnj00e41-0tydvhnj00e41.mp4

Unset:

ewecdv literally the whole school turned into barbarians.mp4

pure youtube-dl:

literally the whole school turned into barbarians-0tydvhnj00e41.mp4

tl;dr: breaks with downloader.ytdl.outtmpl set.

EDIT: Realised for twitter we get extractor.twitter.videos = "ytdl" can we get this for reddit? :3

@mikf
Copy link
Owner

mikf commented Jan 31, 2020

dff33b2

You can set videos to "ytdl" to invoke youtube-dl on the submission URL instead of the corresponding v.redd.it URL, but it will now also produce the "pure youtube-dl" filename with downloader.ytdl.outtmpl set to default and videos set to true.

"videos": "ytdl" is only useful if you want to use a custom output template for youtube-dl.

@kattjevfel
Copy link
Contributor

Aye, that works great, thanks! Looks like it's time to retire my script then.

@mikf mikf closed this as completed Feb 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants