Skip to content

Add from_memory option - #92

Open
po5 wants to merge 1 commit into
masterfrom
from-memory
Open

Add from_memory option#92
po5 wants to merge 1 commit into
masterfrom
from-memory

Conversation

@po5

@po5 po5 commented May 13, 2023

Copy link
Copy Markdown
Owner

Tried out mpv-thumbPreview's idea of getting the memory address of a string through ffi, and using it in overlay-add.

Peak check_new_thumb went from 161 to 535 microseconds, draw from 158 to 492 microseconds.
So not helping in the speed department but not too awful either.
I've had the player crash once with it. Could be because I am constantly overwriting the value, and Lua may be getting rid of the data at the old address too quickly.
That aside, the benefit would be that we probably can't get into a situation where our data is overwritten while trying to display it?

I don't have much faith in this approach, just a curiosity.

@hooke007

Copy link
Copy Markdown
Contributor

Maybe it could help those dying disks?

@hooke007

hooke007 commented May 13, 2023

Copy link
Copy Markdown
Contributor

I've had the player crash once with it.

Unfortunately, it would always crash in my side. Have no idea how to make it work.


Also, this version could not use direct_io
Snipaste_2023-05-13_08-05-07

@po5

po5 commented May 13, 2023

Copy link
Copy Markdown
Owner Author

Maybe it could help those dying disks?

Sadly it couldn't, we still write out every thumbnail to a file, and we read it at least once.
Maybe if we switched to a spammy 1 process per thunbnail like the original thumbnail script we can use stdout to skip the disk, but then you're putting a lot more strain on whatever disk has your video.

Will fix the direct_io issue when I wake up, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants