2

So I want to download videos from reddit, I've seen projects on github but I'm very new to python and don't know how it works, if someone could explain I'd appreciate it, I found this project It works but it seperates audio and video and I want it all in one, I think you can combine those using ffmpeg but I don't know how that works either, also how do I configure some of this stuff like where the videos save and quality, here's my code.

from redvid import Downloader
import praw

reddit = praw.Reddit(client_id = "a", client_secret = "b", user_agent = "c")

subreddit = reddit.subreddit("learnpython")
hot = subreddit.hot(limit=5)

reddit1 = Downloader(max_q=True)

for submission in hot:
    reddit1.url = submission.url
    reddit.download()
anoor1234
  • 143
  • 1
  • 8
  • Does this thread answer your question? https://stackoverflow.com/questions/28219049/combining-an-audio-file-with-video-file-in-python – ItayMiz Nov 14 '20 at 21:00
  • Thank you, but how could I change the place where ffmpeg downloads are saved? – anoor1234 Nov 14 '20 at 23:18

1 Answers1

2

There is a very easy to use library that installs reddit videos with sound just install RedDownloader by:

pip install RedDownloader

use it with:

from RedDownloader import RedDownloader

file = RedDownloader.Download(url = "url of post" , output="output file name here" , quality = 720)

quality is video quality where possible qualities are 360 , 720 , 1080

Jackhammer
  • 83
  • 9