Open Fr-Dae opened 2 years ago
Hi, this might help: (In the menu at the top) Extensions → external video player → settings: Insert your own command.
For mpv you can use mpv "#video_file" --sub-file="#subtitle_file" --start="#time" --length=5
--sub-file
Specify subtitle file
--start=<relative time>
Seek to given time position.
--length=<relative time>
Stop after a given time relative to the start time.
--fs
fullscreen playback
And ofc. any other mpv option you'd like to use (man mpv
).
Same for vlc or any other video player ofc.^ (Unfortunately, you can't specify multiple players right now…)
Here's our own little script for launching mpv from Subtitle Editor.
LENGTH_MS
)Recommended offset in ms
: 500
Command:
bash [script-path] "#video_file" "#subtitle_file" "#time"
The actual script:
#!/usr/bin/env bash
LENGTH_MS=10000
pkill mpv
END="$(date -d @"$(date -d "$3" +"%s%3N + $LENGTH_MS" | bc | awk ' { print substr( $0, 0, length($0)-3 ) } ')" +"%H:%M:%S.$(echo "$3" | awk ' { print substr( $0, length($0)-2, length($0) ) } ')")"
mpv "$1" --sub-file="$2" --start="$3" --ab-loop-a="$3" --ab-loop-b="$END" --force-window="yes" --sub-scale="0.35" --sub-pos="65" --sub-back-color="0.0/0.0/0.0/1.0" --osd-level="2" --osd-fractions="yes" --osd-font-size="16" --osd-margin-x="154" --osd-margin-y="475" --title="%NOFOCUS%%SCREEN2%"
(The --title
parameter coordinates with our personal KDE Window Rules configuration. Prevent window focus; display on Monitor 2.)
hello could you detaing how to sed mpv or vlc by default please ?