donmai-me / WannaCRI

Criware media formats library
MIT License
130 stars 10 forks source link

Tales of Arise: USM Alpha Transparency Support #3

Open EmirioBomb opened 3 years ago

EmirioBomb commented 3 years ago

 Thanks for your amazing works. this tool did work for me on old Criware files, but not recently files

Here is the EMB_AST link(not work with wannacri): EMB_AST

I picked some difference from two files, which worked fine with left, but not right 484rWR.png Here is the error message

 for i, usmfile in enumerate(usmfiles):
        filename = os.path.basename(usmfile)
        print(f"Processing {i+1} of {len(usmfiles)}... ", end="", flush=True)
        try:
            usm = Usm.open(usmfile, encoding=args.encoding, key=args.key)

            usm.demux(
                path=args.output,
                save_video=True,
                save_audio=True,
                save_pages=args.pages,
                folder_name=filename,
            )
        except ValueError:
            print("ERROR")
            print(f"Please run probe on {usmfile}")
        else:
            print("DONE")

484yS1.png

I'm not sure if the KEYUSEDIFENCRYPTED is needed? wannacri extractusm /path/to/usm/file/or/folder --key 0xKEYUSEDIFENCRYPTED

Or, if this file has new encryption, your help will be greatly appreciated!!!

donmai-me commented 3 years ago

Thank you for your detailed bug report and I apologise for the late reply.

Looks like the problematic usm has two videos, one for color and one for alpha transparency, so it may be the reason why extraction failed. Can you run wannacri probeusm /path/to/problematic/usm and send the log file here? If the log file is too big, you can compress it to a zip file.

EmirioBomb commented 3 years ago

Thank you for your detailed bug report and I apologise for the late reply.

Looks like the problematic usm has two videos, one for color and one for alpha transparency, so it may be the reason why extraction failed. Can you run wannacri probeusm /path/to/problematic/usm and send the log file here? If the log file is too big, you can compress it to a zip file.

I'm glad to hear back from you , this is the log file , thanks for your works usm.log

donmai-me commented 3 years ago

It seems like usm has an unknown chunk signature for chunks related to videos with alpha transparency. I'll modify the program to get more information. I'll have to let you probe the usm again if you're ok with it.

EmirioBomb commented 3 years ago

It seems like usm has an unknown chunk signature for chunks related to videos with alpha transparency. I'll modify the program to get more information. I'll have to let you probe the usm again if you're ok with it.

yeah, sure, why not. thanks for your good work!

donmai-me commented 2 years ago

Sorry for the huge delay. Version 0.2.3 should log unknown USM chunks now. Could you update to the latest version, run wannacri probeusm USMFILEHERE , and upload the logs here? If the file size is too large, then zipping it should make it significantly smaller.

Thank you.

EmirioBomb commented 2 years ago

thx man @donmai-me , I'm so glad to hear from you with good news. I test the new version of wannacri-0.2.4

1. Log file

EMB_AST.usm_Bu2.log

2. Command Line

q6guAU.md.png

3. Test file

EMB_AST.usm

4. Suggestion

maybe, you can get log info with this file by yourself. I think it will be more helpful ^_^, thanks for you hard work!

donmai-me commented 2 years ago

Sorry, I messed up again in logging the usm. I don't want to bother you upgrading to the latest version and doing a probe again.

So I've requested permission to the google drive link you've shared. Username of the email address that I've used is just donmai

donmai-me commented 2 years ago

From the limited logs and your screenshots, your usm seems to have two videos inside. One is an alpha transparency which may be stored in chunks with a different chunk signature as @SFV

EmirioBomb commented 2 years ago

Sorry, I messed up again in logging the usm. I don't want to bother you upgrading to the latest version and doing a probe again.

So I've requested permission to the google drive link you've shared. Username of the email address that I've used is just donmai

I'm so sorry with my mistake that I've never shared the link.

1. no alpha

>And now, I found some other samples has no parts like _MV_LOC_XXX_Alpha.avi_. q2qXOP.md.png

2. vgmtoolbox

I tried to demultiplexing these files with vgmtoolbox, alpha transparency video? and chunk file were created. q2LafH.md.png

3. share link

sorry, I'm not sure whether it was gmail, I share them in public, and close them after you received. If there is anything else I can assist with, please let me know and I will be happy to help ^_^ Sample Files

donmai-me commented 2 years ago

Thanks. I've received them and have added initial support for alpha transparency chunks as of version 0.2.5. The video files seem to be encrypted so you may need to give the program the key to properly decrypt them. I'm not sure if alpha videos share the same encryption algorithm as regular videos, so you may have to check on that.

donmai-me commented 2 years ago

@EmirioBomb sorry for mentioning you but have you checked if you can export the usm files properly? The one exported by vgmtoolbox is only the RGB video and not the alpha video. Version 0.2.5 includes support for exporting alpha videos. I couldn't check if they work since they seem to be encrypted and wouldn't play.

EmirioBomb commented 2 years ago

@EmirioBomb sorry for mentioning you but have you checked if you can export the usm files properly? The one exported by vgmtoolbox is only the RGB video and not the alpha video. Version 0.2.5 includes support for exporting alpha videos. I couldn't check if they work since they seem to be encrypted and wouldn't play.

😿 I'm so so sorry for not getting back to you sooner. Thanks for your hard work on this issue, it does extract a alpha and a rgb video, but the rgb one is still encrypted as you said, unfortunately 😞 I have tried to find out the [key], but there's still no clue about it.

donmai-me commented 2 years ago

Can you tell what game is this from? So I can investigate more about it if I can.

EmirioBomb commented 2 years ago

Can you tell what game is this from? So I can investigate more about it if I can.

Tales of Arise, I foun an AES Key: 0x61FC71A1376A29598393E2BFB976B275705F460E29399CFD1F9C060C8CD6CE40 for it.

donmai-me commented 2 years ago

Thank you. USM encryption doesn't use AES encryption so don't think that key would help much. Good thing there's a demo of the game, I'll go investigate more this weekend.

HumoristReoccupy commented 8 months ago

Was this ever resolved? To my understanding, all the USM files are key encrypted. I tried my hand at finding the key and reverse engineering it myself but I'm not very experienced when dealing with Criware or UE4, so I too am in need of the key.