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.
Downloading video *AND* audio, in a consistent way? #6818
Comments
|
If you want video+audio as single file to have higher priority over other formats you should put it first when specifying preference with |
|
Thank you. |
Is there a way to download video and audio in a consistent way?
Background: I have a wrapper script for Youtube-dl. At first, when I was playing with YouTube, 480p downloads gave .flv files, and asking for mp4's gave me 360p's with audio. Getting both video and audio from youtube required fetching two files, converting the flv to mp4, and combining.
Next, I found that other sites that had mp4's would return mp4 videos with audio already in them.
Youtube now makes 480p's in mp4 format, and the HTML5 player has been playing mp4's with nothing apparently special about them, so I adjusted my script to fetch mp4 files and be done.
But ... I've discovered that while I've gotten video plus audio from PBS for nova, and from Chrunchyroll for other TV shows, my youtube downloads have been video without audio.
What is the proper way to say "Fetch this video file, and only make an attempt to fetch an additional audio file if there isn't one already in the video"?
For that matter, is there a way to do the same thing with subtitles -- only fetch a subtitle if the video doesn't have one?
My current wrapper: