Comments (10)
Ok, I finally figured out my mistake in extracting, it's my bad coding skills! It's now fixed I will upload shortly, this should also fix the wrong HCA extracting as well, or I hope so, tell me how it goes.
I also fixed a fatal error with ADX decoding, since I misunderstood some parts of the codec, now you can decode the audio normally in PyCriCodecs, however you will have to reinstall again like last time, since it's reliant on the C-extension. and again, tell me how it goes!
from pycricodecs.
Can you send the USM on this one, I checked some files and it doesn't have any problem with them, also can you send the script you used on how to extract these ADX's? I would appreciate it a lot.
from pycricodecs.
Here's the USM.
Here's what I used to decode the adx:
from PyCriCodecs import *
AdxObj = ADX("Summary_p02.wav.adx")
wavfilebytes = AdxObj.decode()
with open("test.wav", 'wb') as f:
f.write(wavfilebytes)
For extracting the USM, I just used the first 4 lines of the example code.
from pycricodecs.
I tried the new version.
The extracted adx file no longer combines both audio tracks, but I still can't get a usable file with ADX decoding.
HCA decoding also seems to still say the HCA is invalid.
from pycricodecs.
Hmm, that's weird, I did test it right now and before, the ADX decoding should work. Did you make sure to uninstall with pip uninstall PyCriCodecs
? and then reinstall again from the new source code in the repo. For me it's working with playable audio.
Used this sample code on the provided USM.
from PyCriCodecs import *
import os
usmObj = USM("p02_000.usm")
usmObj.extract()
dir = os.listdir()
for i in dir:
if i.startswith("Summary_p02") and i.endswith(".wav"):
adxObj = ADX(i)
wavbytes = adxObj.decode()
open(i + "_decoded.wav", "wb").write(wavbytes)
As for the HCA, can you send me that USM file that contain it if you may? I will need to inspect it as well, I checked some other USMs in moviesd_dlc.par
and they are working just as fine.
from pycricodecs.
Okay, so I have no idea what issue I had with adx files before, now it works. Odd, but that's good at least.
Here's an usm that I had issues with, Lost Judgment OP (a01_065.usm) from the PS4 version.
from pycricodecs.
ahh, okay saw my error on HCA, just recently I added support for encrypting and decrypting HCA's and the configuration would make the stream seek to a different offset, which will not pass the correct file to the C-extension, so again, a feature I added without proper testing.
This should be now fixed in the recent change, and will decode HCA's just fine.
With those, hopefully both issue will be resolved! Thanks a lot for reporting these two in, if there's any more or any question about the lib, I will be happy to help! Tell me how it goes.
from pycricodecs.
Thanks, it seems to work fine now.
I do have a question regarding USMs. Would it be possible to replace/add an audio track without reencoding the USM? (I do realize that the library doesn't currently support making new USM files)
I wanted to do this for a mod I did for Judgment, but couldn't figure how to with the existing tools that I could find, so I had to reencode the video, which did result in slightly worse video quality.
from pycricodecs.
Would it be possible to replace/add an audio track without reencoding the USM?
For sure, replacing the audio is definitely possible given specific sample rates. You won't need to extract the SFV chunks (video data) and only just remove SFA chunks (audio data) where it existed to overwrite it with the new audio data.
So there will be no need to reencode the video, it will just require parsing the USM file. I do plan on doing this somewhere in the future with the rest of codecs, but we'll see till then.
from pycricodecs.
Would it be possible to replace/add an audio track without reencoding the USM?
For sure, replacing the audio is definitely possible given specific sample rates. You won't need to extract the SFV chunks (video data) and only just remove SFA chunks (audio data) where it existed to overwrite it with the new audio data. So there will be no need to reencode the video, it will just require parsing the USM file. I do plan on doing this somewhere in the future with the rest of codecs, but we'll see till then.
I see. Being able to do that would be nice. I have pretty much identical audio tracks, just different voice actor. (Judgment Pierre Taki for Hamura voice and the new voice)
from pycricodecs.
Related Issues (9)
- ModuleNotFoundError: No module named 'CriCodecs' HOT 2
- Extracted HCA from USM can't be decoded HOT 2
- Installation issues over PIP HOT 6
- Asking for DM
- Having trouble with a cpk file from a 3DS game HOT 4
- Readme says usmObj should have a method called parse when it does not HOT 2
- trouble with a .awb file HOT 2
- Doesn't compatible on linux aarch64 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pycricodecs.