Ajatt-Tools / mpvacious

🍜 Adds mpv keybindings to create Anki cards from movies and TV shows.

Home Page:https://tatsumoto-ren.github.io/blog/mining-from-movies-and-tv-shows.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

JPG Snapshots don't work after ffmpeg update

bxkx opened this issue · comments

commented

I realized all my recent cards don't have any screenshots. This started after the ffmpeg upgrade from 4.4 to 5.0 and the related packages on Arch on February 17.

I'm getting this output
[ 16.605][e][mpvacious] Couldn't store file 'video_00m07s441ms.jpg': [Errno 2] No such file or directory: '/tmp/video_00m07s441ms.jpg'

Everything else like audio is working just fine.

Just tried webp, which is still working.

Which encoder do you have enabled? ffmpeg or mpv?

commented

Should be the default, so mpv. I just switched it to ffmpeg and jpg and it does work in this case though it doesn't seem to use my set quality of 80 because the quality of the snapshots is very bad.

Some more log just in case.

[  37.839][d][cplayer] Run command: subprocess, flags=64, args=[args="mpv,video.mp4,--loop-file=no,--audio=no,--no-ocopy-metadata,--no-sub,--frames=1,--ovcopts-add=lossless=0,--ovcopts-add=compression_level=6,--ovc=mjpeg,-start=54.763333333333,--ovcopts-add=quality=80,--vf-add=scale=-2:200,-o=/tmp/video_00m54s763ms.jpg", playback_only="no", capture_size="67108864", capture_stdout="yes", capture_stderr="no", detach="no", env="", stdin_data="", passthrough_stdin="no"]
[  37.848][d][cplayer] Run command: subprocess, flags=64, args=[args="mpv,video.mp4,--loop-file=no,--video=no,--no-ocopy-metadata,--no-sub,--audio-channels=mono,--oacopts-add=vbr=on,--oacopts-add=application=voip,--oacopts-add=compression_level=10,--af-append=silenceremove=1:0:-50dB,--oac=libopus,--start=50.665,--end=55.67,--aid=1,--volume=100,--oacopts-add=b=18k,-o=/tmp/video_00m50s665ms-00m55s670ms.ogg", playback_only="no", capture_size="67108864", capture_stdout="yes", capture_stderr="no", detach="no", env="", stdin_data="", passthrough_stdin="no"]
[  37.855][d][cplayer] Run command: subprocess, flags=64, args=[args="curl,-s,localhost:8765,-X,POST,-d,{\"action\":\"addTags\",\"version\":6,\"params\":{\"notes\":[1645527505572],\"tags\":\"subs2srs video\"}}", playback_only="no", capture_size="67108864", capture_stdout="yes", capture_stderr="no", detach="no", env="", stdin_data="", passthrough_stdin="no"]
[  37.883][d][cplayer] Run command: subprocess, flags=64, args=[args="curl,-s,localhost:8765,-X,POST,-d,{\"action\":\"guiBrowse\",\"version\":6,\"params\":{\"query\":\"nid:1645527505572\"}}", playback_only="no", capture_size="67108864", capture_stdout="yes", capture_stderr="no", detach="no", env="", stdin_data="", passthrough_stdin="no"]
[  37.911][i][mpvacious] Note #1645527505572 updated. 
[  38.086][e][mpvacious] 
[KA: 00:00:51 / 00:03:49 (23%) {0.0min 43.53x 0.0MB}

[KA: 00:00:54 / 00:03:49 (24%) {0.0min 45.19x 0.0MB}
[  38.095][d][cplayer] Run command: subprocess, flags=64, args=[args="curl,-s,localhost:8765,-X,POST,-d,{\"action\":\"storeMediaFile\",\"version\":6,\"params\":{\"filename\":\"video_00m50s665ms-00m55s670ms.ogg\",\"path\":\"/tmp/video_00m50s665ms-00m55s670ms.ogg\"}}", playback_only="no", capture_size="67108864", capture_stdout="yes", capture_stderr="no", detach="no", env="", stdin_data="", passthrough_stdin="no"]
[  38.145][i][mpvacious] File stored: 'video_00m50s665ms-00m55s670ms.ogg'. 
[  38.183][d][cplayer] Run command: subprocess, flags=64, args=[args="curl,-s,localhost:8765,-X,POST,-d,{\"action\":\"storeMediaFile\",\"version\":6,\"params\":{\"filename\":\"video_00m54s763ms.jpg\",\"path\":\"/tmp/video_00m54s763ms.jpg\"}}", playback_only="no", capture_size="67108864", capture_stdout="yes", capture_stderr="no", detach="no", env="", stdin_data="", passthrough_stdin="no"]
[  38.213][e][mpvacious] Couldn't store file 'video_00m54s763ms.jpg': [Errno 2] No such file or directory: '/tmp/video_00m54s763ms.jpg'

After switching to jpg I can't reproduce this. As a side note, jpg is not a recommended format to use with Anki.

commented

Hm, maybe it sorts itself out with some time and updates. i'll just use webp now, doesn't really matter to me. Thanks for looking into it though