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

Added support for video cutscenes in polymod using hxvlc. #2639

Closed
wants to merge 16 commits into from

Conversation

MAJigsaw77
Copy link

By using hxvlc, bitstream playback is available, allowing video cutscenes to be played directly from byte streams. This enables video cutscenes to be played from polymod.

Copy link
Contributor

@Sword352 Sword352 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

goated.

if (vid.load(bytes))
vid.play();

onVideoStarted.dispatch();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, you just forgot to remove this line you copied from VideoCutscene

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, you just forgot to remove this line you copied from VideoCutscene

My bad

@NotHyper-474
Copy link
Contributor

NotHyper-474 commented Jun 2, 2024

Also from what I tested this seems to have broken the videos, there's only a black screen instead. But perhaps I did something wrong...

Edit: Ok I've added an error handler to see what was happening and this is what is being thrown.
image

@MAJigsaw77
Copy link
Author

Also from what I tested this seems to have broken the videos, there's only a black screen instead. But perhaps I did something wrong...

Edit: Ok I've added an error handler to see what was happening and this is what is being thrown. image

The paths seem to have something broken.

@MAJigsaw77
Copy link
Author

@NotHyper-474 your issue should be gone now as the paths are no longer striped.

@NotHyper-474
Copy link
Contributor

NotHyper-474 commented Jun 2, 2024

@NotHyper-474 your issue should be gone now as the paths are no longer striped.

Very goob, I'll see if it works tomorrow

Update: Yeah, that did the trick!

Copy link
Contributor

@AbnormalPoof AbnormalPoof left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Video cutscenes were actually already supported in Polymod, but you needed to specify the absolute path to the MP4 since Paths() didn't work (see #2446).

PR looks good to me, though!

@MAJigsaw77
Copy link
Author

Video cutscenes were actually already supported in Polymod, but you needed to specify the absolute path to the MP4 since Paths() didn't work (see #2446).

PR looks good to me, though!

Zip mods couldn't load videos in any way, now if these changes are pushed that will be a no problem.

@AbnormalPoof
Copy link
Contributor

I see, interesting.

Copy link

@biomseed biomseed left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pretty sure I heard once that hxvlc is much better than hxCodec so this is good

Copy link
Contributor

@cyn0x8 cyn0x8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes please

@ninjamuffin99
Copy link
Member

will have to do R&D on this internally and do some battle testing! but been seeing you work away at hxvlc while we been on old hxcodec !

@ninjamuffin99
Copy link
Member

on my macbook (havent been at my home windows pc yet) I seem to be getting

Error while executing function UghSong.startVideo()#34: 
An unknown error occurred: hscriptClass(assets/scripts/songs/ugh.hxc):34: Script threw an exception: 
[hxvlc.util.Handle] ERROR: Failed to initialize the LibVLC instance

this also occurs with darnell, i just tried to open week 7 and weekend 1 from story menu

@MAJigsaw77
Copy link
Author

on my macbook (havent been at my home windows pc yet) I seem to be getting

Error while executing function UghSong.startVideo()#34: 
An unknown error occurred: hscriptClass(assets/scripts/songs/ugh.hxc):34: Script threw an exception: 
[hxvlc.util.Handle] ERROR: Failed to initialize the LibVLC instance

this also occurs with darnell, i just tried to open week 7 and weekend 1 from story menu

You need to do a clean build to delete the old plugins

@MAJigsaw77
Copy link
Author

I updated libvlc recently but dw, i made a patch were it will automatically fix this issue.

@MAJigsaw77
Copy link
Author

I updated libvlc recently but dw, i made a patch were it will automatically fix this issue.

I'll need to release it tomorrow.

@EliteMasterEric EliteMasterEric added status: reviewing internally This PR is under internal review and quality assurance testing and removed reviewing-internally labels Jun 16, 2024
@EliteMasterEric EliteMasterEric added the type: enhancement Provides an enhancement or new feature. label Jun 17, 2024
@EliteMasterEric EliteMasterEric added the medium A medium pull request with 100 or fewer changes label Jul 11, 2024
@EliteMasterEric EliteMasterEric deleted the branch FunkinCrew:develop July 12, 2024 01:00
@AbnormalPoof
Copy link
Contributor

FYI The repo now uses project.hxp instead of Project.xml, if you're wondering why there's merge conflicts that's likely the reason why

@cyn0x8
Copy link
Contributor

cyn0x8 commented Oct 1, 2024

nooo why closed? i was really looking forward to this one as it fixes several issues ive encountered with videos

@MAJigsaw77
Copy link
Author

nooo why closed? i was really looking forward to this one as it fixes several issues ive encountered with videos

I don't think this was ever going to be pushed, fell free to make a pr on your own if you want.

@AbnormalPoof
Copy link
Contributor

To be fair there are a lot of older PRs that still have the status: pending triage label. It might take some time especially considering this replaces an entire video library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
medium A medium pull request with 100 or fewer changes status: reviewing internally This PR is under internal review and quality assurance testing type: enhancement Provides an enhancement or new feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants