A method to download and combine segmented audio files painlessly.
Work around their abstraction. We own them.
Services such as VK split audio files into a bunch of .ts files containing segments of the original file, then control them via a playlist file with the extension .m3u8.
Using curl you can batch download the .ts files because they are numbered sequentually.
Example of how to download:
curl -o "index.m3u8" https://psv4.vkuseraudio.net/s/v1/a2/SFIHgtmyBk04qWBrFhk8wG165o9mBCnFVT7c4rNw_d_3ojM6qzUi4-bMz53RvpLdMsu0tbrhx9kgEFFb-5vZFeP60Kgg1UmgCZ1eAQZo3kX-e7LdHZ74wi1rJ1n0sXffrIZMhkcAK9gZLynvLcEmRwuYDWe8d4b1iA/index.m3u8
curl -o "seg-#1-a1.ts" https://psv4.vkuseraudio.net/s/v1/a2/SFIHgtmyBk04qWBrFhk8wG165o9mBCnFVT7c4rNw_d_3ojM6qzUi4-bMz53RvpLdMsu0tbrhx9kgEFFb-5vZFeP60Kgg1UmgCZ1eAQZo3kX-e7LdHZ74wi1rJ1n0sXffrIZMhkcAK9gZLynvLcEmRwuYDWe8d4b1iA/seg-[1-22]-a1.ts```
The URL for the index.m3u8
file and the segmented .ts
files can be found by simply monitoring network through your web browser's inspector when you play the audio.
Fill in the number of segments inside the braces with a range; in my example it's [1-22] as there are 22 segment files here. You can verify the number of segments in your file by downloading the .m3u8
file (the first "curl" step) and opening it in a text editor. This file is a playlist/table of contents, the segment at the bottom of the file will be the last segment.
After this, we use VLC Media Player's Convert/Save functions to finish the job and combine our segmented .ts
files into a single file by opening the .m3u8
in the Save/Convert window.
I recommend using WAV format + Keep Original Audio Track setting for the highest quality available.
Follow the settings in the screenshots below, or adjust them to your liking.
Note: I own the copyright to the files used in my example. These files are being downloaded with my permission. This method is not meant to be used as a means of piracy, but rather preservation of music/audio one may want to rightfully download and save.