vhs icon indicating copy to clipboard operation
vhs copied to clipboard

VHS freezes on Windows cmd

Open SickleFire opened this issue 6 months ago • 7 comments

Describe the bug VHS freezes and unresponsive. when I enter:

vhs demo.tape

I tried it on Powershell and CMD. see screenshot below.

Setup

  • Windows 11
  • CMD / PS

To Reproduce Steps to reproduce the behavior:

  1. open cmd
  2. vhs demo.tape

Source Code

demo.tape:

# Where should we write the GIF?
Output demo.gif

# Set up a 1200x600 terminal with 46px font.
Set FontSize 46
Set Width 1200
Set Height 600

# Type a command in the terminal.
Type "echo 'Welcome to VHS!'"

# Pause for dramatic effect...
Sleep 500ms

# Run the command by pressing enter.
Enter

# Admire the output for a bit.
Sleep 5s

Expected behavior an output of demo.gif

Screenshots

Image

Additional context ffmpeg version 8.1.1-full_build-www.gyan.dev Copyright (c) 2000-2026 the FFmpeg developers ttyd version 1.7.7-40e79c7 vhs version v0.11.0 (c6af91a)

it just freezes and unresponsive. still no output while writing this issue

I hope someone can help me. and point out what I did wrong.

SickleFire avatar May 18 '26 12:05 SickleFire

I have the same issue , with vhs version v0.11.0, when I check the task manager found 6 chrome processes start running but with 0% cpu (hang) , at the same time about 6 processes for google updater run for few minutes and then stops, but the chrome process still there till I force kill it, the issue seems to be with chrome, but not sure.

hossam-houssien avatar May 31 '26 11:05 hossam-houssien

Same issue on native Windows 11 with:

  • VHS v0.11.0
  • ttyd 1.7.7-40e79c7
  • PowerShell 7
  • Google Chrome 150.0.7871.129

Minimal tape:

Require pwsh

Output smoke.gif

Set Shell "pwsh"
Set Width 800
Set Height 450
Set FontSize 24

Sleep 2s
Type "Write-Host 'VHS works' -ForegroundColor Green"
Enter
Sleep 3s

VHS prints the parsed tape configuration and then hangs indefinitely without producing smoke.gif.

I tested the components separately:

  • ttyd serving PowerShell works and returns HTTP 200.
  • The exact ttyd arguments used by VHS also work.
  • Chrome headless works independently and exits successfully.
  • Chrome can open the ttyd page and save a screenshot successfully.
  • During the stuck VHS run, VHS successfully launches Chrome with --remote-debugging-port=0, but tape execution never begins.
  • The same smoke tape works successfully through VHS inside WSL2.

Looks like an issue in VHS/go-rod initialization or browser control.

pcordon avatar Jul 21 '26 11:07 pcordon

hey @SickleFire and everyone!

Can you,please, provide winver build number and the output of running ttyd -p 7654 --debug 7 cmd manually.

andrinoff avatar Aug 13 '26 10:08 andrinoff

winver: 26200.9168 ttyd:

[2026/08/13 23:16:09:0753] N: ttyd 1.7.7-40e79c7 (libwebsockets 4.3.3-unknown)
[2026/08/13 23:16:09:0773] N: tty configuration:
[2026/08/13 23:16:09:0784] N:   start command: cmd
[2026/08/13 23:16:09:0794] N:   close signal: SIGHUP (1)
[2026/08/13 23:16:09:0814] N:   terminal type: xterm-256color
[2026/08/13 23:16:09:0824] N: The --writable option is not set, will start in readonly mode
[2026/08/13 23:16:09:0846] N: lws_create_context: LWS: 4.3.3-unknown, MbedTLS-2.28.5 NET SRV H1 H2 WS ConMon IPV6-off
[2026/08/13 23:16:09:0902] N: elops_init_pt_uv:  Using foreign event loop...
[2026/08/13 23:16:09:0925] N: __lws_lc_tag:  ++ [wsi|0|pipe] (1)
[2026/08/13 23:16:09:0970] N: __lws_lc_tag:  ++ [vh|0|default||7654] (1)
[2026/08/13 23:16:09:0990] N: [vh|0|default||7654]: lws_socket_bind: source ads 0.0.0.0
[2026/08/13 23:16:09:1000] N: __lws_lc_tag:  ++ [wsi|1|listen|default||7654] (2)
[2026/08/13 23:16:09:1025] N:  Listening on port: 7654

SickleFire avatar Aug 13 '26 15:08 SickleFire

I'm having the same issue on my Windows VM.

winver: 26100.8875

ttyd:

[2026/08/30 21:19:17:7930] N: ttyd 1.7.7-40e79c7 (libwebsockets 4.3.3-unknown)
[2026/08/30 21:19:17:7989] N: tty configuration:
[2026/08/30 21:19:17:8020] N:   start command: cmd
[2026/08/30 21:19:17:8060] N:   close signal: SIGHUP (1)
[2026/08/30 21:19:17:8101] N:   terminal type: xterm-256color
[2026/08/30 21:19:17:8165] N: The --writable option is not set, will start in readonly mode
[2026/08/30 21:19:17:8226] N: lws_create_context: LWS: 4.3.3-unknown, MbedTLS-2.28.5 NET SRV H1 H2 WS ConMon IPV6-off
[2026/08/30 21:19:17:8342] N: elops_init_pt_uv:  Using foreign event loop...
[2026/08/30 21:19:17:8383] N: __lws_lc_tag:  ++ [wsi|0|pipe] (1)
[2026/08/30 21:19:17:8481] N: __lws_lc_tag:  ++ [vh|0|default||7654] (1)
[2026/08/30 21:19:17:8521] N: [vh|0|default||7654]: lws_socket_bind: source ads 0.0.0.0
[2026/08/30 21:19:17:8582] N: __lws_lc_tag:  ++ [wsi|1|listen|default||7654] (2)
[2026/08/30 21:19:17:8662] N:  Listening on port: 7654

I did see a Windows Firewall Allow/Deny box on one run, so maybe there's some trouble there.

brianary avatar Sep 01 '26 01:09 brianary

Oh, sorry guys, haven't seen your replies. I'll look into this now, thank you!

andrinoff avatar Sep 01 '26 06:09 andrinoff

@SickleFire @brianary, please check https://github.com/charmbracelet/vhs/pull/781!

andrinoff avatar Sep 01 '26 07:09 andrinoff