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

First time loading videos sometimes takes a while to load (Needs more testing) #286

Open
trayfellow opened this issue Jul 10, 2023 · 21 comments
Labels
enhancement New feature or request wontfix This will not be worked on

Comments

@trayfellow
Copy link
Contributor

With hxCodec 3.0 loading videos for the first time can take to 10-15 seconds to load

@NeeEoo
Copy link

NeeEoo commented Jul 10, 2023

Can confirm this also happens for me on mac, sometimes it took 15 seconds sometimes it takes 50 seconds, i also see the lag happening for other people i see playing a mod i worked on

@JonnycatMeow
Copy link
Collaborator

i have an idea

@JonnycatMeow
Copy link
Collaborator

we can use file caching

@JonnycatMeow
Copy link
Collaborator

Screen Shot 2023-07-15 at 5 59 20 PM

@EgguMan
Copy link

EgguMan commented Aug 6, 2023

This occurs because the video is being moved from hard storage to RAM, and videos are very dense.

@JonnycatMeow
Copy link
Collaborator

is there anyway to fix it?

@EgguMan
Copy link

EgguMan commented Aug 6, 2023

is there anyway to fix it?

The way I did it is with this little work around on a seperate thread in my loading state.

image

@JonnycatMeow
Copy link
Collaborator

well could there be another way for it to be a perminate fix for hxCodec

@EgguMan
Copy link

EgguMan commented Aug 6, 2023

well could there be another way for it to be a perminate fix for hxCodec

To my understanding no. To do that it would need to preload every single video in the game at once. Not only is that extremely stressful on the PC but it's very resource dependent

@JonnycatMeow
Copy link
Collaborator

oh ok

@JonnycatMeow
Copy link
Collaborator

well can you make a example on the readme and name it preload video so people can do what you did to the video

@EgguMan
Copy link

EgguMan commented Aug 7, 2023

well can you make a example on the readme and name it preload video so people can do what you did to the video

Nah, it all works off a custom cutscene framework I made for my mod

@JonnycatMeow
Copy link
Collaborator

oh

@JonnycatMeow
Copy link
Collaborator

what is your mod called and does it have a source code on github?

@polybiusproxy
Copy link
Owner

Hello, does this issue occur when loading small videos? How big are the videos you're trying to load?

@EgguMan
Copy link

EgguMan commented Oct 15, 2023

Hello, does this issue occur when loading small videos? How big are the videos you're trying to load?

it appears to be based on the size of the videos, from my limited testing

@KarimAkra
Copy link

KarimAkra commented Oct 23, 2023

IMG-20231022-WA0001(1)

I manged to make it load faster using sys.threads.Thread

@polybiusproxy polybiusproxy added enhancement New feature or request wontfix This will not be worked on labels Feb 1, 2024
@polybiusproxy
Copy link
Owner

Won't fix atm, it is expected for hxCodec to take time when loading big videos, due to it being single-threaded, slow I/O speed on the hardware side, etc.

@JonnycatMeow
Copy link
Collaborator

hxvlc has faster loading time and they already did the byte video support

@polybiusproxy
Copy link
Owner

Yeah, I've seen quite a lot of stellar work on hxVLC, might as well replace hxCodec hahaha

@JonnycatMeow
Copy link
Collaborator

JonnycatMeow commented Feb 1, 2024

well i am gonna try to make vlc wasm so people don't have to worry about video support on web & you can probably make it into a app for ios. just get a https website link and convert it into a .app for ios

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

6 participants