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.
Parameter to output video information (special sequences as in output template) #22442
Comments
|
Parse JSON output. |
Create a parameter to be passed such that youtube-dl will output info about the video. This would be of big help to 3rd party tools that can get the info easier. When the parameter is passed to youtube-dl, along with the URL, the output should be listing ALL the special sequences that are valid.
Additionally, it should output also the thumbnail URL, all available formats (-F) and best audio, best video, and overall best formats.
Not applicable sequences would be either skipped or shown as null.
Example:
youtube-dl.exe "https://www.youtube.com/watch?v=dQw4w9WgXcQ" --get-infoOutput:
This parameter will take precedence over any other parameter, and the video will not be downloaded. The only exception would be "-o" through which a file can be specified. If such is the case, youtube-dl will output everything to that file instead of the console. This mode would be preferred because the console might not support Unicode characters (ăîâșț). The parameter itself might have different modes of work:
--get-info plainwould output plain text,<sequence> = <value>as the example from before.--get-info jsonwould output data in json format.--get-info xmlwould output data in xml--get-info nbtwould output data in Notch's named binary tag format and so on...Both text-based and binary-based formats can be used.
This functionality is nonetheless currently attainable through something like
youtube-dl <URL> -o %(NAME)s --get-filenamebut to get ALL sequences it is required to run a youtube-dl instance for each. This eats a lot of RAM and by using --get-info we can improve running time of 3rd party programs.Also, 3rd party programs might choose to use youtube-dl through CLI instead of integrating it in itself because in this way youtube-dl can be updated independently of the GUI program.
Thanks a lot for reading! (If I knew python, I would have done it myself.)