trufo-py v2.4.0 adds first-class media transform actions to the C2PA Signing API, upgrades transcode with codec and quality controls, introduces management organizations for multi-org teams, and adds ANI format support.
Media Actions: Resize, Crop, Trim, and Repackage
Four new media actions let your pipeline transform an asset and record the corresponding C2PA action in a single signing call:
resize(TrufoAction.RESIZE): Proportionally resizes an image or video to a target width, height, or both, as displayed, and recordsc2pa.resized.proportional.crop(TrufoAction.CROP): Keeps a specified rectangle of an image or video frame, as displayed, and recordsc2pa.cropped.trim(TrufoAction.TRIM): Keeps an exact time span of audio or video and recordsc2pa.trimmed.repackage(TrufoAction.REPACKAGE): Moves a video’s streams into MP4 or MOV without re-encoding them and recordsc2pa.repackaged. Liketranscode, it cannot be combined with a request that signs the file as newly created.
See Actions and Assertions and Media Formats for per-format support.
Smarter transcode & Watermark Ordering
- Codec and Quality Parameters:
transcodenow acceptsquality,video_codec,audio_codec,crf, andaudio_bitrate. When the input format is already a supported target,target_mime_typecan be omitted to apply encoding settings in place. - Higher Defaults & Stream Copying: Default quality for JPEG, WebP, and AVIF is now 90 (up from 75/80/75); AAC and MP3 default to 192 kbit/s; WAV preserves 16-, 24-, or 32-bit depth (8-bit converts to 16-bit). Streams that already match the target are copied without re-encoding, recording
c2pa.repackagedwhen nothing was re-encoded and leaving already-matching files untouched. - Metadata Preservation & Warnings:
transcodepreserves color profiles, EXIF, XMP, resolution, comments, and all streams supported by the output container, emitting an explicit response warning naming any metadata the target container could not retain. - Watermark Ordering:
watermarkis now evaluated against the post-transcode or post-repackage target type (so an AVI transcoded or repackaged to MP4 can be watermarked in the same call). If a media action runs after a watermark was embedded, the API emits a warning — place thewatermarkaction last.
Management Organizations
Management organizations let multi-team and enterprise accounts centralize billing and people management across sub-organizations. The owner of an existing standalone organization can create a management organization while retaining their existing organization as the first sub-organization — keeping all members, API keys, and signing history intact. See Trufo Account Setup.
ANI Format Support & Validation Tightening
- ANI Animated Cursors: C2PA signing and validation now support ANI (
application/x-navi-animation). - Stricter Parameter & Policy Checks: Unknown or incompatible action parameters now return
400 InvalidActionParameterinstead of being silently ignored.transcoderejects lossy alpha drops (such as transparent images to JPEG) and undocumented targets (image/jxl,image/x-adobe-dnghave been removed). ai_system&parentOfConsistency: Undersigned_input_policy="auto", requests carryingai_systemon a camera-captured or human-created C2PA input now consistently return400regardless of actions; omitai_systemor setsigned_input_policy="keep"when intentionally processing those files. Settingmanifest_settings.all_actions_included=trueon aparentOfingredient withoutaction_historynow returns400.
Upgrading Local Mode
Local mode extras in v2.4 require trufo-provenance 2.4.x (pip install --upgrade 'trufo[local-full]>=2.4,<2.5') or the ghcr.io/trufo-ai/trufo-local:2.4 (2.4-full for watermarking) Docker image. Requests using the new media actions or transcode parameters against an older local engine return 400 UnsupportedSDKVersion.
If you watermark HEIC, HEIF, or AVIF locally with trufo[local-full], ensure heif-enc 1.20.0 or newer (with its HEVC and AV1 encoder plugins) is installed. See Local Signing with Python and Local Signing with Docker.