noaione / mpv-js-scripts

Some mpv scripts I created (made in JS)
26 stars 2 forks source link

Multiple screenshots of the same frame #9

Closed JinEnMok closed 10 months ago

JinEnMok commented 10 months ago

Whenever I run the script, I get the desired number of screenshots, but only 3 different frames per mosaic (for a 9- or 12-screenshot mosaic). It seems the seeking can't quite catch up, so I end up getting repeating screenshots. I noticed there's a comment line that says "wait" in the source, but I don't see an actual wait code. My own TS and JS skills are too abysmal to successfully implement a wait function there.

noaione commented 10 months ago

Yeah, that could happen if the saving too disk is too slow

And for that wait thing, I forgot to do it

noaione commented 10 months ago

I tried fixing it using native_async + callback, I don't know how consistent it is though

https://github.com/noaione/mpv-js-scripts/commit/77651fa1872a65bc63423b9c8c644fb13dd7cb70

noaione commented 10 months ago

I missed some stuff, the latest commit (https://github.com/noaione/mpv-js-scripts/commit/ade9a26d5f2a1bc77bb466fe258a0f2dd997f712) should fix it.

If there is still problem you can reopen the issue.

zaeboba commented 4 days ago

@noaione Hey, I'm having the same problem. if i take a screenshot of the same file, i can get either 2 different frames or 3 frames. these are examples 1 Henshin _Lucky_Star_01_(BD_x264_1280x720_FLAC) mkv mosaic4x4

sometimes you can just get 1 frame

Terminator-Chugunnoe Rylo avi mosaic4x3