Movatterモバイル変換


[0]ホーム

URL:


Skip to content
DEV Community
Log in Create account

DEV Community

mafflerbach
mafflerbach

Posted on

     

Launch youtube videos in mpv with qutebrowse

I am a heavy vim user, so I search for vim bindings for my browser to get a mouse-less browsing and navigation experience. Firefox and Chrome have quite good extensions, but still it was not enough for a pure mouseless experience. So after some search I stumble overqutebrowser and I became very soon my main browser.

One of the main feature of qutebrowser is, among the other things, the possibility to launch other processes or scripts via a self defined shortcut.
I configured my browser in that way, that it fills a playlist, open a playlist in mpv and open a specific video URL in mpv directly. In combination withyt-dlc I can start any youtube video via broser with mpv.

Usually you would use youtube-dl, but thanks to the DMCA takedown, we have to use a fork, which seams a better alternative because the original Repo experienced a slowdown in development.

A small disclaimer here: The youtube-dl and there forks are not Abel to download, or stream DRM protected content at all. We will have to wait what will happen to the project and there fork and if the takedown is valid.

config.bind('<Ctrl-Shift-p>','hint links spawn --verbose --detach /home/maren/dotfiles/i3/script/fillplaylist.sh push {hint-url}')config.bind('<Ctrl-Shift-o>','spawn --verbose --detach /home/maren/dotfiles/i3/script/fillplaylist.sh play')config.bind('<Ctrl-Shift-d>','hint links spawn --verbose --detach mpv {hint-url} --input-ipc-server=/tmp/mpvsocket')
Enter fullscreen modeExit fullscreen mode

To fill and start a playlist, I wrote a small helper script:

#!/bin/bashif[$1=="play"];thenecho"play mpv"    mpv--playlist=/tmp/playlist--input-ipc-server=/tmp/mpvsocketrm-f /tmp/playlistfi if[$1=="push"];thenecho$2>> /tmp/playlistfi
Enter fullscreen modeExit fullscreen mode

Top comments(0)

Subscribe
pic
Create template

Templates let you quickly answer FAQs or store snippets for re-use.

Dismiss

Are you sure you want to hide this comment? It will become hidden in your post, but will still be visible via the comment'spermalink.

For further actions, you may consider blocking this person and/orreporting abuse

  • Joined

More frommafflerbach

DEV Community

We're a place where coders share, stay up-to-date and grow their careers.

Log in Create account

[8]ページ先頭

©2009-2025 Movatter.jp