Skip to content

[Feature]: Freeze frame regions on the timeline #920

Description

@56steve

Search existing issues

  • I have searched the existing issues

Is your feature request related to a problem?

I record a lot of tutorials and product demos with Recordly, and pretty often I want to hold a single frame on screen for a few seconds. Maybe there's a dialog people need time to read, or I want to talk over a result before moving on.

Right now there's no way to do that in the editor. Speed regions only go down to 0.25x, and pause/resume only works while recording. So I end up exporting and adding the freeze in another editor, which kind of defeats the point.

Describe the solution you'd like

A "Freeze" region on the timeline that works a lot like speed regions. You drop it at a point in the video, set how long it should last (say 3 seconds), and both the preview and the export hold that frame for that long. After that, playback picks up right where it stopped.

Here's how I'd expect it to behave, but I'm happy to change any of this:

  • The freeze adds time to the video. It doesn't cover up footage that's already there.
  • Audio goes silent during the freeze and continues normally afterward.
  • Cursor, zoom and webcam stay still along with the frame.
  • Any captions after the freeze get pushed back by the frozen time.

How I'd build it

I spent some time going through the code. Since speed regions already change the length of the timeline, I think freeze regions can follow mostly the same path:

  • types.ts, useTimelineState.ts, editorHistory.ts: new FreezeRegion type, plus state and undo/redo
  • TimelineEditor.tsx: adding, dragging and resizing freeze regions
  • useTimelineProjection.ts: include freeze time in the timeline mapping so preview and export line up
  • VideoPlayback.tsx, videoEventHandlers.ts, useAudioPreviewSync.ts: hold the video and mute audio in the preview
  • streamingDecoder.ts, editedTrackStrategy.ts, audioEncoder.ts: handle freeze time and silence in MP4 and GIF exports
  • projectPersistence.ts: save and load freeze regions without breaking older projects
  • Tests for the time mapping and for opening older projects

These are the main spots I found. There will probably be a few more once I actually get into it.

I'd like to build this and send a PR. Would you be open to that? And does the behavior above sound right to you? I'd rather sort that out before I start. I also noticed #854, #855 and #643 touch the same area, so I'll keep an eye on those so we don't step on each other.

Describe alternatives you've considered

  • Adding a 0x option to speed regions. It would reuse existing code, but it can't make the video longer, and a speed of 0 would break anything that divides by speed.
  • Doing the freeze in another video editor after export. It works, but it means leaving Recordly just for this one thing.

Additional context

No response

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions