ErrorFlynn / ytdlp-interface

Windows graphical interface for yt-dlp, designed as a simple YouTube downloader
MIT License
1.07k stars 56 forks source link

Choosing custom set of video and audio tracks #14

Open MiracleIC opened 2 years ago

MiracleIC commented 2 years ago

First of all, thanks for your program for lazy downloaders 👍 Some videos on Youtube have a bunch of downloadable video and audio tracks. This one, for example: https://www.youtube.com/watch?v=1La4QzGeaaQ&t=34s&ab_channel=Jacob%2BKatieSchwarz By default when you choose desired resolution the program downloads the video track with maxumum bitrate for that resolution and audio with the maximal bitrate. And automatically packs those tracks to one MKV container. However, if I want another videotrack from the list (particullary for this video - 4k with no HDR), it does not download audio track for me and, therefore, does not pack them in into a conainer. I'm pretty sure it can be done form CLI :), but would like to do it just by choosing custom set of tracks. Would it be possible to do? Thanks.

ErrorFlynn commented 2 years ago

If you go into Settings, you'll find the checkbox "YouTube: show video info and list available formats". Check it, and then you can select the video and audio you want.

MiracleIC commented 2 years ago

Yes, that is exactly I what I did and I could not get a file with audio. That is why I started this issue. I just tried it again with downloading to the empty folder and, yes, got the file with audio. It is not in MKV container, but it is ok.

But it works only if there is no file with the same name. When I was not familiar enough with your great utility I made mistake and downloaded just video track. Then I figured out this, chose both video and desired audio. But the program saw the same file in place and did not do anything.

I've just reproduced this scenario and got the same result. So, need to delete the file without audiotrack and run downloading again. With 5 minutes file (about 1GB) it is ok, but if somebody wants to download 1.5 hour video and make the same mistake it will be a big trouble. May be make sense to add a dialog like "Do you want: 1. download again, 2. add/change audio track"? Or add a check box: "Add/Change audio track"

And would be nice to have ability to choose output container even with downloading files in webm format.

ErrorFlynn commented 2 years ago

But it works only if there is no file with the same name. When I was not familiar enough with your great utility I made mistake and downloaded just video track. Then I figured out this, chose both video and desired audio. But the program saw the same file in place and did not do anything.

I see. I don't think I can do anything about that, because it would be too complicated and time consuming. The program would have to actually inspect the contents of the file and determine what tracks are in the container, and then offer options accordingly. That's not trivial to do (at least not for me, since I've never done that before and I'd have to research how to do it), and more important features have priority right now. Edit: it just occurred to me that I could probably use ffprobe to get the track list. Maybe some day I'll do that.

And would be nice to have ability to choose output container even with downloading files in webm format.

I haven't looked into it, but I think yt-dlp has an option that you can use to call ffmpeg and make it remux the audio/video track(s) into a compatible container. I will keep this in mind as a possible feature addition for the future, along with explicit support for SponsorBlock and some other low-priority stuff.

MiracleIC commented 2 years ago

That's not trivial to do (at least not for me, since I've never done that before and I'd have to research how to do it), and more important features have priority right now.

I see. Ok, may be you could make a temporary solution: check, if the file exist suggest to the user options: rename/delete/remux with chosen audiotrack. Firat two options for short videos, third - for the long one. In this case you won't need to inspect the content and download only the audiotrack for remuxing.

it just occurred to me that I could probably use ffprobe to get the track list. Maybe some day I'll do that.

Looks like a plan 😊

I think yt-dlp has an option that you can use to call ffmpeg and make it remux the audio/video track(s) into a compatible container.

I'm an old lazy electronic engineer with some knowledge of programming. Definitely can lok into the yt-dlp options, and find the solution if it needed right away. However, I can live with the current solution and wait for you.

I will keep this in mind as a possible feature addition for the future

Ok, great!

DajMiliona commented 2 years ago

Can you add this option for all video links? (video info and list available formats) Example https://d3s2m20z4djjuz.cloudfront.net/content/vod/bcaa1db4-76ef-7e06-8da7-839bd0ad1dbe/bcaa1db4-76ef-7e06-8da7-839bd0ad1dbe_nodrm_e343a558-832c-49ba-9e56-ee2695200f31.ism/manifest.m3u8?t=2022-09-14T12:26:51Z-2022-09-14T12:27:13Z

and

https://d3s2m20z4djjuz.cloudfront.net/content/vod/bcaa1db4-76ef-7e06-8da7-839bd0ad1dbe/bcaa1db4-76ef-7e06-8da7-839bd0ad1dbe_nodrm_e343a558-832c-49ba-9e56-ee2695200f31.ism/manifest.m3u8

General for links witch m3u8 extension manifest, ism, mpd

ErrorFlynn commented 2 years ago

Can you add this option for all video links? (video info and list available formats) Example https://d3s2m20z4djjuz.cloudfront.net/content/vod/bcaa1db4-76ef-7e06-8da7-839bd0ad1dbe/bcaa1db4-76ef-7e06-8da7-839bd0ad1dbe_nodrm_e343a558-832c-49ba-9e56-ee2695200f31.ism/manifest.m3u8?t=2022-09-14T12:26:51Z-2022-09-14T12:27:13Z

and

https://d3s2m20z4djjuz.cloudfront.net/content/vod/bcaa1db4-76ef-7e06-8da7-839bd0ad1dbe/bcaa1db4-76ef-7e06-8da7-839bd0ad1dbe_nodrm_e343a558-832c-49ba-9e56-ee2695200f31.ism/manifest.m3u8

General for links witch m3u8 extension manifest, ism, mpd

I'll probably do this at some point, but not in the next version though. Thanks for the suggestion.

JonnyThree commented 1 year ago

hello thanks for this nice gui for yt-dlp, i really like the custom a/v format window but, it's possible to use this for non-youtube videos? example: discoveryplus.com?

ErrorFlynn commented 1 year ago

hello thanks for this nice gui for yt-dlp, i really like the custom a/v format window but, it's possible to use this for non-youtube videos? example: discoveryplus.com?

I'm going to try to implement a generic format list that works for all sites, very soon (if I succeed, it might be in the next version). I can't say for sure how possible it is yet (that remains to be seen), but I'm pretty confident it will work.

JonnyThree commented 1 year ago

hello thanks for this nice gui for yt-dlp, i really like the custom a/v format window but, it's possible to use this for non-youtube videos? example: discoveryplus.com?

I'm going to try to implement a generic format list that works for all sites, very soon (if I succeed, it might be in the next version). I can't say for sure how possible it is yet (that remains to be seen), but I'm pretty confident it will work.

very thanks for your work, i really like this gui and i think that it's maybe the best gui available at today