Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another video is being downloaded along with required one #4610

Closed
kartikarora opened this issue Jan 1, 2015 · 12 comments
Closed

Another video is being downloaded along with required one #4610

kartikarora opened this issue Jan 1, 2015 · 12 comments

Comments

@kartikarora
Copy link

@kartikarora kartikarora commented Jan 1, 2015

Along with the required video from youtube, another video is automatically downloaded. This happened with me when I was downloading this video and has been happening since.

I'm using youtube-dl 2014.02.17.2 as per youtube-dl --version on Ubuntu 14.04.1 and its not getting updated beyond this version.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 1, 2015

Post the full output you get when running with --verbose option.

@phihag
Copy link
Contributor

@phihag phihag commented Jan 1, 2015

Additionally, see our FAQ for instructions on how to update.

@kartikarora
Copy link
Author

@kartikarora kartikarora commented Jan 1, 2015

@phihag I uninstalled youtube-dl and reinstalled using curl, its downloaded and installed 2014.12.17.2

@dstftw Here's the output. I downloaded this video. I tried this video downloading normally (without --verbose) and I wasn't able to reproduce the issue. Then I tried with this video again, and it asks for url keyword before the actual url and downloads the extra video before the required video.

Verbose Output

➜  ~  youtube-dl --verbose https://www.youtube.com/watch\?v\=A0Wk08f8mUU
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=A0Wk08f8mUU']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.12.17.2
[debug] Python version 2.7.6 - Linux-3.13.0-43-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.16-6, avprobe 9.16-6, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] A0Wk08f8mUU: Downloading webpage
[youtube] A0Wk08f8mUU: Extracting video information
[youtube] A0Wk08f8mUU: Downloading DASH manifest
[debug] Invoking downloader on u'https://r13---sn-qxa7en7e.googlevideo.com/videoplayback?initcwndbps=137500&dur=346.697&mt=1420140708&signature=8A8D9C344C301BAEA7E6059387582E29B9A8936E.5310E7416E3C35022E93559DDABDA63D39C5DE51&ms=au&source=youtube&ratebypass=yes&mv=m&mm=31&requiressl=yes&upn=V7yLXeSzyhs&id=o-AMRPLdSWZPUGWCoiSpHlw_HSu2NWlrfCMYIot9QdDMSu&mime=video%2Fmp4&key=yt5&expire=1420162362&sver=3&ipbits=0&ip=117.212.72.5&itag=22&fexp=900718%2C905648%2C922243%2C924636%2C927622%2C932404%2C936928%2C9406041%2C943917%2C947209%2C947218%2C948124%2C952302%2C952605%2C952901%2C955301%2C957103%2C957105%2C957201&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire'
[download] Resuming download at byte 31744
[download] Destination: The Ultimate Parkour!-A0Wk08f8mUU.mp4
[download] 100% of 70.70MiB in 02:28
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 1, 2015

Don't get it. Post the --verbose output of this

Then I tried with this video again, and it asks for url keyword before the actual url and downloads the extra video before the required video

@kartikarora
Copy link
Author

@kartikarora kartikarora commented Jan 1, 2015

I'll explain it.

There are three videos in consideration here. one is being downloaded automatically when downloading two. youtube-dl asks for an extra keyword url when downloading two, making the command look like youtube-dl -f 135+140 url https://www.youtube.com/watch\?v\=N_708QY7Obk.

Verbose output for two using youtube-dl --verbose https://www.youtube.com/watch\?v\=N_708QY7Obk

➜  ~  youtube-dl --verbose https://www.youtube.com/watch\?v\=N_708QY7Obk
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=N_708QY7Obk']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.12.17.2
[debug] Python version 2.7.6 - Linux-3.13.0-43-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.16-6, avprobe 9.16-6, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] N_708QY7Obk: Downloading webpage
[youtube] N_708QY7Obk: Extracting video information
[youtube] N_708QY7Obk: Downloading DASH manifest
[debug] Invoking downloader on u'https://r19---sn-qxa7en7s.googlevideo.com/videoplayback?signature=442B28F12A8543AC19BB40EA8402B50807E3B753.2A56F5B866B953DD17C11D14AC19764B9A1B2161&fexp=900718%2C913439%2C927622%2C931368%2C932404%2C933229%2C938648%2C939981%2C941004%2C943917%2C947209%2C947218%2C948124%2C952302%2C952605%2C952901%2C955301%2C957103%2C957105%2C957201&sver=3&mt=1420142061&mv=m&id=o-AD6IYcwQ02eBoNKbW-DpbqcVfe5R2Uhj-Fa135PIEUiT&ms=au&mm=31&source=youtube&ip=117.212.72.5&ratebypass=yes&ipbits=0&key=yt5&itag=22&requiressl=yes&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire&expire=1420163725&upn=fSPtexQaZmo&dur=666.598&mime=video%2Fmp4&initcwndbps=132500'
[download] Resuming download at byte 1308672
[download] Destination: The Depressing Episode - S1E8 - Cyanide & Happiness Show-N_708QY7Obk.mp4
[download] 100% of 95.50MiB in 03:45

