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

Strip/disregard unneeded information from full YouTube URLs #18885

Closed
Kaos-Industries opened this issue Jan 16, 2019 · 1 comment
Closed

Strip/disregard unneeded information from full YouTube URLs #18885

Kaos-Industries opened this issue Jan 16, 2019 · 1 comment
Labels

Comments

@Kaos-Industries
Copy link

@Kaos-Industries Kaos-Industries commented Jan 16, 2019

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2019.01.16. If it's not, read this FAQ entry and update. Issues with outdated version will be rejected.

  • I've verified and I assure that I'm running youtube-dl 2019.01.16

Before submitting an issue make sure you have:

  • At least skimmed through the README, most notably the FAQ and BUGS sections
  • Searched the bugtracker for similar issues including closed ones
  • Checked that provided video/audio/playlist URLs (if any) are alive and playable in a browser

What is the purpose of your issue?

  • Bug report (encountered problems with youtube-dl)
  • Site support request (request for adding support for a new site)
  • Feature request (request for a new functionality)
  • Question
  • Other

Whenever adding a full YouTube URL that ends like so:

&t=0s&list=PLR3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE&index=

...those parameters and some extra (the three weird numbers in the beginning of the bash screenshot below) will leak through to STDOUT in the form of either unseemly output or plain errors.

bash:

youtube-dl bash

CMD.exe:

youtubedl-cmd

These aren't fatal and the commands do complete successfully - although in the case of bash, note how I had to press Ctrl+C in order to release the prompt, which I would argue counts as broken functionality. Without pressing Ctrl+C, the output simply hangs at the $, which at first gave me the impression something was still happening.

I know these parameters aren't needed for a straight, non-playlist video download such as I'm demonstrating above - maybe those kinds of downloads make up most of the downloads that youtube-dl is used for? - and considering how often I tend to copy the whole YT URL out of convenience when grabbing a video, it would be nice to have these apparent "errors" be waved away intelligently by the program, especially when it's clear from the debugging information below that youtube-dl already knows how to extract the parts of the URL that are important. It would also result in a much more beginner-friendly UX, as I imagine most new youtube-dl users are pasting full YouTube URLs in by default and being confused by the output.

Here is the result of the command with -v:

User@Prometheus ~
$ youtube-dl -v https://www.youtube.com/watch?v=0sB3Fjw3Uvc&t=0s&list=PLR3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE&index=
[1] 10824
[2] 10904
[3] 9080
[2]   Done                    t=0s
[3]   Done                    list=PLR3nWwHlZ9WBpi3uWsjSe6r1PiA8MTbnE

