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.
Why is "-f mp4" needed on some systems but not others? #5567
Comments
|
youtube-dl now default to download and merge DASH video and audio if ffmpeg/avconv is installed, so if one of your systems has it it will try to download them. You can extract them from the |
Yep. That was it. The system in question has ffmpeg/avconv. Pretty weird behavior, but I got it now.
"-f best" works (and looks better than -f mp4). |
It only works for systems with ffmpeg (or if you use |
I got that, but I just typo'd. So, no worries. $ youtube-dl.py -j 'https://www.youtube.com/watch?v=K5QMjtgWdG0' | jq '.requested_formats[]|.url' |
Observe:
(On "system A", running Linux)
$ youtube-dl.py --version
2015.04.28
$ youtube-dl.py -j 'https://www.youtube.com/watch?v=K5QMjtgWdG0' | jq .url
null
$
Now, on "system B", another Unix-y system, running the same version of youtube-dl, the above command returns a valid/useful url. As far as I can tell, the only material difference between the two systems is that system A is running Python 2.7.3 while system B is running 2.7.2. Yet, it is system A that fails.
Now, I've tracked this down, and figured out that it has to do with video formats and that in the failure mode, the problem is that the "url" field is wrapped inside an array (I think that's the correct JSON term for what I think of as a "structure") and thus the very simple "jq" program doesn't find it. Unfortunately, I don't know enough "jq" to know how to parse into the structures and extract the "url" filed(s) therefrom.
But, I have figured out that if I add the option "-f mp4" to the command line (just before the "-j"), then the problem goes away (i.e. I get a valid URL from jq).
So, my questions are:
and