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.
Before submitting an issue make sure you have:
What is the purpose of your issue?
This is a real pain with downloads from video.vice.com
Vice extractor is not working right now anyway (#13778) but we can still download by providing m3u8 url to youtube-dl
Problem is some videos contain an ad segment and it causes downloaded video file to have bad resolutions, bad framerates, out of sync issues, compatibility issues to make it unable to play in a lot of players etc..
There is actually a closed issue opened before about this here: #14992
It was closed because dev couldn't reproduce it with another video. But these ad segments may not present in every video.
When I was searching a solution for this I came across a lot of forum threads about this issue where people were complaining about these downloaded videos from vice with bad resolutions and looking for a solution. So it's an annoying problem.
Anyway I found a solution and I will tell you how it's so much struggle to do that and would be nice if youtube-dl handles these manual steps.
Take this for example: https://video.vice.com/en_us/video/bleu-blanc-satan-full-length/58e3e28982d5b9350c82dbe5
Now I can't directly give you a m3u8 url because they contain tokens so you need to inspect the traffic and get it yourself.
Now when you get the m3u8 url from that page and pass it to youtube-dl, the video file downloaded will have incorrect/bad resolution, bad framerate and will fail to play in a lot of players and will have out of sync audio issues.
That's all because of an "ad" segment at the start of the hls stream. Copied this from start of the 1080p m3u8 file and highlighted that relevant part:
See that segment I highlighted? That's the source of all problems. Now when I save this m3u8 file to my computer and modify it by removing these lines I highlighted and save it. And then provide that modified m3u8 file to youtube-dl, resulting downloaded video file is perfect. It will have correct resolutions, correct framerate and will open in all players without a problem.
And btw I have to run a webserver at localhost to provide that modified m3u8 file to youtube-dl because it says file:// protocol is disabled for security reasons. So that's another pain in the process. You can see how much struggle it is to just remove these lines to download the video correctly.
So what I'm asking is it would be awesome if youtube-dl itself can handle these steps and remove or ignore that harmful "ad" segment so downloaded video files won't be malformed. I mean before sending the m3u8 data to ffmpeg, delete that segment I highlighted from it and send that modified m3u8 data to ffmpeg. So we won't have to deal with modifying m3u8 file, going through troubles to provide modified m3u8 to youtube-dl etc..
Please consider adding this fix to youtube-dl. Thanks in advance!