summaryrefslogtreecommitdiff
path: root/home/xyz/.local
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-08-11 23:55:53 -0700
committerxyz <gky44px1999@gmail.com>2022-08-11 23:55:53 -0700
commitdbb047ffc2ebae20e97e6b8939b2b52d276945d1 (patch)
tree860b9f899599ccf36e0b7bd605aa7fca62815f31 /home/xyz/.local
parent5df43299e891e98691c3d16809af502664a5b58a (diff)
mpvy reuse `--sponsorblock-remove all`, need more time trying sponsorblock-mpv-local
Diffstat (limited to 'home/xyz/.local')
-rwxr-xr-xhome/xyz/.local/bin/mpvy7
1 files changed, 4 insertions, 3 deletions
diff --git a/home/xyz/.local/bin/mpvy b/home/xyz/.local/bin/mpvy
index ff016f25..bb6913a6 100755
--- a/home/xyz/.local/bin/mpvy
+++ b/home/xyz/.local/bin/mpvy
@@ -32,9 +32,10 @@ fi
case $flag in
# here if use --write-sub, mpv doesn't recognize subtitles?
# --embed-subs is a little bit better, but still worse then direct streaming
- # --sponsorblock-remove will make audio/video goes out of sync, need --force-keyframes-at-cuts which need re-encode, more see comments at the bottom of https://github.com/yt-dlp/yt-dlp/issues/871, I choose to only use mpv-sponsorblock-minimal-git instead,
- A) yt-dlp -f "$format" --embed-subs -P "${download_dir:-"$XDG_DOWNLOAD_DIR/mpvy/"}" "$url";;
- a) yt-dlp -f "$format" --embed-subs -P "${download_dir:-"$XDG_DOWNLOAD_DIR/mpvy/"}" "$url" --exec 'mpv --fs --speed=2';;
+ # --sponsorblock-remove will make audio/video goes out of sync, need --force-keyframes-at-cuts which need re-encode which is slow, more see comments at the bottom of https://github.com/yt-dlp/yt-dlp/issues/871
+ # another way is using mpv-sponsorblock-minimal-git for streaming and sponsorblock-mpv-local for local videos
+ A) yt-dlp -f "$format" --embed-subs -P "${download_dir:-"$XDG_DOWNLOAD_DIR/mpvy/"}" --sponsorblock-remove all "$url";;
+ a) yt-dlp -f "$format" --embed-subs -P "${download_dir:-"$XDG_DOWNLOAD_DIR/mpvy/"}" --sponsorblock-remove all "$url" --exec 'mpv --fs --speed=2';;
s) mpv --ytdl-format="$format" --ytdl-raw-options='write-sub=' --fs --speed=2 "$url";;
esac
# not sure if this is the best practice, but it seems working ;)