# Screen Recording Lags

**URL:** <https://discourse.processing.org/t/screen-recording-lags/22648>\
**Category:** Processing\
**Created:** [July 16, 2020, 1:54am UTC](https://discourse.processing.org/t/screen-recording-lags/22648 "2020-07-16T01:54:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![CosmicCrowMC](https://avatars.discourse-cdn.com/v4/letter/c/ba8739/32.png) [@CosmicCrowMC](https://discourse.processing.org/u/CosmicCrowMC)\
**Post date:** [July 16, 2020, 1:54am UTC](https://discourse.processing.org/t/screen-recording-lags/22648/1 "2020-07-16T01:54:38Z")

</div>

I’ve been using Processing for a couple of years now, and I’ve really enjoyed all the things I’ve learned along the way. Every now and then, I’ll want to show one of my projects to a friend or post about it online. I’ll open up OBS (Open Broadcasting Software), set it up to record my sketch, open the program, and… be faced with severe lag. No matter the size of the program, the frame rate will suffer greatly (About 10 FPS on average). I’ve tried other methods of screen capture with various programs and have gotten the same results. That being said, I’ve noticed something: If I record my whole screen, the sketch runs just fine. It’s only when I try to record the sketch window itself that things get messed up. I’m not well-versed in how PApplets, windows, etc. work, so I was wondering if there was a way I could boost the framerate when capturing the program? I usually use either P2D or P3D with very limited use of PGraphics (haven’t gotten around to learning that stuff yet… that’s a future endeavor!), so efficiency MAY be an issue, however, again: this will happen with even the smallest of sketches. Anyone know a possible solution?

---

<div class="post-metadata">

**Author:** ![gudmundursteinn](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gudmundursteinn/32/3863_2.png) [@gudmundursteinn](https://discourse.processing.org/u/gudmundursteinn)\
**Post date:** [July 16, 2020, 9:29pm UTC](https://discourse.processing.org/t/screen-recording-lags/22648/2 "2020-07-16T21:29:44Z")

</div>

Yes, the only solution is - use Hamoid’s Video Export Library. It requires an additional installation of FFMPEG which can be complicated but can be done using brew (on a mac that is). I had the same issue for a long time, but this library works, although I’ve had framedrops if I’m driving it hard but on a good day it acutally looks better than the “original” real-time java window.

That’s my experience.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [July 18, 2020, 1:06pm UTC](https://discourse.processing.org/t/screen-recording-lags/22648/3 "2020-07-18T13:06:12Z")

</div>

Hello,

I use the Processing Movie Maker:

> **[Tools](https://processing.org/reference/tools/)**
>
> The following tools are included with the Processing software. Select the tool you want to use from the Tools menu of the Processing Environment. These tools are open source; the code is distributed w…

See the tools menu in the Processing PDE.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/2X/4/4c1b5d214c4ac9a6857c1cac0dbb733142448c27.png)

And make a movie (rendering) of sequential frames:

> **[saveFrame() / Reference](https://processing.org/reference/saveFrame_.html)**
>
> Saves a numbered sequence of images, one image each time the function is run. To save an image that is identical to the display window, run the function at the end of draw() or within mouse and…

Make sure to add control to the saving of frames otherwise you are saving a lot of images every time you run the code.

A couple of references:

- [Making Videos from Processing Sketches · Sighack](https://sighack.com/post/make-videos-from-processing-sketches)
- [25 life-saving tips for Processing | Amnon P5 - Experiments with Processing by Amnon Owed](https://amnonp5.wordpress.com/2012/01/28/25-life-saving-tips-for-processing/)  
See tip #7.
- [Creating Animated GIFs in Processing](https://discourse.processing.org/t/creating-animated-gifs-in-processing/12386)  
If you want to create animated gifs.

There are many more!

When I do _screen capture_ I make sure to get past the “hiccups” before I capture my sketches:

> [@FrameRate hiccups](https://discourse.processing.org/t/framerate-hiccups/11947/8):
>
> I threw together some code to visualize the hiccups; they are within the first 15 seconds (repeatable) and after that it is a rock solid 59 to 60 fps (green). The bottom row is first 15 seconds (up to vertical line) and then it keeps plotting framerate and moves up a row at a time: The glitch on top row is when I used “Snipping Tool”. I went through many of my apps to see what cause hiccups (frame rate drops) and was very surprised! Some had no impact and others significant. I’ll …

Also make sure other things are not running in background that may impact frame rate if doing a _screen capture_.  
Starting Chrome always impacts the frame rate for me as well as some other applications.

`:)`

---

<div class="post-metadata">

**Author:** ![SantosCuccia](https://avatars.discourse-cdn.com/v4/letter/s/aeb1de/32.png) [@SantosCuccia](https://discourse.processing.org/u/SantosCuccia)\
**Post date:** [April 6, 2022, 1:00pm UTC](https://discourse.processing.org/t/screen-recording-lags/22648/4 "2022-04-06T13:00:01Z")

</div>

I think you can consider changing a monitor. Maybe you can try TFT LCD. I’ve used it before. It’s really an excellent monitor [www.stoneitech.com](https://www.stoneitech.com)
