Skip to content

feat: transcode WXGF image attachments#103

Open
richardzone wants to merge 1 commit into
jackwener:mainfrom
richardzone:codex/wxgf-hevc-extract-upstream
Open

feat: transcode WXGF image attachments#103
richardzone wants to merge 1 commit into
jackwener:mainfrom
richardzone:codex/wxgf-hevc-extract-upstream

Conversation

@richardzone

Copy link
Copy Markdown

What changed

  • Adds a WXGF/WXAM helper that finds the largest HEVC partition in WeChat 4 image containers.
  • Makes wx extract automatically transcode decoded WXGF/HEVC images to JPG through ffmpeg.
  • Adds wx extract --raw for callers that need to keep the decoded WXGF/HEVC container.
  • Documents the WeChat cache behavior where unopened images may only have _t.dat thumbnails locally.

Why

WeChat 4 can store image attachments as private wxgf containers. wx extract could decrypt the .dat file but still write a container that normal image viewers and OCR tools could not read. This keeps normal image outputs usable by default while preserving a raw escape hatch.

Implementation notes

  • No Python or native image decoder dependency is added.
  • WXGF parsing is done in Rust.
  • ffmpeg is invoked through temp input/output files instead of stdin/stdout pipes to avoid pipe backpressure or orphaned child process issues.
  • WX_FFMPEG can override the ffmpeg path.

Validation

  • Subagent code review performed; pipe/backpressure and partition length concerns were addressed.
  • cargo check --locked
  • cargo test --locked

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant