donmai-me / WannaCRI

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

fmtver - Is it important? #11

Closed zemmyang closed 1 year ago

zemmyang commented 1 year ago

I'm working on a reader for the USM files used in Deus Ex Human Revolution, but I kept giving me an error with the format version of the @SFV chunks

I commented out https://github.com/donmai-me/WannaCRI/blob/master/wannacri/usm/usm.py#L187 and https://github.com/donmai-me/WannaCRI/blob/master/wannacri/usm/usm.py#L251 and I got the demuxed video and audio just fine, so I'm wondering if it's important to check for the fmtver key at all.

BTW, I also had to add

        SUBTITLE = bytearray("@SBT", "UTF-8")
        CUE = bytearray("@CUE", "UTF-8")

to the ChunkType enum

donmai-me commented 1 year ago

It's just metadata so it's not really needed. I should have done checks if getting the value of a key returns None. Since it's a western game, I'd assume the usm is made from Scaleform's encoder. Also yes I'd need to add the other chunktypes. Thank you for pointing that out.

donmai-me commented 1 year ago

Should be fixed in commit 38e883b let me know if I missed anything

zemmyang commented 1 year ago

this line still threw me an error: https://github.com/donmai-me/WannaCRI/blob/master/wannacri/usm/usm.py#L272

but that should be it

donmai-me commented 1 year ago

Missed that one, should be fixed in the latest commit. Thanks for the heads up.

zemmyang commented 1 year ago

just tested - works now. thanks!