On downloading three with both --verbose and -f 135+140 options, no extra keyword was required and one was not downloaded automatically
Verbose output for three using youtube-dl --verbose https://www.youtube.com/watch\?v\=A0Wk08f8mUU

➜  ~  youtube-dl --verbose https://www.youtube.com/watch\?v\=A0Wk08f8mUU
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', 'https://www.youtube.com/watch?v=A0Wk08f8mUU']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.12.17.2
[debug] Python version 2.7.6 - Linux-3.13.0-43-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.16-6, avprobe 9.16-6, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] A0Wk08f8mUU: Downloading webpage
[youtube] A0Wk08f8mUU: Extracting video information
[youtube] A0Wk08f8mUU: Downloading DASH manifest
[debug] Invoking downloader on u'https://r13---sn-qxa7en7e.googlevideo.com/videoplayback?initcwndbps=137500&dur=346.697&mt=1420140708&signature=8A8D9C344C301BAEA7E6059387582E29B9A8936E.5310E7416E3C35022E93559DDABDA63D39C5DE51&ms=au&source=youtube&ratebypass=yes&mv=m&mm=31&requiressl=yes&upn=V7yLXeSzyhs&id=o-AMRPLdSWZPUGWCoiSpHlw_HSu2NWlrfCMYIot9QdDMSu&mime=video%2Fmp4&key=yt5&expire=1420162362&sver=3&ipbits=0&ip=117.212.72.5&itag=22&fexp=900718%2C905648%2C922243%2C924636%2C927622%2C932404%2C936928%2C9406041%2C943917%2C947209%2C947218%2C948124%2C952302%2C952605%2C952901%2C955301%2C957103%2C957105%2C957201&sparams=dur%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Cmime%2Cmm%2Cms%2Cmv%2Cratebypass%2Crequiressl%2Csource%2Cupn%2Cexpire'
[download] Resuming download at byte 31744
[download] Destination: The Ultimate Parkour!-A0Wk08f8mUU.mp4
[download] 100% of 70.70MiB in 02:28
@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 1, 2015

youtube-dl asks for an extra keyword url

By url it implies a real URL or a string for a search query.

when downloading [two], making the command look like youtube-dl -f 135+140 url https://www.youtube.com/watch\?v\=N_708QY7Obk

So, this command results in youtube search query for "url" and downloading the first video it found (aMli33ornEU), plus it downloads the video pointed by this URL https://www.youtube.com/watch?v=N_708QY7Obk. So this is why you got two videos.
Moreover, this youtube-dl -f 135+140 url https://www.youtube.com/watch\?v\=N_708QY7Obk doesn't already work with latest version - you have to manually prepent search query with ytsearch: if you would like to do a search.

@dstftw dstftw closed this Jan 1, 2015
@kartikarora
Copy link
Author

@kartikarora kartikarora commented Jan 1, 2015

@dstftw
youtube-dl -f 135+140 url https://www.youtube.com/watch\?v\=N_708QY7Obk is working for me on 2014.12.17.2. No need it prepent ytsearch:

Also, I'm getting this error when I don't use url for https://www.youtube.com/watch?v=N_708QY7Obk

➜  ~  youtube-dl -f 135+140 https://www.youtube.com/watch\?v\=N_708QY7Obk
Usage: youtube-dl [options] url [url...]

youtube-dl: error: you must provide at least one URL

But it works when I use youtube-dl -f 135+140 url https://www.youtube.com/watch\?v\=N_708QY7Obk

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jan 1, 2015

What if you enclose the URL in quotes and remove manual escaping?

@phihag
Copy link
Contributor

@phihag phihag commented Jan 1, 2015

Just to point out, when we asked for the output with --verbose, we meant adding --verbose to whatever arguments your're using (-f in your case). Can you post that output?

@phihag
Copy link
Contributor

@phihag phihag commented Jan 1, 2015

Also, the URL https://www.youtube.com/watch?v=N_708QY7Ob doesn't look correct in the first place - there is no video there.

@kartikarora
Copy link
Author

@kartikarora kartikarora commented Jan 1, 2015

youtube-dl -f 135+140 "https://www.youtube.com/watch\?v\=N_708QY7Obk"
[generic] watch\?v\=N_708QY7Obk: Requesting header

WARNING: Could not send HEAD request to https://www.youtube.com/watch\?v\=N_708QY7Obk: HTTP Error 404: Not Found
[generic] watch\?v\=N_708QY7Obk: Downloading webpage
ERROR: Unable to download webpage: HTTP Error 404: Not Found (caused by HTTPError()); please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; type  youtube-dl -U  to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

Verbose output

