tubesync icon indicating copy to clipboard operation
tubesync copied to clipboard

download both audio and video of same source

Open binarygeek119 opened this issue 3 years ago • 10 comments

i would like to download both audi and video from some sources

for example epic rap battles of history channel https://www.youtube.com/user/ERB as i want both the audio only and the video aswell

binarygeek119 avatar Mar 19 '21 00:03 binarygeek119

Hi. I can see why you would want this but this is probably a bit challenging (either technically, or via messy UI) to implement in TubeSync in its current state. I'll put this onto the future potential wishlist, but if this is implemented it won't be for a while. Thanks for the feedback and suggestion!

meeb avatar Mar 19 '21 04:03 meeb

I believe this is similar enough to #91 youtube-dl cannot download video and audio simultaneously, so imho there are two reasonable options:

  1. Adding two identical sources with different settings
  2. Download video and post-process to extract audio stream via ffmpeg

PhuriousGeorge avatar Apr 04 '21 16:04 PhuriousGeorge

Yep, you are correct @PhuriousGeorge (this was the "either technically, or via messy UI") bit in my original comment. Adding duplicate media to sources would require significant work as that's currently a database constraint relied on in a bunch of places and I'd really rather not implement subprocess post-process calling of ffmpeg in TubeSync if it can be avoided as this would also complicate downloads where one download had to rely on another download completing first.

While I can see the point of the feature, this may well be on the wishlist for a while!

meeb avatar Apr 05 '21 00:04 meeb

I would like to see this feature as well, but as a workaround:

  1. Spin up a second container with its own volume and its own settings.
  2. Add the channel source you want both audio and video from separately, and adjust settings to your needs.

The download location could conceivably be the same as the first container, but I wouldn't risk having the two instances overwrite each others' downloaded files. They would definitely need separate config locations.

csjoh avatar Jan 03 '22 14:01 csjoh

Running a second TubeSync instance is probably likely to be the only sensible way to handle this for the time being. I can't see the required internal restructuring to allow for multiple copies of the same media to be stored correctly with different source settings being added any time soon. Thanks for the suggestion for others.

meeb avatar Jan 03 '22 14:01 meeb

Hello, there is a‘‘--keep-video’’ option in the yt-dlp, is it possible to add this option in tubesync? It will keep both a video-only file and an audio-only file and it will be best we can choose to keep the video-only file or the audio-only file. Thank you.

--keep-video Keep the intermediate video file on disk after post-processing

sywhn avatar Dec 29 '23 04:12 sywhn

That's probably a different issue @sywhn - also what would be the use case for this feature over just audio-only? Is there actually a requirement for video-only downloads?

meeb avatar Dec 29 '23 09:12 meeb

Thank you for the reply. Actually I am an English learner, and i want to download both video and audio at the same time, so that I also can practice my listening skills through listening to the audio.

sywhn avatar Dec 29 '23 10:12 sywhn

Ah I see, sounds sensible. The default yt-dlp flags are editable in the settings.py (or override the dict in local_settings.py):

https://github.com/meeb/tubesync/blob/main/tubesync/tubesync/settings.py#L157

I'll see how feasible it is to make this a config flag. Note these are the API parameters, not the CLI arguments.

meeb avatar Dec 29 '23 17:12 meeb

Thank you. Look forward to it.

sywhn avatar Dec 31 '23 13:12 sywhn