PyCriCodecs icon indicating copy to clipboard operation
PyCriCodecs copied to clipboard

Implement more ACB, USM, CPK releated features

Open mos9527 opened this issue 3 months ago • 0 comments

ATTENTION: Massive API breaking changes ahead. Merge at discretion!

This PR introduces the following new features (excerpt from README)

NOTE: Most if not all features here are verified through offical toolings, however at limited capacity.

ACB Cue sheets (also AWB)

  • [x] Editing & Saving (Scripting APIs.)

USM Sofdec2 (Encode & Decode)

Audio Stream

  • [x] HCA
  • [x] ADX (pure ADX, WAV format not implemented)

Video Stream

NOTE: Requires on FFMpeg for extracting stream packets.

  • [x] Sofdec Prime (MPEG1, from/to .mp4 container)
  • [x] H264 (from/to.h264 raw container)
  • [x] VP9 (from/to.ivf container)

CPK

  • [x] File listing and on-demand unpacking
  • [x] MP support for compression
  • [x] Progress callback

API changes

Most of the extraction APIs that rely on OS-level file APIs have been refactored to either output bytes or to singular files, respectively mapping to builder's build() -> bytes functions, and sometimes (i.e. with CPK) a save(filename) functions.

Moreover, higher level abstractions (e.g. UTFViewer) are sparingly used to simplify some of the processes. Refer to examples in Tests from the fork for more details.

Various other quality-of-life changes plus changes to internals (e.g. UTF tables) shall be omitted here for the sake of brevity.

Credits

This PR also incorporates two of @Mikewando's fixes, which effectively supercedes these two PRs

  • https://github.com/Youjose/PyCriCodecs/pull/16
  • https://github.com/Youjose/PyCriCodecs/pull/15

Addendum

The fork's development continues at https://github.com/mos9527/PyCriCodecsEx, which will also be available at PyPI for easier consumption.

mos9527 avatar Aug 12 '25 07:08 mos9527