Skip to content

Instantly share code, notes, and snippets.

@jamesWalker55
jamesWalker55 / autoeditor.js
Last active April 6, 2022 22:25 — forked from ishitatsuyuki/autoeditor.js
This script loads a JSON file produced by auto-editor, and skips regions of the video based on the JSON output. Place this script in your mpv scripts folder.
var timeObserver;
/** seek playback to the given second */
function seek_to(time) {
mp.set_property_number("time-pos", time);
}
function get_json_path() {
var video_path = mp.get_property("path");
return video_path.replace(/\.[^.]+$/, ".json");