Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
'NOT' Operator (!) causes conflict with equality syntax such as !^= and !*=, must escape #24383
Comments
|
This has nothing to do with youtube-dl. Escaping special characters of your shell is your responsibility. |
Checklist
Verbose log
Description
I have used a series of examples to demonstrates the bug. Before you start following, it is useful to know that my goal was to universally extract the best audio and video format that is not AV1, because it is difficult for playback and not a good source for transcoding (to HEVC for example).
So, I would need
-f bestvideo[vcodec!^=AV01.]+bestaudioPlay attention to what I typed in bash, and what the program recognized in debug feedback. It changes the input in a way that is unexpected. (this is the same if I exit BASH and run directly as macOS Terminal command. There is no special bash profiles)
My bash version is below.
Read the
FORMAT SELECTIONsection in the manual viaman youtube-dl, then scroll down to find this block for reference or search by typing/By defaultand hit enterNote that using brackets
[], (), or placing the!elsewhere did not solve the issue. The only way to do that is by escaping with a backslash\!^=, which can be seen in the demo log above.Since this is a part of the syntax, it really doesn't make sense for it to behave this way. This is not in the manual and I just stumbled on this workaround.