-
Notifications
You must be signed in to change notification settings - Fork 85
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
Update youtube.php #220
Open
GAS85
wants to merge
3
commits into
e-alfred:master
Choose a base branch
from
GAS85:patch-1
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Update youtube.php #220
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This line has a wrong syntax. The "ternary operator" works like this
(you missed the ?`).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This now changes the beheviour from before. If
$ExtractAudio
was true it added-f $fAudio
and-x
. This now changed. If$fAudio
isset it adds-f
as well. According to the youtube-dl doc-f
is for video only. If$fAudio
and$fVideo
isset it adds two-f
what doen't look correct to me.Could you please have another look here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I did update to your 1st comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, my Idea was if user set Audio Format, than he expect to have this audio settings when extracting audio only AND downloading video. What was before is Audio setting is only active when user extracts Audio only. Those two behaviors are different and personally I prefer to have 1st one.
But if you thing the 2nd is correct one, than it can be send not with
-f
, but rather with following options:You right, documentation does not highlight it directly, but in a section https://github.com/ytdl-org/youtube-dl/blob/master/README.md#format-selection-examples you can see that Video and Audio options could be combined after
-f
key. E.g.youtube-dl -f 'bestvideo[height<=480]+bestaudio/best[height<=480]'
I did few tries and this works perfect also for:
And what I try also:
Does NOT work for
In #219 it is highlighted that
-f
must not be send when nothing is set infAudio
/fVideo
, so I divide it to 2 checks and-f
should be suppressed for empty keys.After investigations I find out that setting
fAudio
andfVideo
together with-x
will simply ignores video values and extract audio only as expected, so there is no harm to addfVideo
even when user extracts audio only. Of course we can add here 2nd check for audio only, but to be honest IDK how.