[BACKEND] Only download audio when using audio_extract plugin
This commit is contained in:
parent
c0ca3c3945
commit
a5f765e2f1
7 changed files with 11 additions and 10 deletions
|
|
@ -102,6 +102,8 @@ class AudioExtractPlugin(Plugin[AudioExtractOptions]):
|
||||||
return ytdl_options_builder.add(
|
return ytdl_options_builder.add(
|
||||||
{
|
{
|
||||||
"postprocessors": [postprocessor_dict],
|
"postprocessors": [postprocessor_dict],
|
||||||
|
"format": "bestaudio/best",
|
||||||
|
"keepvideo": False,
|
||||||
}
|
}
|
||||||
).to_dict()
|
).to_dict()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -178,6 +178,7 @@ class SubscriptionYTDLOptions:
|
||||||
self._output_options,
|
self._output_options,
|
||||||
self._plugin_match_filters,
|
self._plugin_match_filters,
|
||||||
self._plugin_ytdl_options(FormatPlugin),
|
self._plugin_ytdl_options(FormatPlugin),
|
||||||
|
self._plugin_ytdl_options(AudioExtractPlugin), # will override format
|
||||||
self._user_ytdl_options, # user ytdl options...
|
self._user_ytdl_options, # user ytdl options...
|
||||||
self._info_json_only_options, # then info_json_only options
|
self._info_json_only_options, # then info_json_only options
|
||||||
)
|
)
|
||||||
|
|
@ -195,8 +196,8 @@ class SubscriptionYTDLOptions:
|
||||||
self._plugin_ytdl_options(FileConvertPlugin),
|
self._plugin_ytdl_options(FileConvertPlugin),
|
||||||
self._plugin_ytdl_options(SubtitlesPlugin),
|
self._plugin_ytdl_options(SubtitlesPlugin),
|
||||||
self._plugin_ytdl_options(ChaptersPlugin),
|
self._plugin_ytdl_options(ChaptersPlugin),
|
||||||
self._plugin_ytdl_options(AudioExtractPlugin),
|
|
||||||
self._plugin_ytdl_options(FormatPlugin),
|
self._plugin_ytdl_options(FormatPlugin),
|
||||||
|
self._plugin_ytdl_options(AudioExtractPlugin), # will override format
|
||||||
self._user_ytdl_options, # user ytdl options...
|
self._user_ytdl_options, # user ytdl options...
|
||||||
self._download_only_options, # then download_only options
|
self._download_only_options, # then download_only options
|
||||||
)
|
)
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,6 @@ def single_preset_dict(output_directory):
|
||||||
"music_tags": {"genres": ["multi_tag_1", "multi_tag_2"]},
|
"music_tags": {"genres": ["multi_tag_1", "multi_tag_2"]},
|
||||||
# test the new embed_thumbnail plugin
|
# test the new embed_thumbnail plugin
|
||||||
"embed_thumbnail": True,
|
"embed_thumbnail": True,
|
||||||
"format": "worst[ext=mp4]",
|
|
||||||
"audio_extract": {"codec": "mp3", "quality": 320},
|
"audio_extract": {"codec": "mp3", "quality": 320},
|
||||||
"ytdl_options": {
|
"ytdl_options": {
|
||||||
"postprocessor_args": {"ffmpeg": ["-bitexact"]}, # Must add this for reproducibility
|
"postprocessor_args": {"ffmpeg": ["-bitexact"]}, # Must add this for reproducibility
|
||||||
|
|
@ -36,7 +35,6 @@ def youtube_release_preset_dict(output_directory):
|
||||||
return {
|
return {
|
||||||
"preset": "YouTube Releases",
|
"preset": "YouTube Releases",
|
||||||
"audio_extract": {"codec": "vorbis", "quality": 140},
|
"audio_extract": {"codec": "vorbis", "quality": 140},
|
||||||
"format": "worst[ext=mp4]", # download the worst format so it is fast
|
|
||||||
"ytdl_options": {
|
"ytdl_options": {
|
||||||
"postprocessor_args": {"ffmpeg": ["-bitexact"]}, # Must add this for reproducibility
|
"postprocessor_args": {"ffmpeg": ["-bitexact"]}, # Must add this for reproducibility
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
".ytdl-sub-multiple_songs_test-download-archive.json": "54237df5e00d1598dfd39f341ee03d75",
|
".ytdl-sub-multiple_songs_test-download-archive.json": "54237df5e00d1598dfd39f341ee03d75",
|
||||||
"Project Zombie/[2011] Jesse's Minecraft Server/01 - Jesse's Minecraft Server [Trailer - Mar.21].ogg": "93665cc4302010d9f20001f308c4978a",
|
"Project Zombie/[2011] Jesse's Minecraft Server/01 - Jesse's Minecraft Server [Trailer - Mar.21].ogg": "e7a8a94ebe9f02f086f4bbf3df3946f6",
|
||||||
"Project Zombie/[2011] Jesse's Minecraft Server/02 - Jesse's Minecraft Server [Trailer - Feb.27].ogg": "a2a3a34e02e26a6c0265530d4499473b",
|
"Project Zombie/[2011] Jesse's Minecraft Server/02 - Jesse's Minecraft Server [Trailer - Feb.27].ogg": "aeea4b086507fd7fde3c09c0bd868950",
|
||||||
"Project Zombie/[2011] Jesse's Minecraft Server/03 - Jesse's Minecraft Server [Trailer - Feb.1].ogg": "0a385da3aa06b994a69b8ab812b44975",
|
"Project Zombie/[2011] Jesse's Minecraft Server/03 - Jesse's Minecraft Server [Trailer - Feb.1].ogg": "80200d21a46c7f521bfb23aef2f87e34",
|
||||||
"Project Zombie/[2011] Jesse's Minecraft Server/folder.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530"
|
"Project Zombie/[2011] Jesse's Minecraft Server/folder.jpg": "e7830aa8a64b0cde65ba3f7e5fc56530"
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
".ytdl-sub-single_song_test-download-archive.json": "c8ff22ec3304c9f8dab18cedaed4e8b4",
|
".ytdl-sub-single_song_test-download-archive.json": "c8ff22ec3304c9f8dab18cedaed4e8b4",
|
||||||
"YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind/01 - YouTube Rewind 2019: For the Record | #YouTubeRewind.mp3": "991b0eb62683c2194c5bdfa9a61ab18e",
|
"YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind/01 - YouTube Rewind 2019: For the Record | #YouTubeRewind.mp3": "829eb7dcc5dcae41240701dec4e1708d",
|
||||||
"YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind/folder.jpg": "50ee47c80f679029f5d3503bb91b045a"
|
"YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind/folder.jpg": "50ee47c80f679029f5d3503bb91b045a"
|
||||||
}
|
}
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
{
|
{
|
||||||
".ytdl-sub-single_song_best_test-download-archive.json": "f179ccfe0a9b3a76ae62122a3ccb58fd",
|
".ytdl-sub-single_song_best_test-download-archive.json": "0f9484ed868dcbeef82810a3cf7b0eea",
|
||||||
"YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind/01 - YouTube Rewind 2019: For the Record | #YouTubeRewind.m4a": "114b35c29df84146cd98207f807b837b",
|
"YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind/01 - YouTube Rewind 2019: For the Record | #YouTubeRewind.opus": "73e4afdda9bc792807c8b07a63128e5a",
|
||||||
"YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind/folder.jpg": "50ee47c80f679029f5d3503bb91b045a"
|
"YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind/folder.jpg": "50ee47c80f679029f5d3503bb91b045a"
|
||||||
}
|
}
|
||||||
|
|
@ -3,7 +3,7 @@ Files created:
|
||||||
{output_directory}
|
{output_directory}
|
||||||
.ytdl-sub-single_song_best_test-download-archive.json
|
.ytdl-sub-single_song_best_test-download-archive.json
|
||||||
{output_directory}/YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind
|
{output_directory}/YouTube/[2019] YouTube Rewind 2019: For the Record | #YouTubeRewind
|
||||||
01 - YouTube Rewind 2019: For the Record | #YouTubeRewind.m4a
|
01 - YouTube Rewind 2019: For the Record | #YouTubeRewind.opus
|
||||||
Music Tags:
|
Music Tags:
|
||||||
album: YouTube Rewind 2019: For the Record | #YouTubeRewind
|
album: YouTube Rewind 2019: For the Record | #YouTubeRewind
|
||||||
albumartist: YouTube
|
albumartist: YouTube
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue