Closed DannyBen closed 2 years ago
@DannyBen what machine, distribution, and specs are you running on? Also, when running VHS do you have other applications open. I'm wondering if an OOM is being caused.
I am running on a vagrant box virtual machine, running Ubuntu with 2gb memory allocated on Intel i7. Nothing is running when vhs is running. I do not expect it to require that much memory...
I believe it does require a bit more memory, VHS runs an xterm.js terminal to render the terminal and captures frames every few milliseconds and then has to process all those frames.
If you want VHS to use less memory, you can make the frame sizes smaller by reducing the terminal size (also reduce the font size, to keep a similar ratio), or like you have seen reduce the number of frames captured by reducing the running time of the GIF or reducing the framerate.
Set Width 600
Set Height 300
Set FontSize 14
We will definitely try to make much more performance optimizations in the future so VHS can run smoothly with less memory but for now it is a little intensive since it requires launching a terminal and rendering a massive amount of frames to compile the video.
@DannyBen Another thing you can try is outputting the frames without using ffmpeg.
Output frames/
Thanks, but for me all this nullifies the advantages of VHS over the "regular" terminal recorders. I will unfortunately have to wait for an optimized version, if it ever arrives.
Totally understood! Performance optimization is quite important to us (See https://github.com/charmbracelet/vhs/pull/21), so hopefully we will improve this sooner rather than later! Thanks for leaving your feedback ❤️
When I started trying a script that is a little longer than the "Hello world" scripts, I am getting an ffmpeg failure.
This script:
fails with this stdout/stderr:
Note that the same script works if you remove the last
Sleep
, and also this very same script occasionally works for me. The little information I could find hints that it might be something to do with an attempt to render real time where it is not necessary.Also, reducing framerate to 20 helps, but then it only delays the error which occurs again when continuing to create a longer script.