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

Using large Bink videos seems to crash the game #395

Open
nhatter opened this issue Mar 7, 2025 · 6 comments
Open

Using large Bink videos seems to crash the game #395

nhatter opened this issue Mar 7, 2025 · 6 comments
Labels
Bug Something is not working right Enhancement Is new feature or request Minor Severity: Minor < Major < Critical < Blocker OngoingDiscussion Requires further discussion

Comments

@nhatter
Copy link

nhatter commented Mar 7, 2025

Area(s) with this issue?

C&C Generals: Zero Hour

Describe the issue

UPDATE: This issue is probably VERY low priority compared to fixing mismatch error and random game crashes. Nonetheless, filed as recommended by the community

I've been working on upscaling and cleaning up some of the Generals Zero Hour videos (such as the intro video - see here to watch it in its full 4K 60 FPS and 16:9 Widescreen glory: https://www.youtube.com/watch?v=PpCSVc0v3Ng )

After me and @sorcerer86pt converted the shiny new intro to a large Bink video (.bik) (around 400MB+), I tried to put it back into the Movies folder in the game installation.

However, this gives me a "Serious Error" - see attached.

It's quite possible there may be some hardcoding going on, eg. the game code may expect the videos to be in a certain resolution, such as 800x600, or 640x480, etc. I'd be very surprised if there weren't some hardcoded "hacks" to make the game work :)

Perhaps you could search the code base for "sizzle_review" which is the name of the game intro.

Steps to reproduce

  1. Download the 4K version of the large .bik file here (.bik version of the upgraded video intro):
    https://drive.google.com/file/d/1fqKTOjzNPHZwQHiyYOJSapXOES7qLvlB/view?usp=drive_link

  2. Overwrite Data/English/Movies/sizzle_review and Overwrite Data/English/Movies/sizzle_review and Data/English/Movies/sizzle_review and Overwrite Data/English/Movies/sizzle_review640 with the large .bik file

  3. Try to start the game (eg. double C&C Generals Zero Hour from the Desktop)

  4. Game will crash "with serious error"

Attachments

Image
@JeodC
Copy link

JeodC commented Mar 8, 2025

How much memory does it use? At first glance the game appears to lack any streaming flags so it may load bink videos into RAM by default, and if it goes over the 4GB limit an x86 application has, well...?

@DevGeniusCode DevGeniusCode added Bug Something is not working right Enhancement Is new feature or request OngoingDiscussion Requires further discussion labels Mar 8, 2025
@Ayham981
Copy link

Ayham981 commented Mar 8, 2025

I tried it it's work without crash i guess your problem not if the game doesn't support large bik file it more like the problem is file size 474mb and the original file size is 22.7mb so bik file was so heavy i tried to play video in vlc player it was running smoothly until i move the video manually that make me wait 17 second to start again even i have RTX 3050 and ssd 520 i5 11th 16GB RAM so when i overwrite the file to the game the video play frame by frame here is the video

https://drive.google.com/file/d/14XiOPWusJ8u7pMvD1qy4r8gieMwDoTys/view?usp=drivesdk

@nhatter
Copy link
Author

nhatter commented Mar 8, 2025

I tried it it's work without crash i guess your problem not if the game doesn't support large bik file it more like the problem is file size 474mb and the original file size is 22.7mb so bik file was so heavy i tried to play video in vlc player it was running smoothly until i move the video manually that make me wait 17 second to start again even i have RTX 3050 and ssd 520 i5 11th so when i overwrite the file to the game the video play frame by frame here is the video

https://drive.google.com/file/d/14XiOPWusJ8u7pMvD1qy4r8gieMwDoTys/view?usp=drivesdk

This might provide evidence for @JeodC's excessive memory usage theory...

Anyway, this issue is probably VERY low priority compared to others such as mismatch error and random game crashes mid-match.

But nonetheless, maybe it can be fixed at some point.

@Ayham981
Copy link

Ayham981 commented Mar 8, 2025

This might provide evidence for @JeodC's excessive memory usage theory...

Anyway, this issue is probably VERY low priority compared to others such as mismatch error and random game crashes mid-match.

But nonetheless, maybe it can be fixed at some point.

Yes maybe they will not use bik because it's old they can remake it to bik2 or use H264 for better compatibles with old operation system and less issues and more compressed file

But first time i see this error and not happend to me maybe because installed vanilla game without and all i do is run genpatcher only to support FullHd and 120FPS and then delete everything

@nhatter
Copy link
Author

nhatter commented Mar 8, 2025

A possible solution suggested by a few people has been to maybe switch to using a lib like ffmpeg or similar, and use mp4 videos instead.

However, we should defo prioritise fixing mismatch and mid-game crashes first :)

@tintinhamans tintinhamans added the Minor Severity: Minor < Major < Critical < Blocker label Mar 8, 2025
@xmesaj2
Copy link

xmesaj2 commented Mar 11, 2025

https://github.com/xoreos/xoreos/blob/374f800c8def04bc9780fa6c4a0c55bcf6138e05/AUTHORS#L156

xoreos has reimplemented bink using ffmpeg

https://github.com/xoreos/xoreos/blob/374f800c8def04bc9780fa6c4a0c55bcf6138e05/src/video/bink.cpp

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is not working right Enhancement Is new feature or request Minor Severity: Minor < Major < Critical < Blocker OngoingDiscussion Requires further discussion
Projects
None yet
Development

No branches or pull requests

6 participants