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.
Question: Order of output from the -e, -g, etc cmd line options? #26651
Comments
|
Bueller? Bueller? |
|
These options are not supposed to be used together in the first place, you should use JSON output instead. |
|
I have used JSON output from youtube-dl on prior occasions. But that adds complexity. Is it documented anywhere that you aren't supposed to use more than one of these at a time? Or is that just an opinion? Anyway, still curious about the answer. Is it deterministic what order they will come out in? |
I have a script where I use youtube-dl to generate the title, the (long) URL, and the duration of a video. I use the options: -e, --get-duration, and -g
It works fine, but I've noticed that the output (which is redirected to a file with ">") always comes out in the order (3 lines in the output file):
title
url
duration
regardless of the order of the command line options. I.e., I can use the order I listed above (-e first, then --get-duration, then -g) or any other order, but it always come out in the order shown above.
This is fine, of course, and obviously not a bug, but I want to know a) Why this is and b) Can I rely on it (always coming out in that order) ?
Version is 2020.09.06, running under Windows 10.