Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pass arguments to yt-dlp in SimpleYoutubeDLGui.py #3

Open
andekande opened this issue Jun 9, 2022 · 14 comments
Open

pass arguments to yt-dlp in SimpleYoutubeDLGui.py #3

andekande opened this issue Jun 9, 2022 · 14 comments
Assignees
Labels
enhancement New feature or request question Further information is requested

Comments

@andekande
Copy link

Is your feature request related to a problem? Please describe.
In order to be able to freely control yt-dlp behaviour, especially the download and geo-unblocking options, a input field for command line arguments passed to yt-dlp shall be provided.

Describe the solution you'd like
I'd like to set the argument --add-header "Referer:<some_url>" to download a specific video via yt-dlp that is hosted on a cdn that checks the Referer HTTP Header to be a specific url.

@andekande andekande added the enhancement New feature or request label Jun 9, 2022
@jessielw jessielw transferred this issue from jessielw/FFMPEG-Audio-Encoder Jun 10, 2022
@jessielw
Copy link
Owner

This is the main repo where I work on this app.

I'm heavy at work on another app, but I'll see if I can't get this updated for what you need early next week.

@jessielw
Copy link
Owner

jessielw commented Jun 16, 2022

I'd like for you to test this in the latest build

https://github.com/jlw4049/Simple-Youtube-DL-GUI/releases/download/1.23/Simple-Youtube-DL-GUI.v1.23.zip

This is not ported over to FFMPEG Audio Encoder yet, I made the standalone update here to test and improve it. Going to close this comment, but will be looking forward to hearing back from you on this matter

EDIT: When using the new entry box, it needs to be in the format as you requested
image

value:key (value colon key, no spaces)

@andekande
Copy link
Author

Great, it works. The protected video can be downloaded.
Yet, If I leave the input field empty, the progress pop-up does not show an error anymore. It just hangs at "[generic] master: Downloading webpage"

However, may I suggest to be able to put multiple values in there. So:
Referer:https://www.youtube.com/;Origin:https://www.youtube.com/;User-Agent:"Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0"

The User-Agent is a bit more complicated since the key contains semicolon and therefore must be in quotes.

Actually, initially I thought of a possibility to pass any ytdl argument. Examples:
--add-header Referer:https://www.youtube.com/ --add-header Origin:https://www.youtube.com/ --add-header User-Agent:Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0 --proxy socks5://user:pass@127.0.0.1:1080/ --force-ipv4 --yes-playlist

Thanks so far.

@jessielw
Copy link
Owner

Actually, initially I thought of a possibility to pass any ytdl argument. Examples: --add-header Referer:https://www.youtube.com/ --add-header Origin:https://www.youtube.com/ --add-header User-Agent:Mozilla/5.0 (Windows NT 10.0; rv:91.0) Gecko/20100101 Firefox/91.0 --proxy socks5://user:pass@127.0.0.1:1080/ --force-ipv4 --yes-playlist

Keep in mind, I'm not using the CLI version of yt-dlp. This is built around the python module, it's calling to it directly.
I'll see what I can do on the other issue

@jessielw
Copy link
Owner

Have you seen my bigger version of the tool? That actually runs with the CLI?

https://github.com/jlw4049/Youtube-DL-GUI

Maybe we should be focusing on improvements for this one. This SimpleYoutubeDLGui, was meant to be just that, simple. I could improve either one of them to do anything, but as far as run the CLI commands easily, it would probably be best to focus the other tool.

@andekande
Copy link
Author

Well the Use-Case I originally had in mind is to re-encode the audio track of a downloaded video with FDK AAC or QAAC encoder. The video is mainly interview style, so having a portable audio track allows for taking it with me on my smartphone.
That's why the issue originated in FFMPEG-Audio-Encoder repository.

I wasn't aware of the way the Simple GUI works, but I totally get it now why passing the arguments wont work. In the end only the most basic switches shall be there. Having support for multiple HTTP Header is sufficient.

I tried the Youtube-DL-GUI and for the protected video it shows "WARNING: [generic] Could not send HEAD request to [url]: HTTP Error 403: Forbidden" already when clicking on "Add Link". With the Simple GUI the [url] is straight accepted, even keeping the new HTTP Header input field empty.

Sure, the bigger version does also benefit from being able to customize HTTP Header. I see a "View Command" Button in that tool. Being able to manually edit the command would be sufficient I guess.

@jessielw
Copy link
Owner

Do you think it would be best, we turn our attention on working on the larger version of the app?

@andekande
Copy link
Author

fine for me, as the link can#t even be parsed there

@jessielw
Copy link
Owner

fine for me, as the link can#t even be parsed there

I can work on it and make that a non issue.

Is there anyway you can share this link or a "protected" link with me for testing purposes?

@jessielw jessielw transferred this issue from jessielw/Simple-Youtube-DL-GUI Jun 19, 2022
@jessielw jessielw reopened this Jun 19, 2022
@jessielw jessielw added the question Further information is requested label Jun 19, 2022
@andekande
Copy link
Author

https://vod01-hbs73b283k-was.zmnet.net/hbs73b283k/pub/c20124c4-be15-4078-a0e6-00edc6f6fc47/master.m3u8
needs Referer https://player.zealstream.com/

@jessielw
Copy link
Owner

Thanks, I am able to produce the error on both simple and the larger CLI version of the app. The Simple version of the app just handles the error differently and loads the link for you. I'll try to get around to this today!

@jessielw
Copy link
Owner

I'm sorry as work on the other app took much longer then I originally planned. Is this still something you are interested in?

@andekande
Copy link
Author

As my download needs are covered by now it's not of much relevance to me personally. Would be rather a question of how feature rich you want that software to be, to the good of all other users.

@jessielw
Copy link
Owner

Would a custom command line section be of use to you with the GUI?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants