vhs icon indicating copy to clipboard operation
vhs copied to clipboard

Screenshot isn't always produced when it's the last command

Open louis-thevenet opened this issue 1 year ago • 2 comments

Describe the bug When nothing comes after a Screenshot, vhs seems to skip it sometimes.

You can see at 0:14, the second.png was not created.

https://github.com/user-attachments/assets/7575257b-f9cb-4527-9b7d-f213be6650a2

Setup

  • vhs 0.8.0 from nixpkgs
  • Zsh, Kitty, NixOS

To Reproduce Run this multiple times:

Type "echo some text"
Screenshot first.png
Type "echo some other text"
Screenshot second.png
# Type "end" # If you add a command after, it seems to work everytime

louis-thevenet avatar Nov 01 '24 08:11 louis-thevenet

I'm seeing something similar. This is repro helped me and I see another example:

# <...beginning of tape>
Screenshot foo.png
Hide
Type "q"
# <eof>

With that sequence , no screenshot is written. With the Hide removed or moved after the Type, the Screenshot is captured.

neomantra avatar Dec 14 '24 21:12 neomantra

I've seen this a few times too. I generally workaround it by adding a sleep command after the screenshot if needed. The problem seems like that the screenshot only gets recorded if there's a frame recorded at that same moment, so making sure that actually happens fixes this.

joshka avatar Jul 08 '25 01:07 joshka