Closed prisoneer closed 1 year ago
The most recent release fails with 'ERROR: Unsupported URL: https://psv4.vkuseraudio.net/audio/ee/UgWtx9LO0bbUBIReH881o42BjHaHTvhF1JHQyg/b7PTQ9NTI2NjQy/57UWs2YFVwb3o1S3M/index.m3u8' using the command that gave no sound.
The most recent release fails with 'ERROR: Unsupported URL: https://psv4.vkuseraudio.net/audio/ee/UgWtx9LO0bbUBIReH881o42BjHaHTvhF1JHQyg/b7PTQ9NTI2NjQy/57UWs2YFVwb3o1S3M/index.m3u8' using the command that gave no sound.
user "werid" on reddit suggested that I should use yt-dlp and it worked like a charm!
I used this command:
yt-dlp https://psv4.vkuseraudio.net/audio/ee/UgWtx9LO0bbUBIReH881o42BjHaHTvhF1JHQyg/b7PTQ9NTI2NjQy/57UWs2YFVwb3o1S3M/index.m3u8 -x --audio-format mp3
On Aug 20th, 2021, @prisoneer wrote:
Hello Vangelis66,
First of all.. I'm sorry that I'm writing here but I couldn't find any other way to contact you.
... Well, for you and others reading this, simply "mentioning" me (like that: @Vangelis66) here would have sufficed; GitHub would have automatically sent an e-mail notification to my inbox... š Whether I respond to your plea, in a timely fashion/belatedly/not at all, is, of course, subject to my discretion... š
I'm trying to download "Sinister Souls - Crystal Math (Switch Technique Remix)" from this link: https://vk.com/wall-44194635_17168?z=audio_playlist88629823_1172%2F9afed406d88c497d59
For starters, VK would stream that song in its entirety (04:51) only to signed-in VK users; I don't have an account with them (as I suspect the same is true for many outside of Russia, etc.), so without you providing log-in credentials/cookies.txt file, I'm in no way able to assist you in your query:
Any ideas how to download the full track?
Furthermore, VK generate only temporary HLS playlist URIs ( *.m3u8*
), so the one you already provided in first post is no good, either, for troubleshooting purposes... š
In any case, I loaded the VK page linked in OP and was offered just a 30s sample of the song you're after; the URI I sniffed (valid at the time of writing) is
https://cs9-13v4.vkuseraudio.net/p4/sample/18ZGA-L2pnZ3pId2tsKzg0MTw8KmllYnldbywwOjIxNw/1c7d9d5b0dbd7e/index.m3u8?extra=MjD8tt6_TUb3wUXToTqncTGzK_4a5ZDF5GtYwvD7lYLAbjNmYhThM8eHOYI100jXswdSjWl9_B7AQNHmbZXVVem-fqOBwwIOQRRvnj6K2WqNY7pgbfnKWb7kpIef0wJboksuXElW0gAy9w
I should use
yt-dlp
and it worked like a charm!
Well, since this is the yt-dl
issue tracker and assuming the full song playlist URI (that you yourself can sniff) is similar in behaviour to the one for the 30s sample, a working yt-dl
incantation I concocted is:
youtube-dl --console-title --hls-prefer-native --hls-use-mpegts -c --no-part --fixup never "https://cs9-13v4.vkuseraudio.net/p4/sample/18ZGA-L2pnZ3pId2tsKzg0MTw8KmllYnldbywwOjIxNw/1c7d9d5b0dbd7e/index.m3u8?extra=MjD8tt6_TUb3wUXToTqncTGzK_4a5ZDF5GtYwvD7lYLAbjNmYhThM8eHOYI100jXswdSjWl9_B7AQNHmbZXVVem-fqOBwwIOQRRvnj6K2WqNY7pgbfnKWb7kpIef0wJboksuXElW0gAy9w" -o "Sinister Souls - Crystal Math (Switch Technique Remix) - 30s sample.ts" -x -v
The one thing to watch is give the interim media file (the one immediately downloaded from the .m3u8
URI, before it is subjected to ffmpeg
extraction) the correct .ts
file extension, because --hls-use-mpegts --fixup never
by default downloads in the MPEG-TS container:
[debug] System config: []
[debug] User config: []
[debug] Custom config: []
[debug] Command-line args: ['--console-title', '--hls-prefer-native', '--hls-use
-mpegts', '-c', '--no-part', '--fixup', 'never', 'https://cs9-13v4.vkuseraudio.n
et/p4/sample/18ZGA-L2pnZ3pId2tsKzg0MTw8KmllYnldbywwOjIxNw/1c7d9d5b0dbd7e/index.m
3u8?extra=MjD8tt6_TUb3wUXToTqncTGzK_4a5ZDF5GtYwvD7lYLAbjNmYhThM8eHOYI100jXswdSjW
l9_B7AQNHmbZXVVem-fqOBwwIOQRRvnj6K2WqNY7pgbfnKWb7kpIef0wJboksuXElW0gAy9w', '-o',
'Sinister Souls - Crystal Math (Switch Technique Remix) - 30s sample.ts', '-x', '-v']
[debug] Encodings: locale cp1253, fs utf-8, out utf-8, pref cp1253
[debug] youtube-dl version 2021.06.06+18-git-20210701-ga803582+PR#28955v2
[debug] Python version 3.7.12 (CPython) - Windows-Vista-6.0.6003-SP2
[debug] exe versions: ffmpeg 4.4, ffprobe 4.4, phantomjs 2.1.1, rtmpdump 2.4
[debug] Proxy map: {}
[generic] index: Requesting header
[generic] index: Downloading m3u8 information
[debug] Invoking downloader on 'https://cs9-13v4.vkuseraudio.net/p4/sample/18ZGA
-L2pnZ3pId2tsKzg0MTw8KmllYnldbywwOjIxNw/1c7d9d5b0dbd7e/index.m3u8?extra=MjD8tt6_
TUb3wUXToTqncTGzK_4a5ZDF5GtYwvD7lYLAbjNmYhThM8eHOYI100jXswdSjWl9_B7AQNHmbZXVVem-
fqOBwwIOQRRvnj6K2WqNY7pgbfnKWb7kpIef0wJboksuXElW0gAy9w'
[hlsnative] Downloading m3u8 manifest
[hlsnative] Total fragments: 11
[download] Destination: Sinister Souls - Crystal Math (Switch Technique Remix) -
30s sample.ts
[download] 100% of 1.26MiB in 00:10
[debug] ffmpeg command line: ffprobe -show_streams "file:Sinister Souls - Crysta
l Math (Switch Technique Remix) - 30s sample.ts"
[ffmpeg] Destination: Sinister Souls - Crystal Math (Switch Technique Remix) - 3
0s sample.mp3
[debug] ffmpeg command line: ffmpeg -y -loglevel "repeat+info" -i "file:Sinister
Souls - Crystal Math (Switch Technique Remix) - 30s sample.ts" -vn -acodec copy
"file:Sinister Souls - Crystal Math (Switch Technique Remix) - 30s sample.mp3"
Deleting original file Sinister Souls - Crystal Math (Switch Technique Remix) -
30s sample.ts (pass -k to keep)
Resultant 00:30 long MP3 file plays fine on all media players I tested it with (MediaInfo log below) ...
General
Complete name : Sinister Souls - Crystal Math (Switch Technique Remix) - 30s sample.mp3
Format : MPEG Audio
File size : 1.15 MiB
Duration : 30 s 14 ms
Overall bit rate mode : Constant
Overall bit rate : 320 kb/s
Writing library : LAME3.100
Audio
Format : MPEG Audio
Format version : Version 1
Format profile : Layer 3
Format settings : Joint stereo
Duration : 30 s 15 ms
Bit rate mode : Constant
Bit rate : 320 kb/s
Channel(s) : 2 channels
Sampling rate : 44.1 kHz
Frame rate : 38.281 FPS (1152 SPF)
Compression mode : Lossy
Stream size : 1.14 MiB (100%)
Writing library : LAME3.100
Hello!
I'm trying to download "Sinister Souls - Crystal Math (Switch Technique Remix)" from this link: https://vk.com/wall-44194635_17168?z=audio_playlist88629823_1172%2F9afed406d88c497d59 Using the developer tools in Chrome I found the m3u8 link:
https://psv4.vkuseraudio.net/audio/ee/UgWtx9LO0bbUBIReH881o42BjHaHTvhF1JHQyg/b7PTQ9NTI2NjQy/57UWs2YFVwb3o1S3M/index.m3u8?extra=9hKEXmkuJGqET_sZJjsbTPMjWs2KbL7skqGRdHahbGHwthLX-TXt9QOrGmuuaWAnhaQoPo5DZQRcqroPxAAMmjM_nvQ8XsBKhV-lxlOs0QOC3daIKbfDwK2zOMzZ3dk-NVj-4tWaLN0wVzqrLOnPH6yh
I tried to download using this command:
youtube-dl https://psv4.vkuseraudio.net/audio/ee/UgWtx9LO0bbUBIReH881o42BjHaHTvhF1JHQyg/b7PTQ9NTI2NjQy/57UWs2YFVwb3o1S3M/index.m3u8 --ignore-config
But this happened:
I got this error:
So I did some research and I found issue #18813 where user Vangelis66 suggested (link to comment) that OP should use this command:
youtube-dl --console-title --hls-prefer-native --hls-use-mpegts -c --no-part --fixup never "https://5bd725165e3d4.streamlock.net/test/_definst_/mp3:TOEIC/Audio/19990.mp3/master.m3u8" -o foo.mp3
So I replaced the link and I was able to download the track but there was no sound when I played it.
Then I saw that Vangelis66 also mentioned this command:
ffmpeg -i <URL>.m3u8 -c:a copy <FILE>.mp3
So I tested it and I was able to download the track but it was not the full track. The full track is 4:51 and I downloaded 3:15 and it was messy.
Any ideas how to download the full track?