Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remotion: new onVideoFrame callback allowing an OffthreadVideo to be drawn to a canvas #4147

Merged
merged 6 commits into from
Aug 2, 2024

Conversation

JonnyBurger
Copy link
Member

@JonnyBurger JonnyBurger commented Aug 2, 2024

How to draw OffthreadVideo to canvas: https://www.remotion.dev/docs/video-manipulation

Copy link

vercel bot commented Aug 2, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
bugs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 11:39am
remotion ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 2, 2024 11:39am

@JonnyBurger JonnyBurger marked this pull request as ready for review August 2, 2024 11:34
@JonnyBurger JonnyBurger enabled auto-merge August 2, 2024 11:34
@JonnyBurger JonnyBurger merged commit b6c5628 into main Aug 2, 2024
13 checks passed
@JonnyBurger JonnyBurger deleted the draw-offthreadvideo-to-canvas branch August 2, 2024 11:42
<OffthreadVideo
onVideoFrame={onVideoFrame}
style={{opacity: 0}}
startFrom={300}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works nicely if startFrom > 0. Consider a situation when startFrom=0 and there are multiple sequences and generating video using Lambda.
if startFrom=0, generally canvas sync will show blankscreen, since the video is not started. To remediate we have to offset 0th second to 0.1 frame to show the initial start screen to sync with canvas and avoid having the empty screen.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@khanzzirfan It has nothing to do with startFrom, it works with any value.

I only put 300 as value because the video starts with a black frame.

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.

Issue with flickering videos generated by Lambda, seeking Ref access for better synchronization.
2 participants