Vk Media Downloader
Download music and video from vk.com without any external service


The advantages of this script:
- this is open source project
- works without any external service
- download video from thumb - no need to open a video to download it
- this script can work even without GM API - if you want you can disable all @grant metadata and the script still would work (tested on Firefox + Tampermonkey, Firefox + Violentmonkey)
- automatically add ID3 metadata to audio files - this feature requires ffmpeg.js to be enabled (see
Settings -> General
)
Hotkeys
Alt+R
- Restart script - usefull if the download button doesn't appear in some pages
Alt+L
- Save log file - needed for debugging the script
Alt+U
- Save audio url to clipboard
Settings
To open settings modal click on VkMD button on left side bar or profile menu on top-right corner

FFmpeg.js
The new version v3.3.0 added ffmpeg.js
.
Now you don't need to install ffmpeg
on your computer.
One click is enough and this script will combine *.ts
fragments into an mp3 / mp4 file directly in the browser (see below Important notes ).
If you still do not want to use this functionality, or it slows down your browser, you can always disable this option in the settings General -> uncheck "Enable ffmpeg.js "
.
Important notes
Starting from version v2.1.0 it is available to download *.ts fragments of HLS playlist archived into a *.zip file:
- source/stream.001.ts
- source/stream.002.ts
- source/*.ts
- generate.mp3.bat
- generate.mp3.sh
- apple.script.txt
- README.txt
- %filename%.txt
Why is it needed?
VK now uses HLS (Http Live Streaming) instead of mp3. HLS consists of *.ts fragments.
So in a new version v2.1.0 I have added *.ts downloader.
One should use ffmpeg to convert *.ts fragments into a single *.mp3 file.
For this purpose I've created scripts (bat
- for Windows, sh
- for Linux, MacOS) generate.mp3.bat
, and generate.mp3.sh
, they are included in a downloaded *.zip file
How to convert *.ts fragments into *.mp3 ?
- install ffmpeg if you haven't done it yet (google helps you)
- unzip downloaded *.zip file
- run
generate.mp3.[bat|sh]
, P.S. before you run the shell script make it executable: chmod +x generate.mp3.sh
- MacOS users can export "apple.script.txt" as app:
- Copy and paste the text of "apple.script.txt" into Script Editor app.
- Export as app.
- Drag the app to the dock for easy drag and drop.
- Extract downloaded zip and drop the folder on to the app.
- The app will export the mp3 and move it into the parent directory of the zip file. It will then move the zip file into the extracted folder and send the folder to the trash.
If there are any errors or the script doesn't work correctly
- enable debugging mode in logger settings: Settings -> Logger -> Debug

- press
Alt+L
to save logs into file
- if
Alt+L
doesn't work, then open browser's Console
and save logs;
for Chrome
and Opera
: Ctrl+Shift+J
-> tab Console
-> right click in console window -> Save as
;
for Firefox
: Ctrl+Shift+K
-> tab Console
-> right click on messages -> Export visible messages to -> File
;
- upload log file here https://greasyfork.org/en/scripts/38614-vk-media-downloader/feedback along with a description of the problem
Hotkeys for Aria2 users
Alt+A
- get links of all music and video files on current page
Alt+S
- save text file with received links
Sponsor
Sponsor this project by yandex wallet