git 中的 mpv_thumbnail_script 存在问题

git 中的 mpv_thumbnail_script 存在问题

我将尝试在 lubuntu 20.04 中使用mpv_thumbnail_script 我对这个脚本的配置

cat .config/mpv/lua-settings/mpv_thumbnail_script.conf 
#Für Vorschaubildchein in mpv
cache_directory=/home/alex/mpv/my_mpv_thumbnails
autogenerate=yes
prefer_mpv=yes
mpv_no_sub=yes
disable_keybinds=yes
thumbnail_width=200
thumbnail_height=200
thumbnail_network=no
thumbnail_count=150
min_delta=5
max_delta=90

我的 mpv 配置

cat .config/mpv/config
#hwdec=vdpau
#vo=vdpau
fullscreen
sub-scale=1
osc=no

但是当我启动 mpv 时缩略图是黑色的。

从终端开始

mpv jd2/downloads/Aang\ \&\ Tenzin\ -\ Clip_\ Avatar\ The\ Legend\ of\ Korra/Aang\ \&\ Tenzin\ -\ Clip_\ Avatar\ The\ Legend\ of\ Korra\ \(360p\).mp4 
[mpv_thumbnail_script_server] lua-settings/ is deprecated, use directory script-opts/ 
[mpv_thumbnail_script_client_osc] lua-settings/ is deprecated, use directory script-opts/ 
 (+) Video --vid=1 (*) (h264 624x352 24.000fps)
 (+) Audio --aid=1 --alang=eng (*) (aac 2ch 44100Hz)
[vaapi] libva: /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so init failed
Using hardware decoding (vaapi).
AO: [pulse] 44100Hz stereo 2ch float
VO: [gpu] 624x352 vaapi[nv12]
AV: 00:00:00 / 00:01:29 (0%) A-V:  0.000
[mpv_thumbnail_script_client_osc] The 'tick' event is deprecated and will be removed.
AV: 00:00:00 / 00:01:29 (0%) A-V:  0.000
[mpv_thumbnail_script_server] Thumbnailing command failed! 
[mpv_thumbnail_script_server] mpv process error: nil 
[mpv_thumbnail_script_server] Process stdout:  
[mpv_thumbnail_script_server] Debug log: /home/alex/mpv/my_mpv_thumbnails/Aang  Tenzin - Clip_ Avatar The Legend of Korra 360p-3829920/000000.bgra.log 
[mpv_thumbnail_script_server] Output file missing! /home/alex/mpv/my_mpv_thumbnails/Aang  Tenzin - Clip_ Avatar The Legend of Korra 360p-3829920/000000.bgra 
(Paused) AV: 00:01:29 / 00:01:29 (100%) A-V:  0.000


Exiting... (End of file) # here dies mpv
[mpv_thumbnail_script_client_osc] 
[mpv_thumbnail_script_client_osc] stack traceback:
[mpv_thumbnail_script_client_osc]       .../.config/mpv/scripts/mpv_thumbnail_script_client_osc.lua:1080: in function 'prop'
[mpv_thumbnail_script_client_osc]       mp.defaults:392: in function 'handler'
[mpv_thumbnail_script_client_osc]       mp.defaults:486: in function 'call_event_handlers'
[mpv_thumbnail_script_client_osc]       mp.defaults:520: in function 'dispatch_events'                                                                     
[mpv_thumbnail_script_client_osc]       mp.defaults:479: in function <mp.defaults:478>                                                                     
[mpv_thumbnail_script_client_osc]       [C]: in ?                                                                                                          
[mpv_thumbnail_script_client_osc]       [C]: in ?                                                                                                          
[mpv_thumbnail_script_client_osc] Lua error: .../.config/mpv/scripts/mpv_thumbnail_script_client_osc.lua:1080: attempt to compare nil with number 

我不确定是我犯了错误,还是脚本本身有问题。

日志档案

注意:我不会写脚本。我发现了这个这个问题并点击答案中的链接,但我不知道该做什么。

答案1

我可以通过改变来解决这个问题

.config/mpv/lua-settings/mpv_thumbnail_script.conf 

部分

prefer_mpv=yes

prefer_mpv=no

即使在 PATH 中找到 ffmpeg,也使用 mpv 生成缩略图 ffmpeg 比 mpv 稍快,但不支持 MKV 中有序的 >章节,这可能会破坏生成的缩略图。您已收到警告。默认为是(不使用 ffmpeg)prefer_mpv=[yes/no]

使用 ffmpeg 制作缩略图,可以工作。

在此处输入图片描述

相关内容