[BACKEND] Set merge_output_format to file_convert file type (#699)

Adds a small optimization to potentially avoid an additional remux by setting yt-dlp's merge output format to the desired format in the `file_convert` plugin (https://ytdl-sub.readthedocs.io/en/latest/config.html#file-convert)
This commit is contained in:
Jesse Bannon 2023-09-02 11:18:04 -07:00 committed by GitHub
parent 372d3bbf02
commit 792da1ba86
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 4 deletions

View file

@ -131,13 +131,14 @@ class FileConvertPlugin(Plugin[FileConvertOptions]):
"""
if self.plugin_options.convert_with == "yt-dlp":
return {
"merge_output_format": self.plugin_options.convert_to,
"postprocessors": [
{
"key": "FFmpegVideoRemuxer",
"when": "post_process",
"preferedformat": self.plugin_options.convert_to,
}
]
],
}
return None

View file

@ -1,7 +1,7 @@
{
".ytdl-sub-file_convert_test-download-archive.json": "65aa49c7345f9fc201e42ddc4a96b19b",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3-thumb.jpg": "662fcaadf6e80d63591bac19a5fdffb0",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json": "5201f78cc65d5bb26aeea114e11d6264",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mp4": "390177bcc076e309d1534b8bb5afdcc7",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json": "85c11537bb98cd369440c8cf3847e542",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mp4": "fa29d8b1482e37be643f1b4a127e5185",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo": "cacf09ab38f9b3085da9c5af516cf22a"
}

View file

@ -1,7 +1,7 @@
{
".ytdl-sub-file_convert_test-download-archive.json": "74813dccf4e9732e49f5dc3c2d66f3be",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3-thumb.jpg": "662fcaadf6e80d63591bac19a5fdffb0",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json": "20cf671c3a613d4aae8f5bfbf14feba0",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.info.json": "fb74c288f4d39be4c1234fa3a10562a7",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.mkv": "b5f248b560f89f3f2a83fcdcd197d486",
"Beyond The Guitar/Beyond The Guitar - When you hear Hugh Jackman is returning as Wolverine in Deadpool 3.nfo": "cacf09ab38f9b3085da9c5af516cf22a"
}