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

"track_number" output template doesn't add track numbers to Soundcloud and Bandcamp albums #17266

Closed
368532143 opened this issue Aug 18, 2018 · 3 comments

Comments

@368532143
Copy link

@368532143 368532143 commented Aug 18, 2018

  • I've verified and I assure that I'm running youtube-dl 2018.08.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

If the purpose of this issue is a bug report, site support request or you are not completely sure provide the full verbose output as follows:

Add the -v flag to your command line you run youtube-dl with (youtube-dl -v <your command line>), copy the whole output and insert it here. It should look similar to one below (replace it with your log inserted between triple ```):

[debug] System config: []
[debug] User config: ['-o', 'C:/Users/user/Downloads/youtube-dl/%(title)s.%(ext)s']
[debug] Custom config: []
[debug] Command-line args: ['-o', 'C:/Users/user/Downloads/youtube-dl/%(track_number)s.%(title)s.%(ext)s', '-v', 'https://soundcloud.com/deus-ex-ost/intro']
[debug] Encodings: locale cp1252, fs mbcs, out cp850, pref cp1252
[debug] youtube-dl version 2018.08.04
[debug] Python version 3.4.4 (CPython) - Windows-10-10.0.17134
[debug] exe versions: ffmpeg 4.0.2, ffprobe 4.0.2
[debug] Proxy map: {}
[soundcloud] deus-ex-ost/intro: Resolving id
[soundcloud] deus-ex-ost/intro: Downloading info JSON
[soundcloud] 124316573: Downloading track url
[soundcloud] 124316573: Downloading m3u8 information
[soundcloud] 124316573: Downloading m3u8 information
[soundcloud] 124316573: Checking hls_mp3_128_url video format URL
[soundcloud] 124316573: Checking http_mp3_128_url video format URL
[soundcloud] 124316573: Checking hls_opus_64_url video format URL
[debug] Default format spec: bestvideo+bestaudio/best
[debug] Invoking downloader on 'https://cf-media.sndcdn.com/ICcDF8bgd1m5.128.mp3?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiKjovL2NmLW1lZGlhLnNuZGNkbi5jb20vSUNjREY4YmdkMW01LjEyOC5tcDMiLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE1MzQ1NzgzMjV9fX1dfQ__&Signature=wyAyE8Sa3hF73e2apXAqZCuYaSmZ~BeMRwInJhjgp3LwwTz1oOgTWBwcOlU5j-Bpa~~dye7~qoYq9L8t5JWyXn~kbbOIHABj3VYpxwkBg~3UQXEm~uE~-ZSCUqtz9eNd8nZTbeNXwY6bsxRf8vfOCjStfBuWF2wNe0eS9ocf3XIpWgiMt7fIO35om3Ifxj7gol9Rk6MvHmd9b0bF7J7RqZT8DBZaZAAIm8odRTKB0ucLYYdOw4OxOTFWbwJUb-LYDQDMT6l11Cw7F2CPNdd-Da9qsi7DA7JHJ9b6wmLLLvzm~Mv66Mev69tow7ULd8-iJI2vnPpKbzQBXtvMTaR99Q__&Key-Pair-Id=APKAJAGZ7VMH2PFPW6UQ'
[download] Destination: C:\Users\user\Downloads\youtube-dl\NA.Intro (Alexander Brandon).mp3
[download] 100% of 2.14MiB in 00:00
...
<end of log>

If the purpose of this issue is a site support request please provide all kinds of example URLs support for which should be included (replace following example URLs by yours):


Description of your issue, suggested solution and other information

track_number output template doesn't detect track numbers on Soundcloud and Bandcamp — on both services the numbers of tracks are clearly labeled in albums. NA string (non-applicable) is added to the filenames.

de

m

@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Aug 27, 2018

Hi @368532143,

Bad news - unfortunately the Soundcloud website does not provide the track number for downloaded songs, so there is not much to be done here.

Better news - the Bandcamp website does include this, so the extractor for this site will be updated shortly to provide for the track number in the output.

Cheers,

Parmjit V.

@368532143
Copy link
Author

@368532143 368532143 commented Aug 28, 2018

@parmjitv It has been confirmed on Reddit that playlist and playlist_index templates can add track numbers to Soundcloud albums:

I use the following template:

-o "%(playlist)s\%(playlist_index)s - %(title)s.%(ext)s"

For some reason playlist_index works and track_number doesn't. That will add the track number to the filename and --add-metadata will add everything except the track number to the metadata. To add the track number to the metadata you'll have to use a separate tool.

@parmjitv
Copy link
Contributor

@parmjitv parmjitv commented Aug 28, 2018

Hi @368532143,

Yep, that approach will work for albums on the Soundcloud website. Youtube-dl automagically creates and exposes the playlist and playlist_index metadata fields for collections, likely to accommodate a situation where the track numbers are not readily available from the source website.

Unfortunately this will not provide us with the track number for an individual song. For example, using the output pattern you have noted above on a single track yields a file name as 'NA\NA - Intro (Alexander Brandon).mp3'.

Below is a complete list of the data fields provided by Soundcloud as part of the youtube-dl download process - as you can see, the track number itself is not included.

Yours,

Parmjit V.

{
    reposts_count : 7, 
    attachments_uri : 'https://api.soundcloud.com/tracks/124316573/attachments', 
    video_url : None, 
    track_type : '', 
    release_month : None, 
    original_format : 'mp3', 
    label_name : '', 
    duration : 140420, 
    id : 124316573, 
    streamable : True, 
    user_id : 70009101, 
    title : 'Intro (Alexander Brandon)', 
    favoritings_count : 81, 
    commentable : True, 
    label_id : None, 
    download_url : 'https://api.soundcloud.com/tracks/124316573/download', 
    state : 'finished', 
    downloadable : False, 
    policy : 'ALLOW', 
    waveform_url : 'https://w1.sndcdn.com/ICcDF8bgd1m5_m.png', 
    sharing : 'public', 
    description : '', 
    release_day : None, 
    purchase_url : None, 
    permalink : 'intro', 
    comment_count : 2, 
    purchase_title : None, 
    stream_url : 'https://api.soundcloud.com/tracks/124316573/stream', 
    last_modified : '2013/12/11 16:47:33 +0000', 
    user : 
    {
        username : 'Deus Ex OST', 
        permalink : 'deus-ex-ost', 
        avatar_url : 'https://i1.sndcdn.com/avatars-000062603291-v580ny-large.jpg', 
        kind : 'user', 
        uri : 'https://api.soundcloud.com/users/70009101', 
        last_modified : '2014/12/17 11:15:49 +0000', 
        permalink_url : 'http://soundcloud.com/deus-ex-ost', 
        id : 70009101
    }, 
    genre : 'Soundtrack', 
    isrc : None, 
    download_count : 0, 
    permalink_url : 'https://soundcloud.com/deus-ex-ost/intro', 
    playback_count : 16251, 
    kind : 'track', 
    release_year : None, 
    license : 'all-rights-reserved', 
    monetization_model : 'NOT_APPLICABLE', 
    artwork_url : None, 
    created_at : '2013/12/11 14:07:58 +0000', 
    bpm : None, 
    uri : 'https://api.soundcloud.com/tracks/124316573', 
    original_content_size : 4515227, 
    key_signature : '', 
    release : '', 
    tag_list : '', 
    embeddable_by : 'all'
}
@dstftw dstftw closed this in 14b7a24 Aug 30, 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.