Vk Media Downloader

Download music, video from vk.com (Vkontakte)

Author
EisenStein
Daily installs
28
Total installs
16,106
Ratings
38 2 7
Version
2.2.0
Created
Updated
Compatibility
Compatible with Firefox Compatible with Chrome Compatible with Opera Compatible with Safari
License
N/A
Applies to
  • vk.com
  • vk-cdn.com
  • vk-cdn.net
  • userapi.com
  • vkuseraudio.net
  • vkuservideo.net

Author's Description

Vk media downloader

This script allows you to:
  • download video from vk.com
  • download music from vk.com
The advantages of this script:
  • the script is run only on VKontakte pages
  • the button for downloading video is also available in thumbnails.
  • the video file size is displayed when you hover the mouse over the video tooltip
  • shows the bitrate, size and download progress of hls (m3u8) audio files

How to download video, music from VKontakte (vk.com)

  • On thumbnails of the video a button will appear - “Download video”. When you hover the mouse over this button, a list of videos available for downloading will open. To start the download - click on the desired video resolution.

  • On the video player, the download button will appear in the lower right corner.
  • When you hover the mouse over the audio range, a button for downloading music will appear at the right end of the audio sequence. Click the button to start the download. IMPORTANT: do not close page before download completes.

Hotkeys

Alt+R - restart script (usefull if the download button not loaded in some pages)
For Aria2 users:
Alt+A - get all links to media files (video, audio)
Alt+S - save text file with received links

P.S.
It is not recommended to use Alt+A, especially if there are a lot of media files on the page, since a separate request is sent to each media file (100 files - 100 requests). Instead, you can hover the mouse over the save button as before - this initiates a request for a file link, and then press Alt+S, to save the links.

Settings Modal

Since version v2.2.0 the Settings Modal is added. To open Settings Modal click on VkMD button on top-left corner of a page.

Important notes

Starting from version v2.1.0 it is available to download *.ts files archived into a *.zip file:
- source/stream.001.ts
- source/stream.002.ts
- source/*.ts
- generate.mp3.bat
- generate.mp3.sh
- README.txt
- %filename%.txt


Why is it needed?
VK now uses hls instead of mp3. hls consists of *.ts files.
So in a new version v2.1.0 I have added *.ts downloader for further concantenation of the *.ts files into a single *.mp3 file by using ffmpeg. Such *.mp3 files have clear sound without distortions.

How to concatenate *.ts files into a single *.mp3 file?
  • install ffmpeg (google helps you)
  • run generate.mp3.[bat|sh] (bat - Windows, sh - Linux, MacOs)
    before you run the shell script make it executable > chmod +x generate.mp3.sh
If you want to download *.mp3 files directly, then set DOWNLOAD_TS = false. But be aware, that such *.mp3 files may have sound distortions.

If there are any errors, or the script does not work correctly, then:
  1. go to the Tampermonkey "Dashboard" open Settings Modal (click on VkMD button)
  2. select this script, check const DEBUG = 29 or const DEBUG = 31
  3. and save changes go to Logger tab, check all logger options, Save changes if autosave is unchecked
  4. then refresh the vk page and open the console (for Chrome Ctrl + Shift + J -> Console tab)
  5. try to download a media
  6. press Shift+S to save logs; if nothing happend, then just take screenshots of the console
  7. upload logs here https://greasyfork.org/en/scripts/38614-vk-media-downloader/feedback along with a description of the problem