mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-23 19:44:20 +00:00
Might as well skip converting
This commit is contained in:
parent
0b7219f27a
commit
88b2a9c5e3
1 changed files with 5 additions and 5 deletions
|
@ -154,7 +154,7 @@ class YoutubeDLVideo(Video):
|
|||
"""Generate the filename of the video."""
|
||||
if self.info is None:
|
||||
raise errors.VideoInfoUnknown()
|
||||
return "./opusfiles/{}.opus".format(re.sub(r'[/\\?*"<>|!:]', "_", self.info.get("title", self.info["id"])))
|
||||
return "./opusfiles/{}.mp4".format(re.sub(r'[/\\?*"<>|!:]', "_", self.info.get("title", self.info["id"])))
|
||||
|
||||
def ready_up(self):
|
||||
"""Download the video."""
|
||||
|
@ -171,10 +171,10 @@ class YoutubeDLVideo(Video):
|
|||
logger.info(f"Starting youtube_dl download of {repr(self)}")
|
||||
with youtube_dl.YoutubeDL({"noplaylist": True,
|
||||
"format": "best",
|
||||
"postprocessors": [{
|
||||
"key": 'FFmpegExtractAudio',
|
||||
"preferredcodec": 'opus'
|
||||
}],
|
||||
# "postprocessors": [{
|
||||
# "key": 'FFmpegExtractAudio',
|
||||
# "preferredcodec": 'opus'
|
||||
# }],
|
||||
"outtmpl": self.get_filename(),
|
||||
"quiet": True}) as ytdl:
|
||||
ytdl.download([self.url])
|
||||
|
|
Loading…
Reference in a new issue