Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add from_memory option #92

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add from_memory option #92

wants to merge 1 commit into from

Conversation

po5
Copy link
Owner

@po5 po5 commented May 13, 2023

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
Contributor

Maybe it could help those dying disks?

@hooke007
Copy link
Contributor

hooke007 commented May 13, 2023

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
Copy link
Owner Author

po5 commented May 13, 2023

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.

None yet

2 participants