#1
|
|||
|
|||
Solving the BinkPack Problem [+Oggre]
TL;DR - Stop using FreeArc!
I am sure you will agree that at some point you will have found a game which contains bink videos that BPK can compress, but you get a CRC check error or broken file crash when you try to extract your archive. The issue with this is that BPK is slightly bugged in that it can extract the files it compresses, but a couple of bytes will be incorrect which causes the crash with FreeArc. FreeArc checks each file it extracts to ensure that the CRC is the same as the file that was compressed. Since the file that BPK unpacks is different in some places, you can easily just patch the extracted bink video to the original video. I will demonstrate with a video from Forza Horizon 5 - the issue with this video is that CLS-BPK.DLL will get stuck when decoding and endlessly output to the file. But, by using the EXE version of bpk and a little HDIFFZ magic, we can now avoid all the issues and have a significantly smaller repack. This works for oggre too! Use the EXE versions of both and ignore the CLS. *.BINKDIFF = HDiffZ patch between original bink and tmp extracted bink from bugged BPK *.BK2 = original video. *.BPK = packed video. *.TMP = tmp extracted bink from bugged BPK |
Sponsored Links |
#2
|
||||
|
||||
All binks I got so far were bpk bugs out keeps unpacking infinitely without any error message from arc.exe. Only installers telling me that something is wrong
But thanks anyway for this topic and especially for the information.
__________________
Haters gonna hate
|
#3
|
|||
|
|||
Can you upload the file? I tested on such a video that would endlessly unpack in the example above.
|
#4
|
||||
|
||||
Oh well, I didn't read your tldr.. All is clear now
__________________
Haters gonna hate
|
#5
|
||||
|
||||
Fascinating stuff, will definitely test this method out, got a couple dozen repacks I put on hold due to "Oggre" failing to properly decompress with FreeArc, fingers crossed I can finally finish em now!
|
#6
|
|||
|
|||
Can someone upload a small sample bik file that causes this error? Would like to test.
__________________
NOT AVAILABLE |
#8
|
|||
|
|||
Tested the "Kro001_ExoIntro_Drop.bik" file compressed with use various CLS-BPK dll's (91.5/227/663kB size) again and again from decompressing.
unarc.exe: Get "failed CRC check" error message, not decompressing the BIK file from archive. Arc.exe: Process not finished and still in 100% and infinitely looping decompress the BIK file, writing to again and again in whole time. Screen: https://i.kek.sh/qtDtatG5oGo.png Infinitely extracted "Kro001_ExoIntro_Drop.bik" file sample from analyze: https://pixeldrain.com/u/sJHwUPKB |
#9
|
||||
|
||||
Don't use the cls.
Use bink_pack.exe and bink_unpack.exe
__________________
Haters gonna hate
|
#10
|
||||
|
||||
i try this, but failed, what wrong with this ?
|
#11
|
|||
|
|||
You did it wrong, hdiffz (insert temp file) (insert original file) (insert diff file), then hpatchz (insert temp file) (insert diff file) (insert new file)
|
The Following User Says Thank You to Hexagon123 For This Useful Post: | ||
kuyhaa (05-09-2022) |
#12
|
||||
|
||||
Quote:
hpatchz and hdiffz (insert temp file) (insert original file) (insert diff file) |
#13
|
||||
|
||||
Maybe something is not clear enough, here is a example batch.
PS: You can delete echo and pause commands. I just made them to show the steps Code:
@echo off echo. Compress bink files for /r %%f in (*.bik) do bink_pack "%%f" "%%~df%%~pf%%~nf.bpk_compressed pause echo. Unpack compressed file for /r %%f in (*.bpk_compressed) do bink_unpack "%%f" "%%~df%%~pf%%~nf.tmp_for_patch_creation" pause echo. Create diff from original vs unpacked file for /r %%f in (*.tmp_for_patch_creation) do hdiffz "%%f" "%%~df%%~pf%%~nf.bik" "%%~df%%~pf%%~nf.BinkDIFF" pause echo. Delete unpacked files ("*.tmp_for_patch_creation") which were just extracted for patch creation purposes, you no longer need them del /Q /F /S "*.tmp_for_patch_creation" pause echo. ------------------------------------------------------------ echo. On this point you should exclude all "*.bik" files or move them to a backup dir (you can use robocopy for ease) echo. because you only need to pack "*.bpk_compressed" and "BinkDIFF" files. echo. Now you have to pack your game files like you normally would echo. ------------------------------------------------------------ echo. echo. ------------------------------------------------------------ echo. After installing with Setup or similar, app folder should contain echo. "*.bpk_compressed" and "*.BinkDIFF" files instead of original "*.bik* files echo. ------------------------------------------------------------ echo. Unpack compressed to "*.bik_bad_crc" for /r %%f in (*.bpk_compressed) do bink_unpack "%%f" "%%~df%%~pf%%~nf.bik_bad_crc" pause echo. Patch "*.bik_bad_crc" back to original with "*.BinkDIFF" files ("input_file"" input_diff" "output_file") for /r %%f in (*.bik_bad_crc) do hpatchz.exe "%%~df%%~pf%%~nf.bik_bad_crc" "%%~df%%~pf%%~nf.BinkDIFF" "%%~df%%~pf%%~nf.bik_good_crc" pause echo. Rename all file extensions from "*.bik_good_crc" to "*.bik" ren "*.bik_good_crc" "*.bik" pause echo. Remove all temp files del /Q /F /S "*.bik_bad_crc" del /Q /F /S "*.BinkDIFF" del /Q /F /S "*.bpk_compressed" del /S "hdiffz.exe" del /S "hpatchz.exe" pause
__________________
Haters gonna hate
Last edited by KaktoR; 05-09-2022 at 15:09. |
The Following 5 Users Say Thank You to KaktoR For This Useful Post: | ||
Gehrman (05-09-2022), kj911 (07-09-2022), kuyhaa (06-09-2022), Masquerade (05-09-2022), ScOOt3r (06-09-2022) |
#14
|
||||
|
||||
Quote:
|
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
dvd playing problem... | themis_t | CD/DVD Software & Utilities | 6 | 20-10-2004 14:44 |
Problem with Record Now Max ver 4.5 | brkr101 | PS2 Games | 2 | 22-04-2004 22:40 |
problem with my xbox | mrlucky | XBox Games | 1 | 11-01-2004 09:38 |
A problem about NFS Underground | Gilvin | PC Games | 1 | 22-11-2003 22:17 |
Problem with pics on web pages and cookies | EVOEvo | CD/DVD-Writers | 3 | 05-10-2003 18:57 |