Skip to content

fix(remotion-composer): resolve videoSrc through resolveAsset in TalkingHead - #506

Open
sakuraozation wants to merge 1 commit into
calesthio:mainfrom
sakuraozation:fix/talkinghead-resolve-asset
Open

fix(remotion-composer): resolve videoSrc through resolveAsset in TalkingHead#506
sakuraozation wants to merge 1 commit into
calesthio:mainfrom
sakuraozation:fix/talkinghead-resolve-asset

Conversation

@sakuraozation

Copy link
Copy Markdown

Summary

TalkingHead passes videoSrc straight to OffthreadVideo, so a public/-relative path (e.g. "clips/source.mp4") fails to load at render time with a 404 from the dev server. Every other composition that accepts a video source (TitledVideo, Explainer, CinematicRenderer) already routes it through resolveAsset; this brings TalkingHead in line with them.

Related issue

None filed — happy to open one first if you prefer issue-first workflow.

Changes

  • remotion-composer/src/TalkingHead.tsx: import resolveAsset and wrap videoSrc (src={resolveAsset(videoSrc)}), matching TitledVideo.

Testing

  • bunx remotion still src/index.tsx TalkingHead out.png --props=<props with public/-relative videoSrc>: 404 (Received a status code of 404 while downloading file http://localhost:3000/<file>) before this change; renders correctly after.
  • Absolute http(s) URLs still pass through unchanged (resolveAsset is a no-op for URLs).
  • tsc --noEmit clean.
  • We run this patched composition in production for vertical (1080x1920) ad videos.

Checklist

  • The change is focused on a single logical concern.
  • I ran the relevant tests locally (make test-contracts / make test) where applicable — no TS test infra for remotion-composer; verified manually as above.
  • I updated docs/README if behavior or usage changed — no usage change (behavior now matches the documented expectation of the other compositions).
  • No unrelated files are included in the diff.

Disclosure: this patch was developed with AI assistance, then human-reviewed and verified in production use. Happy to adjust anything to match project conventions.

…ingHead

TalkingHead passes videoSrc straight to OffthreadVideo, so relative asset
paths (e.g. "clips/source.mp4" under public/) fail to load at render time.
Every other composition that accepts a video source (TitledVideo, Explainer,
CinematicRenderer) already routes it through resolveAsset; this brings
TalkingHead in line with them.

Verified by rendering the TalkingHead composition with a public/-relative
videoSrc before (load failure) and after (renders) this change.
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