-
Notifications
You must be signed in to change notification settings - Fork 364
[bug] Some youtube videos download xml instead of video #309
Comments
The video from this issue is gone, but the same thing happens to https://vimeo.com/56282283, which downloads a gzipped xml instead, even though I am not sure of what is the idea after browsing the code. It seems that instead of letting youtube-dl actually download the video, @Kikobeats could explain the idea here? I imagine downloading in JS gives you a stream object, which is nice, but apparently the Also,
My first impulse here is to use YTDL itself to do the download. This would change the package significantly, but would get rid of any problems. YTDL provides progress code when using
It'd be nicer to get this in machine parseable format, but it's viable to parse the '[download]' lines. Any thoughts? |
Ok, so I looked into this and it'd be reimplementing part of youtube-dl to support the conversion of separate audio and video. I started to implement code to use youtube-dl to download the video but it ended up changing things so much that I ended rewriting everything from scratch. The new project is at https://github.com/Corollarium/youtubedl-wrapper. I added a back link to this project. |
@brunobg happy so ship it as major version; keep it as a separate project is also comprehensible 👍 |
It's a major rewrite moving to promises and all. I'll ping you when I finish a stable release and see if you want to overhaul and merge. I also noticed https://github.com/ghjbnm/youtube-dl-wrap which I hadn't before for some reason, who created a very similar API to mine. Perhaps we could all work together. |
I released v1.0 today. It misses playlists and subtitles, which I'll add eventually. Check if you want to merge it somehow. |
Hello,
The above simple code, downloads a specific audio stream from the youtube link shown and saves it into a file. In most videos from youtube this works perfectly. But in some rare cases like this specific video (please no comments, i know the video sucks, but it's an example :p), the output is actually a gzip'd xml file and not an actual audio file.
The on('error') event is not invoked when obviously something has gone wrong here. I have also tried try catch statements but this is also not caught anywhere. This is bad because when no error control works, trying to play this file crashes the whole app.
I am attaching the extracted xml file for debug purposes. (I have extracted it, renamed it to .xml and zipped it so that github would allow uploading)
Regards
output.webm.zip
The text was updated successfully, but these errors were encountered: