v.redd.it is Reddits native video uploader and player, with the free Reddit API endpoint and FFmpeg you can download v.redd.it videos easily.
If you prefer a more automated web system check out the PHP class and functions i built here. Not only does it download the video it can also fetch details and information.
Find direct video link
Start by having the Reddit post url that has a v.redd.it video and then get an API response for the post by putting .json
at the end of the url.
An example being for the post
https://www.reddit.com/r/funny/comments/d8qo81/baby_crocodiles_sound_like_theyre_shooting_laser/
into
https://www.reddit.com/r/funny/comments/d8qo81/baby_crocodiles_sound_like_theyre_shooting_laser/.json
This will return one seemingly big piece of data with lots of information about the post.
A method to get the source quality with audio is to find the .mpd extension. This exists at dash_url
. Using the example post above the .mpd link was https://v.redd.it/enxxsuo5xko31/DASHPlaylist.mpd
.
.mpd is a DASH file or simply put a directory to a video file but it directs to different qualities, audios etc.
You can see this in action by running: ffmpeg -i https://v.redd.it/enxxsuo5xko31/DASHPlaylist.mpd
It will return a bunch of information and different “streams”.
Download
To download the video all you have to do now is put this into a simple FFmpeg download command
ffmpeg -i https://v.redd.it/enxxsuo5xko31/DASHPlaylist.mpd -c copy saveasvid.mp4
The Reddit video will be downloaded at source quality hence the -c copy
command and saved as saveasvid.mp4.
Read more about FFmpeg here.