Closed asakura42 closed 3 years ago
Do you mean passing the YouTube URL directly to mpv
?
This can be done by modifying the mpv
section in the config-file, to:
mpv => {
arg => "--really-quiet *URL*",
audio => "",
cmd => "mpv",
fs => "--fullscreen",
novideo => "--no-video",
srt => "--sub-file=*SUB*",
},
Additionally, there is also the *ID*
special token, if needed. For more tokens, see pipe-viewer -T
.
Thank you.
A small hack to no longer pass the *URL*
to mpv
, but still having sponsorblock working:
~/.config/mpv/scripts
."&v=([%w-_]+)$"
inside the function file_loaded()
And now in the configuration of pipe-viewer
, change the mpv
section to:
mpv => {
arg => "--really-quiet --force-media-title=*TITLE* --no-ytdl *VIDEO*\\&v=*ID*",
audio => "--audio-file=*AUDIO*",
cmd => "mpv",
fs => "--fullscreen",
novideo => "--no-video",
srt => "--sub-file=*SUB*",
},
The first method worked for me with pipe-viewer 0.4.4
/ mpv 0.32.0
/ mpv_sponsorblock I replaced: "--really-quiet --force-media-title=*TITLE* --no-ytdl --no-terminal *VIDEO*",
with: "--really-quiet --force-media-title=*TITLE* --no-terminal *URL*",
The fix works, but now everything plays at max resolution instead of 720p which I use.
The fix works, but now everything plays at max resolution instead of 720p which I use.
Try this workaround instead, which allows pipe-viewer to select the resolution.
Otherwise, add in ~/.config/mpv/config
the following line:
ytdl-raw-options-append="format-sort=ext,res:720"
Does not appear to be working here for me with pipe-viewer, but works with mpv by itself.
I write mpv addon to use sponsorblock with local database and I need to get video IDs. But I didn't found that option in code. So can I pass video ID as an argument?