chrome.tabCapture pipeline used for recording, so the stream survives page navigation. The relay pipes each capture chunk to an ffmpeg process that re-encodes in real time and pushes to your destinations.ffmpeg installed and on PATHplaywriter browser start for automated flows, or click the Playwriter extension icon on the tab oncechrome.tabCapture)activeTab model requires a user gesture: you must click the Playwriter extension icon on the tab before it can be captured, and the grant is per tab — streaming a different tab needs another click on that tab. This is a Chrome platform restriction, not a Playwriter one. For fully automated flows, launch a managed browser with playwriter browser start, which auto-accepts tab capture without any click.tabCapture streams, and each stream costs a full real-time encode. Test with your setup before relying on it for production multi-streaming; prefer the tee muxer (repeat --rtmp) when you want the same tab on several platforms — that's one capture and one encode.12playwriter -s 1 -e "await page.goto('https://my-generated-content.example')" playwriter stream start -s 1 --rtmp rtmp://va.pscp.tv:80/x/<stream-key>
--rtmp (uses ffmpeg's tee muxer, one encode for all destinations; a dead endpoint doesn't kill the others):123playwriter stream start -s 1 \ --rtmp rtmp://va.pscp.tv:80/x/<x-stream-key> \ --rtmp rtmp://live.twitch.tv/app/<twitch-stream-key>
12345# Uptime, encoder fps, output bitrate, dropped frames playwriter stream status -s 1 # Graceful stop: flushes the encoder and waits for ffmpeg to exit playwriter stream stop -s 1
| Flag | Default | Description |
--rtmp <url> | required | RTMP destination with stream key, repeatable |
--resolution <WxH> | 1920x1080 | Output resolution, ffmpeg scales the capture |
--fps <n> | 30 | Output frame rate |
--video-bitrate <kbps> | 9000 | X Live recommended; Twitch max is 6000 |
--keyframe-interval <s> | 3 | X Live recommended (and max); Twitch recommends 2 |
--audio-bitrate <kbps> | 128 | AAC 44100Hz stereo |
--no-audio | off | Skip tab audio, injects a silent track (X Live requires an audio track) |
--preset <name> | veryfast | x264 preset, only applies to libx264 |
--codec <name> | auto | Auto-detects hardware encoders (videotoolbox, nvenc, qsv), falls back to libx264 |
--video-bitrate 6000 --keyframe-interval 2.execute code:123456789101112await stream.start({ rtmpUrls: ['rtmp://va.pscp.tv:80/x/STREAM_KEY'], resolution: '1920x1080', fps: 30, videoBitrateKbps: 9000, }) await stream.status() // => { streaming, startedAt, destinations, stats: { ffmpegFps, ffmpegBitrateKbps, droppedFrames, ... } } await stream.stop() // => { duration, bytesReceived }
rtmp://host/…).recording.* | stream.* | |
| Output | MP4 file on disk | RTMP endpoints |
| Duration | auto-stops after 15 min | unlimited, runs after CLI exits |
| Encoding | in-browser MediaRecorder | ffmpeg re-encode (CBR, fixed GOP) |
| Same tab at once | one capture per tab — a tab can be recorded or streamed, not both |