summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxyz <gky44px1999@gmail.com>2022-08-11 20:15:15 -0700
committerxyz <gky44px1999@gmail.com>2022-08-11 20:15:15 -0700
commitc43d8e1307e2ca08430e2bbe869cc8251a9698ea (patch)
tree17745367fcaa906400334b34bfd1dcab549b5db8
parent979f82434af96b1c575db3921aa62f4a6e18ee63 (diff)
mpvy yt-dlp no sponsorblok-remove
-rwxr-xr-xhome/xyz/.local/bin/mpvy5
1 files changed, 3 insertions, 2 deletions
diff --git a/home/xyz/.local/bin/mpvy b/home/xyz/.local/bin/mpvy
index 434db58c..ff016f25 100755
--- a/home/xyz/.local/bin/mpvy
+++ b/home/xyz/.local/bin/mpvy
@@ -32,8 +32,9 @@ 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
- 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';;
+ # --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';;
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 ;)