Skip to content

fix(producer): derive segmented capture container extension from output format - #6878

Open
DaKaufeeBoii wants to merge 1 commit into
heygen-com:mainfrom
DaKaufeeBoii:fix/segmented-capture-mov-format
Open

DaKaufeeBoii wants to merge 1 commit into
heygen-com:mainfrom
DaKaufeeBoii:fix/segmented-capture-mov-format

Conversation

@DaKaufeeBoii

Copy link
Copy Markdown

Summary

Fixes #6481

When rendering with segmented capture (HF_SEGMENTED_CAPTURE=true or long durations) targeting --format mov (ProRes 4444 / alpha), the first segment encode fails because segmentOutputPath hardcoded .mp4, causing FFmpeg to reject ProRes in an MP4 container (Could not find tag for codec prores ... codec not currently supported in container).

Changes

  • Updated segmentOutputPath in packages/producer/src/services/render/stages/captureSegmentedStage.ts to accept an optional container extension (defaulting to "mp4").
  • Added helper to derive the segment file extension from input.videoOnlyPath or input.outputFormat.
  • Threaded segmentExtension into SegmentRun and SegmentCaptureContext so individual segment outputs and final concatenation maintain matching container extensions (.mov for MOV/ProRes, .mp4 for MP4).
  • Added unit tests in packages/producer/src/services/render/stages/captureSegmentedStage.test.ts verifying segmentOutputPath with custom extensions and asserting that --format mov segmented runs spawn encoders and concat with .mov segment paths.

Verification

  • Unit tests in captureSegmentedStage.test.ts pass cleanly.
  • Code complies with strict type-safety conventions (zero ! non-null assertions, zero any).

…ut format

Pass container extension to segmentOutputPath based on videoOnlyPath
or outputFormat so segmented renders targeting MOV/ProRes do not fail
due to hardcoded .mp4 segment filenames.

Fixes heygen-com#6481

This branch has not been deployed

No deployments
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.

Segmented capture always fails with --format mov

1 participant