hxCodec icon indicating copy to clipboard operation
hxCodec copied to clipboard

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

Open trayfellow opened this issue 2 years ago • 21 comments

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

trayfellow avatar Jul 10 '23 14:07 trayfellow

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

NeeEoo avatar Jul 10 '23 14:07 NeeEoo

i have an idea

JonnycatMeow avatar Jul 16 '23 00:07 JonnycatMeow

we can use file caching

JonnycatMeow avatar Jul 16 '23 00:07 JonnycatMeow

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

JonnycatMeow avatar Jul 16 '23 00:07 JonnycatMeow

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

EgguMan avatar Aug 06 '23 20:08 EgguMan

is there anyway to fix it?

JonnycatMeow avatar Aug 06 '23 21:08 JonnycatMeow

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

EgguMan avatar Aug 06 '23 21:08 EgguMan

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

JonnycatMeow avatar Aug 06 '23 23:08 JonnycatMeow

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

EgguMan avatar Aug 06 '23 23:08 EgguMan

oh ok

JonnycatMeow avatar Aug 07 '23 00:08 JonnycatMeow

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

JonnycatMeow avatar Aug 07 '23 00:08 JonnycatMeow

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

EgguMan avatar Aug 07 '23 02:08 EgguMan

oh

JonnycatMeow avatar Aug 07 '23 03:08 JonnycatMeow

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

JonnycatMeow avatar Aug 07 '23 03:08 JonnycatMeow

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

polybiusproxy avatar Aug 07 '23 09:08 polybiusproxy

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

EgguMan avatar Oct 15 '23 20:10 EgguMan

IMG-20231022-WA0001(1)

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

KarimAkra avatar Oct 23 '23 04:10 KarimAkra

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.

polybiusproxy avatar Feb 01 '24 14:02 polybiusproxy

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

JonnycatMeow avatar Feb 01 '24 16:02 JonnycatMeow

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

polybiusproxy avatar Feb 01 '24 16:02 polybiusproxy

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

JonnycatMeow avatar Feb 01 '24 18:02 JonnycatMeow