是否可以为 mpv 建立按键绑定来运行 shell 脚本?

Gar*_* Z. 5 keyboard-shortcuts shell-script mpv

我想改变我的网络摄像头的曝光时间增益......使用类似的东西v4l2-ctl -d /dev/video2 -c gain=15

据我搜索,mpv 的键绑定位于/配置于~/.config/mpv/input.conf。但是,我在互联网上找不到“如何从 mpv 的键绑定执行外部 shell 脚本”。这可能吗?

Dev*_*von 8

使用运行命令。例如,~/.config/mpv/input.conf如果您想在按下 时将当前播放位置复制到 Wayland 剪贴板,请添加以下行y

\n
y run "/bin/sh" "-c" "printf %s ${=time-pos} | wl-copy"\n
Run Code Online (Sandbox Code Playgroud)\n

另请参阅手册中的\xc2\xa7 命令界面。

\n

不过,我同意 terdon 的观点,在这种情况下你不需要 mpv。

\n