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.
Is there a way to programmatically determine the `-x`-produced filename? #5096
Comments
|
Now I realized simply parsing the stdout should do. Forget about this. |
I'm wrapping youtube-dl into my own library, as the base of a Chrome extension I'm trying to make. One of the requirements is to obtain only the audio, also getting the filename of the produced audio file. For youtube videos I can make it work using
-f bestaudioand--get-filename( or-v), with or without--restrict-filenames, but for most other sites where standalone audio file is not available, I can't find a way to programmatically find out the-x-ed output filename. As I said my goal is to make a general purposed video downloading component/extension (though definitely not feature rich as youtube-dl itself), forcibly specify--audio-formatother thanbestisn't a ideal solution. Is there a way to programmatically determine the-x-ed filename, or at least the name extension?