antmicro / screen-recorder

A simple screen recorder using WebRTC
https://antmicro.github.io/screen-recorder/
13 stars 2 forks source link

Allow to adjust GIF framerate #1

Open mgielda opened 3 years ago

mgielda commented 3 years ago

Currently the output GIFs play back very fast, at least when I open them in the browser. We need them to keep the original speed even though we might be recording lower FPS.

efengler commented 3 years ago

Findings on GIF recorder: Framerate parameter doesn't seem to affect recording rate, only playback rate. I've recorded 10s gifs with framerates 5, 10, 50, 100, 1000, they all had similar number of frames, and the delays (!) between frames where 10, 10, 50, 100 and 1000ms respectively. So it doesn't even mean frames per second, but delay between frames in ms, with the last digit rounded.

One solution would be to somehow scale recorded gif based on the actual duration of the recording, but frames aren't recorded consistently, so the resulting gif won't be smooth.

I may also try to dig deeper into RecordRtc or even jsgif.

mgielda commented 3 years ago

Now that we use https://github.com/ffmpegwasm/ffmpeg.wasm I think we can give people choice as to framerate, will rename this issue

mgielda commented 3 years ago

This could possibly be a dropdown, perhaps only visible for the GIF option