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

Fetch playlist information even if --no-playlist is used #15503

Closed
mdirik opened this issue Feb 5, 2018 · 2 comments
Closed

Fetch playlist information even if --no-playlist is used #15503

mdirik opened this issue Feb 5, 2018 · 2 comments
Labels

Comments

@mdirik
Copy link

@mdirik mdirik commented Feb 5, 2018

Make sure you are using the latest version: run youtube-dl --version and ensure your version is 2018.02.04. 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 2018.02.04

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

Description of your issue, suggested solution and other information

I want to download a single video out of a playlist, but I want to use playlist output templates such as "playlist_title" and "playlist_index" at the same time.

"--no-playlist" option seems to be the preferred way for downloading a single video, but playlist metadata is not available if it is used (note that playlist is in the URL, so playlist information can be inferred):

$ /opt/youtube-dl/youtube-dl -v --get-filename --no-playlist -o '%(playlist_title)s/%(playlist_index)s. %(title)s-%(id)s.%(ext)s' 'https://www.youtube.com/watch?v=gOVD-DrUpwQ&list=PL0lo9MOBetEGRAJzoTCdco_fOKDfhqaOY&index=7'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--get-filename', u'--no-playlist', u'-o', u'%(playlist_title)s/%(playlist_index)s. %(title)s-%(id)s.%(ext)s', u'https://www.youtube.com/watch?v=gOVD-DrUpwQ&list=PL0lo9MOBetEGRAJzoTCdco_fOKDfhqaOY&index=7']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.02.04
[debug] Python version 2.7.9 (CPython) - Linux-2.6.32-042stab125.5-i686-with-debian-8.10
[debug] exe versions: ffmpeg 3.4.1-static, ffprobe 3.4.1-static
[debug] Proxy map: {}
[debug] Default format spec: bestvideo+bestaudio/best
NA/NA. Scaling Mercurial at Facebook - Insights from the Other Side - Git Merge 2017-gOVD-DrUpwQ.mp4

Omitting "--no-playlist", playlist info is present but it wants to download all videos:

$ /opt/youtube-dl/youtube-dl -v --get-filename -o '%(playlist_title)s/%(playlist_index)s. %(title)s-%(id)s.%(ext)s' 'https://www.youtube.com/watch?v=gOVD-DrUpwQ&list=PL0lo9MOBetEGRAJzoTCdco_fOKDfhqaOY&index=7'
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: [u'-v', u'--get-filename', u'-o', u'%(playlist_title)s/%(playlist_index)s. %(title)s-%(id)s.%(ext)s', u'https://www.youtube.com/watch?v=gOVD-DrUpwQ&list=PL0lo9MOBetEGRAJzoTCdco_fOKDfhqaOY&index=7']
[debug] Encodings: locale UTF-8, fs UTF-8, out UTF-8, pref UTF-8
[debug] youtube-dl version 2018.02.04
[debug] Python version 2.7.9 (CPython) - Linux-2.6.32-042stab125.5-i686-with-debian-8.10
[debug] exe versions: ffmpeg 3.4.1-static, ffprobe 3.4.1-static
[debug] Proxy map: {}
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/01. Git Merge 2017 Recap-tvymSWfvkjw.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/02. Software Freedom Conservancy - Git Merge 2017-CKwuPQqOi_4.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/03. Top Ten Worst Repositories to host on GitHub - Git Merge 2017--ZNKR9wFe8o.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/04. Scaling Git at Microsoft - Git Merge 2017-g_MPGU_m01s.webm
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/05. Git - The Tool Loved and (sometimes) Feared - Git Merge 2017--AQl98fItmQ.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/06. What’s Wrong With Git - Git Merge 2017-31XZYMjg93o.webm
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/07. Scaling Mercurial at Facebook - Insights from the Other Side - Git Merge 2017-gOVD-DrUpwQ.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/08. Git LFS at Light Speed - Git Merge 2017-Q7i_qQW__q4.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/09. Git Aliases of the Gods!  - Git Merge 2017-3IIaOj1Lhb0.webm
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/10. Lightning Talks - Git Merge 2017-_gyLZVjekbo.webm
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/11. Git for Pair Programming - Git Merge 2017-usQgAy8YDVA.webm
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/12. Trust But Verify - Git Merge 2017-GRO9Ho8iXds.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/13. Git and the Terrible, Horrible, No Good, Very Bad Day - Git Merge 2017-54Yh0YyC-4Q.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/14. The Battle for Sub-premacy - Git Merge 2017-0EubYhsX-No.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/15. Jedi Mind Tricks for Git - Git Merge 2017-M75aENmuzmo.webm
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/16. Greatest Hits of the Git Maintainers Room - Git Merge 2017-2UKd0YMuc-M.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/17. Repo 911 - Git Merge 2017-WfwwFyE-ckQ.mp4
[debug] Default format spec: bestvideo+bestaudio/best
Git Merge 2017/18. Git Simple - Writing primary git functionalities in Ruby - Git Merge 2017-8CUPVB8tKoY.mp4

I didn't try using "--playlist-start/end/items" to work around as I wanted to report this issue first.

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Feb 5, 2018

This is expected behavior.

@dstftw dstftw closed this Feb 5, 2018
@dstftw dstftw added the invalid label Feb 5, 2018
@mdirik
Copy link
Author

@mdirik mdirik commented Feb 5, 2018

If this is the expected behaviour, please consider this as a feature request.

Note how both playlist id and index are inside URL ("...&list=PL0lo9MOBetEGRAJzoTCdco_fOKDfhqaOY&index=7...") so it should be possible to figure them out.

@mdirik mdirik changed the title Playlist information is lost when --no-playlist is used Fetch playlist information even if --no-playlist is used Feb 5, 2018
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.