User@Prometheus ~
$ [debug] System config: [u'-o', u'B:/Users/User/Desktop/youtube-dl Output/%(title)s.%(ext)s']
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'https://www.youtube.com/watch?v=0sB3Fjw3Uvc']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2019.01.16
[debug] Python version 2.7.14 (CPython) - CYGWIN_NT-6.1-2.11.2-0.329-5-3-x86_64-64bit
[debug] exe versions: ffmpeg N-92966-gd52a1be4e3, ffprobe N-92966-gd52a1be4e3
[debug] Proxy map: {}
[youtube] 0sB3Fjw3Uvc: Downloading webpage
[youtube] 0sB3Fjw3Uvc: Downloading video info webpage
[youtube] {18} signature length 41.40, html5 player vflzJWmZN
[youtube] {36} signature length 41.40, html5 player vflzJWmZN
[youtube] {17} signature length 41.40, html5 player vflzJWmZN
[youtube] {134} signature length 41.40, html5 player vflzJWmZN
[youtube] {243} signature length 41.40, html5 player vflzJWmZN
[youtube] {396} signature length 41.40, html5 player vflzJWmZN
[youtube] {133} signature length 41.40, html5 player vflzJWmZN
[youtube] {242} signature length 41.40, html5 player vflzJWmZN
[youtube] {395} signature length 41.40, html5 player vflzJWmZN
[youtube] {160} signature length 41.40, html5 player vflzJWmZN
[youtube] {278} signature length 41.40, html5 player vflzJWmZN
[youtube] {394} signature length 41.40, html5 player vflzJWmZN
[youtube] {140} signature length 41.40, html5 player vflzJWmZN
[youtube] {171} signature length 41.40, html5 player vflzJWmZN
[youtube] {249} signature length 41.40, html5 player vflzJWmZN
[youtube] {250} signature length 41.40, html5 player vflzJWmZN
[youtube] {251} signature length 41.40, html5 player vflzJWmZN
[debug] Default format spec: bestvideo+bestaudio/best
WARNING: Requested formats are incompatible for merge and will be merged into mkv.
[debug] Invoking downloader on u'https://r5---sn-cu-auos.googlevideo.com/videoplayback?ip=150.143.245.196&clen=14286246&dur=258.466&mv=m&id=o-AA9vEAdKOmgWD5kdwllyuClRn1WyJsNgyWkWnDDjeuDY&ms=au%2Conr&c=WEB&mn=sn-cu-auos%2Csn-5hnekn7s&mm=31%2C26&ipbits=0&gir=yes&initcwndbps=1282500&requiressl=yes&gcr=gb&lmt=1540493085128654&keepalive=yes&mt=1547617065&pl=25&mime=video%2Fmp4&expire=1547638766&source=youtube&key=yt6&txp=5532432&sparams=aitags%2Cclen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&itag=134&ei=jsM-XODxJcqPV4eJhMAE&aitags=133%2C134%2C160%2C242%2C243%2C278%2C394%2C395%2C396&fvip=5&signature=25C02454530142244FC1CB374CE8923B205C9CC1.2305AC057257887782C2F5A8EFFE42C0067682C8&ratebypass=yes'
[download] Destination: B:/Users/User/Desktop/youtube-dl Output/The Animals - The House of the Rising Sun Mafia III Trailer 3 Casino Battlefield V !!!.f134.mp4
[download] 100% of 13.62MiB in 00:03
[debug] Invoking downloader on u'https://r5---sn-cu-auos.googlevideo.com/videoplayback?ip=150.143.245.196&clen=3650817&dur=258.541&mv=m&id=o-AA9vEAdKOmgWD5kdwllyuClRn1WyJsNgyWkWnDDjeuDY&ms=au%2Conr&c=WEB&mn=sn-cu-auos%2Csn-5hnekn7s&mm=31%2C26&ipbits=0&gir=yes&initcwndbps=1282500&requiressl=yes&gcr=gb&lmt=1540500628840883&keepalive=yes&mt=1547617065&pl=25&mime=audio%2Fwebm&expire=1547638766&source=youtube&key=yt6&txp=5511222&sparams=clen%2Cdur%2Cei%2Cgcr%2Cgir%2Cid%2Cinitcwndbps%2Cip%2Cipbits%2Citag%2Ckeepalive%2Clmt%2Cmime%2Cmm%2Cmn%2Cms%2Cmv%2Cpl%2Crequiressl%2Csource%2Cexpire&itag=251&ei=jsM-XODxJcqPV4eJhMAE&fvip=5&signature=9E079CBEFF5DCFAD429C8D9B0100696420B1A89D.242138B8DB2DE2EDF2E804A79745779D6FA7AA71&ratebypass=yes'
[download] Destination: B:/Users/User/Desktop/youtube-dl Output/The Animals - The House of the Rising Sun Mafia III Trailer 3 Casino Battlefield V !!!.f251.webm
[download] 100% of 3.48MiB in 00:00
[ffmpeg] Merging formats into "B:/Users/User/Desktop/youtube-dl Output/The Animals - The House of the Rising Sun Mafia III Trailer 3 Casino Battlefield V !!!.mkv"
[debug] ffmpeg command line: ffmpeg -y -i 'file:B:/Users/User/Desktop/youtube-dl Output/The Animals - The House of the Rising Sun Mafia III Trailer 3 Casino Battlefield V !!!.f134.mp4' -i 'file:B:/Users/User/Desktop/youtube-dl Output/The Animals - The House of the Rising Sun Mafia III Trailer 3 Casino Battlefield V !!!.f251.webm' -c copy -map '0:v:0' -map '1:a:0' 'file:B:/Users/User/Desktop/youtube-dl Output/The Animals - The House of the Rising Sun Mafia III Trailer 3 Casino Battlefield V !!!.temp.mkv'
Deleting original file B:/Users/User/Desktop/youtube-dl Output/The Animals - The House of the Rising Sun Mafia III Trailer 3 Casino Battlefield V !!!.f134.mp4 (pass -k to keep)
Deleting original file B:/Users/User/Desktop/youtube-dl Output/The Animals - The House of the Rising Sun Mafia III Trailer 3 Casino Battlefield V !!!.f251.webm (pass -k to keep)
^C
[1]+  Done                    youtube-dl -v https://www.youtube.com/watch?v=0sB3Fjw3Uvc
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
2 participants
You can’t perform that action at this time.