lightsofapollo / x-recorder

Node based bin and library to capture X11 output

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

X-Recorder

Inspired by headless (the ruby gem) X-Recorder provides utils to start Xvfb and record (as in video recording) X11 output based on a X DISPLAY id.

Primarily designed to be used as a bin its backed by a library you can use inside other node libaries.

Install

npm install x-recorder -g

Comands

See x-recorder --help for an up to date list of sub commands.

capture

Captures output of a shell script. Will create an Xvfb instance and run your script inside it capturing the X Display via ffmpeg.

This command is useful in a CI environemnt where you want to capture the output of you test command. The exit status, stdout, stderr output will be exactaly the same as the command given in -s.

x-recorder capture -s "firefox google.com" -o $PWD/foo.mov

start-xvfb

Starts Xvfb instance finds an available DISPLAY id.

Will echo display ID back to you.

x-recorder start-xvfb

stop-xvfb

Stops Xvfb instance. Looks up its pid via /tmp/.X{ID}-lock

x-recorder stop-xvfb --display :99

start-video

Records video from an already running DISPLAY.

x-recorder start-video --display :99 --pid $PWD/video.pid --output $PWD/out.mov

stop-video

Stops video recording.

x-recorder stop-video --pid $PWD/video.pid

LICENSE

MIT - See LICENSE.md

About

Node based bin and library to capture X11 output

License:MIT License


Languages

Language:JavaScript 100.0%