➜ ~ youtube-dl --verbose -f 135+140 https://www.youtube.com/watch\?v\=N_708QY7Obk
[debug] System config: []
[debug] User config: []
[debug] Command-line args: ['--verbose', '-f', '135+140', 'https://www.youtube.com/watch?v=N_708QY7Obk']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2014.12.17.2
[debug] Python version 2.7.6 - Linux-3.13.0-43-generic-x86_64-with-Ubuntu-14.04-trusty
[debug] exe versions: avconv 9.16-6, avprobe 9.16-6, rtmpdump 2.4
[debug] Proxy map: {}
[youtube] N_708QY7Obk: Downloading webpage
[youtube] N_708QY7Obk: Extracting video information
[youtube] N_708QY7Obk: Downloading DASH manifest
[debug] Invoking downloader on 'https://r19---sn-qxa7en7s.googlevideo.com/videoplayback?id=37fef4f1063b39b9&itag=135&source=youtube&requiressl=yes&mv=m&ms=au&mm=31&ratebypass=yes&mime=video/mp4&gir=yes&clen=44858711&lmt=1419622408997764&dur=666.541&upn=LZlTnNw7xY4&sver=3&mt=1420144739&signature=35C4C695062C831B7863A3CDE77C5966B74668D3.7A8D75D98C3FA56520610389842B8E046A3C41F5&fexp=900718,904847,916632,927622,931342,932404,939100,9405159,9405651,941004,943917,947209,947218,947602,948124,952302,952605,952901,955301,957103,957105,957201,962200&key=dg_yt0&ip=117.212.72.5&ipbits=0&expire=1420166405&sparams=ip,ipbits,expire,id,itag,source,requiressl,mv,ms,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Resuming download at byte 523264
[download] Destination: The Depressing Episode - S1E8 - Cyanide & Happiness Show-N_708QY7Obk.f135.mp4
[download] 100% of 42.78MiB in 01:26
[debug] Invoking downloader on 'https://r19---sn-qxa7en7s.googlevideo.com/videoplayback?id=37fef4f1063b39b9&itag=140&source=youtube&requiressl=yes&mv=m&ms=au&mm=31&ratebypass=yes&mime=audio/mp4&gir=yes&clen=10702143&lmt=1419622380947482&dur=666.597&upn=LZlTnNw7xY4&sver=3&mt=1420144739&signature=7AE906888E1DA50C5D5344F16254E2EF7C826895.016AA36EE49FD1E5E66E3C304EB2E7EEE99A1719&fexp=900718,904847,916632,927622,931342,932404,939100,9405159,9405651,941004,943917,947209,947218,947602,948124,952302,952605,952901,955301,957103,957105,957201,962200&key=dg_yt0&ip=117.212.72.5&ipbits=0&expire=1420166405&sparams=ip,ipbits,expire,id,itag,source,requiressl,mv,ms,mm,ratebypass,mime,gir,clen,lmt,dur'
[download] Destination: The Depressing Episode - S1E8 - Cyanide & Happiness Show-N_708QY7Obk.f140.m4a
[download] 100% of 10.21MiB in 00:25
[ffmpeg] Merging formats into "The Depressing Episode - S1E8 - Cyanide & Happiness Show-N_708QY7Obk.mp4"
WARNING: Your copy of avconv is outdated, update avconv to version 10-0 or newer if you encounter any errors.
[debug] ffmpeg command line: avconv -y -i 'The Depressing Episode - S1E8 - Cyanide & Happiness Show-N_708QY7Obk.f135.mp4' -i 'The Depressing Episode - S1E8 - Cyanide & Happiness Show-N_708QY7Obk.f140.m4a' -c copy -map 0:v:0 -map 1:a:0 -shortest 'The Depressing Episode - S1E8 - Cyanide & Happiness Show-N_708QY7Obk.mp4'

@phihag sorry if I made a mistake somewhere, its https://www.youtube.com/watch?v=N_708QY7Obk

@phihag
Copy link
Contributor

@phihag phihag commented Jan 1, 2015

I'm not sure where you think the bug is. The output you get for

youtube-dl -f 135+140 "https://www.youtube.com/watch\?v\=N_708QY7Obk"

looks right to me - that URL is invalid as well. Most likely, you simply want either of

youtube-dl -f 135+140 "https://www.youtube.com/watch?v=N_708QY7Obk"
youtube-dl -f 135+140 'https://www.youtube.com/watch?v=N_708QY7Obk'
youtube-dl -f 135+140 https://www.youtube.com/watch\?v\=N_708QY7Obk
youtube-dl -f 135+140 https://www.youtube.com/watch\?v=N_708QY7Obk

When you add a parameter that literally says url, youtube-dl thinks you want to search for url (imagine someone calling youtube-dl "burping cow"). The next version will not do this for the precise string url.

If you do not want youtube-dl to auto-interpret arguments that are not URLs as search strings, you can also add --default-search error to your configuration file or command line.

phihag added a commit that referenced this issue Jan 1, 2015
Hopefully, this reduces confusion as in #4610.
phihag added a commit that referenced this issue Jan 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.