blob: 0c6084e39b4defc013bf837928276fdc7cc17cea (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
.TH GSR\-CLI 1 "2026-08-02" "5.15.3" "GPU Screen Recorder CLI Manual"
.SH NAME
gsr\-cli \- Control a running GPU Screen Recorder instance
.SH SYNOPSIS
.B gsr\-cli
.B \-ipc
.I socket_path
.I command
.RI [ command_argument ]
.PP
.B gsr\-cli
.B \-h
|
.B \-\-help
.SH DESCRIPTION
.B gsr\-cli
sends a command to a
.BR gpu\-screen\-recorder (1)
instance that was started with the
.B \-ipc
option and reports the reply. This gives the same control as sending signals to GPU Screen Recorder,
except that a replay can be saved with an arbitrary number of seconds and that the result of the
command is known instead of being sent blindly.
.PP
.B gsr\-cli
exits with 0 when the command succeeded and 1 when it failed. When a command fails the reason
is printed to stderr.
.SH OPTIONS
.TP
.BI \-ipc " socket_path"
The unix domain socket that GPU Screen Recorder was started with. Required.
.SH COMMANDS
.TP
.B status
Check if a GPU Screen Recorder instance is listening on the socket, which is done by connecting
to the socket without sending a command. Prints
.B running
or
.B "not running"
and exits with 0 when it's running. A socket file that was left behind by a GPU Screen Recorder
instance that was killed counts as not running.
.TP
.B stop
Stop and save recording (stop without save in replay mode).
.TP
.B toggle-pause
Pause/unpause recording (not for streaming/replay).
.TP
.B toggle-replay-recording
Start/stop regular recording during replay/streaming, which requires GPU Screen Recorder to run
with the
.B \-ro
option.
.TP
.BR save-replay " [" \fIseconds\fR ]
Save replay (replay mode only). The number of seconds has to be larger than 0. The whole replay
buffer is saved when no number of seconds is given.
.SH EXAMPLES
Start GPU Screen Recorder in replay mode with an ipc socket:
.RS
.nf
gpu-screen-recorder -w screen -f 60 -c mp4 -r 60 -o ~/Videos -ipc "$XDG_RUNTIME_DIR/gsr.sock" &
.fi
.RE
.PP
Save the last 30 seconds:
.RS
.nf
gsr-cli -ipc "$XDG_RUNTIME_DIR/gsr.sock" save-replay 30
.fi
.RE
.PP
Start replay only when it isn't already running:
.RS
.nf
gsr-cli -ipc "$XDG_RUNTIME_DIR/gsr.sock" status >/dev/null || start-replay.sh
.fi
.RE
.SH NOTES
.IP \(bu 3
The socket can only be used by the user that started GPU Screen Recorder.
.IP \(bu 3
A command is replied to as soon as GPU Screen Recorder accepts it. Saving a video finishes
after the reply, and the path to the saved video is printed by GPU Screen Recorder itself.
.IP \(bu 3
GPU Screen Recorder creates the socket before it has finished starting up, so a command that is
sent while it's starting up is replied to when the recording starts.
.SH AUTHORS
gsr\-cli was written by the GPU Screen Recorder contributors.
.SH REPORTING BUGS
Report bugs to:
.UR mailto:dec05eba@protonmail.com
dec05eba@protonmail.com
.UE .
.SH COPYRIGHT
Copyright © dec05eba. Licensed under GPL-3.0-only.
.SH SEE ALSO
.BR gpu\-screen\-recorder (1)
.PP
Project homepage: <https://git.dec05eba.com/gpu-screen-recorder/about/>
|