You will need to install a user script manager extension to install this script.
ffmpeg -i video.mp4 -i audio.mp4 -c:v copy -c:a aac -strict experimental output.mp4to merge audio and video files.
Script principle (Chinese): https://www.v2ex.com/t/856510
After the cache progress is loaded to 100 %, the video and audio file will be downloaded automatically ~
You can play video with 16x rate (
document.querySelector('video').playbackRate = x), or fast-forward video before cache progress, but please do not let the current progress bar exceeds the cache progress bar of the video bar. That will lead to the corresponding fragment of the video or audio lack of downloaded!
The script adds some variables on window:
Set in the console: 1.window.downloadAll
Set this value to 1 (window.downloadAll = 1) to download cached audio and video files (best to wait for the video to finish playing before setting it to avoid audio and video out of sync)
This value is the playback speed of the video in the page, the default is 1. You can set it up to 16 (window.quickPlay = x)
window.quickPlay = x with
document.querySelector('video').playbackRate = x
window.autoDownload = 1 (defaul 1) in the source file will automatically download the video after it finishes playing,
and it will automatically play at 16x speed
Why did the website only download one file at the end？ Please check whether the browser intercepts multiple files to download.
Which websites can be used? On all websites that can legal use of this script.
Why are you a Chinese who wants to write this script in English? English is a general language. Under the automatic translation of the webpage, it may be more suitable for places in different languages.
I want to download the cache files in advance, how do I do it? Enter
Window.downloadall = 1in the console, but this method is invalid for the video in iframe, and the downloaded video will be blank, because the iFrame webpage is different from the environment where the console is located, and they have no shared variables. So it is best to let it download automatically.
What should I do if the downloaded audio does not play properly? Just do it with Format Factory or Addobe Pr convert audio.mp4 to mp3 or aac(feedback from netizens). I personally recommend
ffmpeg -i audio.mp4 -c:a aac output.mp4to convert it and try it out.
How to input command. For example
document.querySelector('video').playbackRate = x或
F12on the keyboard to enter the developer interface, then find the console option, and then enter the command.
What should I do if the downloaded audio file does not play properly? Just use format factory or ffmpeg to separate it into mp3 format, from netizens.
- Anti-hook detection.
- Support iframe video download.
- Video cache 100%automatic download ( which can be configured with
window.Autodownload = 0at the source code to close it ).
- Use the console to enter
window.downloadAll = 1to download the captured clips.
- Support almost all websites.
2022.6.1: add some anti-hook detection.