diff options
| author | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2026-08-10 10:38:14 +0500 |
|---|---|---|
| committer | Maria Lisina <sekoohaka.sarisan@gmail.com> | 2026-08-10 10:38:14 +0500 |
| commit | 6dc1149d078fc3b04a19696bfb7d5d6940372175 (patch) | |
| tree | 169f7f71e6a292a4ab61a0493000e1add4430f8e /gpu-screen-recorder.1 | |
| parent | 6836426ae183b9a7d0ec99c1e147e8ad6edabd92 (diff) | |
| parent | 80517840f4ae64469721598e8373d81f2e4493dd (diff) | |
Merge tag '6.0.0' of https://repo.dec05eba.com/gpu-screen-recorder into debian
Diffstat (limited to 'gpu-screen-recorder.1')
| -rw-r--r-- | gpu-screen-recorder.1 | 171 |
1 files changed, 145 insertions, 26 deletions
diff --git a/gpu-screen-recorder.1 b/gpu-screen-recorder.1 index 38d4df6..9f461cc 100644 --- a/gpu-screen-recorder.1 +++ b/gpu-screen-recorder.1 @@ -392,6 +392,14 @@ monotonic_microsec realtime_microsec <monotonic_microsec> <realtime_microsec> .fi (default: no). Ignored for live streaming and when output is piped. +.TP +.BI \-ipc " socket_path" +Listen for commands on a unix domain socket at +.I socket_path +instead of only accepting signals. The socket is created when GPU Screen Recorder starts and removed when it exits. +See the +.B IPC +section for the protocol. Has no effect when taking a screenshot. .SS Output Options .TP .BI \-o " output" @@ -461,110 +469,218 @@ Use .B pkill to send signals (e.g., .BR "pkill -SIGUSR1 -f ""^gpu-screen-recorder""" ). -.SH EXAMPLES -Record monitor at 60 FPS with desktop audio: +.SH IPC +When the +.B \-ipc +option is used GPU Screen Recorder also listens for commands on a unix domain socket. This gives the same control as signals, +except that a replay can be saved with an arbitrary number of seconds. The socket can only be used by the user that +started GPU Screen Recorder and it's removed when GPU Screen Recorder exits. +.PP +.BR gsr\-cli (1) +is a program that sends these commands and reports the reply, so the protocol below only has to be +implemented by programs that want to talk to the socket directly. +.PP +Requests and replies are json objects terminated by a newline. Every request is replied to. +A request has these fields: +.TP +.B id +Number that identifies the request. The reply to the request has the same id. +.TP +.B name +String with the name of the request. +.TP +.B data +Optional, the type depends on the request. .PP +A reply has these fields: +.TP +.B id +The id of the request that this is a reply to, or 0 when the request had no valid id. +.TP +.B result +Either +.B ok +or +.BR error . +.TP +.B data +Optional. For an +.B error +result this is a string that describes what went wrong. For an +.B ok +result to +.BR stop ", " save-replay " or " stop-replay-recording +this is a string with the path of the saved file. +.PP +The +.BR stop ", " save-replay " and " stop-replay-recording +requests save a file, and they are replied to when the file has been saved and the script given with the +.B \-sc +option has been started. The other requests are replied to as soon as they are accepted. +.PP +These requests are available: +.TP +.B stop +Stop and save recording (stop without save in replay mode). The reply contains the path of the +saved file, except in replay mode where nothing is saved. +.TP +.B save-replay +Save replay (replay mode only). +.B data +is an object with these optional fields: +.RS +.TP +.B seconds +The number of seconds to save, which has to be larger than 0. +.TP +.B restart-replay +true/false, which overrides the +.B \-restart\-replay\-on\-save +option for this save. Just like that option, the replay buffer is only cleared when the whole replay buffer is saved. +.RE +.IP +The whole replay buffer is saved when +.B data +is omitted or null, or when +.B seconds +is omitted or null. The reply contains the path of the saved file. +.TP +.B toggle-pause +Pause/unpause recording (not for streaming/replay). +.TP +.B set-paused +Pause/unpause recording (not for streaming/replay). +.B data +has to be true to pause or false to unpause. Unlike +.B toggle-pause +this doesn't fail when the recording is already paused/unpaused. +.TP +.B toggle-replay-recording +Start/stop regular recording during replay/streaming, which requires the +.B \-ro +option. +.TP +.B start-replay-recording +Start regular recording during replay/streaming, which requires the +.B \-ro +option. Does nothing when a recording is already running. +.TP +.B stop-replay-recording +Stop the regular recording that runs during replay/streaming. Fails when no recording is running. +The reply contains the path of the saved file. +.PP +Example: +.nf +.RS +gpu-screen-recorder -w screen -f 60 -c mp4 -r 60 -o ~/Videos -ipc "$XDG_RUNTIME_DIR/gsr.sock" & +echo '{"id":1,"name":"save-replay","data":{"seconds":30}}' | socat - "UNIX-CONNECT:$XDG_RUNTIME_DIR/gsr.sock" +.RE +.fi +which replies with the following when the replay has been saved: +.nf +.RS +{"id":1,"result":"ok","data":"/home/user/Videos/Replay_2026-08-05_14-04-22.mp4"} +.RE +.fi +.SH EXAMPLES +.B Record monitor at 60 FPS with desktop audio: .nf .RS gpu-screen-recorder -w screen -f 60 -a default_output -o video.mp4 .RE .fi .PP -Record monitor at 60 FPS with desktop audio and microphone: -.PP +.B Record monitor at 60 FPS with desktop audio and microphone: .nf .RS gpu-screen-recorder -w screen -f 60 -a "default_output|default_input" -o video.mp4 .RE .fi .PP -Record specific window (X11 only): -.PP +.B Record specific window (X11 only): .nf .RS gpu-screen-recorder -w $(xdotool selectwindow) -f 60 -o video.mp4 .RE .fi .PP -Instant replay (last 60 seconds): -.PP +.B Instant replay (last 60 seconds): .nf .RS gpu-screen-recorder -w screen -c mp4 -r 60 -o ~/Videos .RE .fi .PP -Instant replay with constant framerate (recommended for predicable ram usage): -.PP +.B Instant replay with constant framerate (recommended for predicable ram usage): .nf .RS gpu-screen-recorder -w screen -c mp4 -r 60 -bm cbr -q 40000 -o ~/Videos .RE .fi .PP -Record region using slop: -.PP +.B Record region using slop: .nf .RS gpu-screen-recorder -w $(slop) -o video.mp4 .RE .fi .PP -Record region using slurp: -.PP +.B Record region using slurp: .nf .RS gpu-screen-recorder -w $(slurp -f "%wx%h+%x+%y") -o video.mp4 .RE .fi .PP -Instant replay and launch a script when saving replay: -.PP +.B Instant replay and launch a script when saving replay: .nf .RS gpu-screen-recorder -w screen -c mp4 -r 60 -sc ./script.sh -o ~/Videos .RE .fi .PP -Stream to Twitch with constant bitrate mode: -.PP +.B Stream to Twitch with constant bitrate mode: .nf .RS gpu-screen-recorder -w screen -c flv -a default_output -bm cbr -q 8000 -o "rtmp://live.twitch.tv/app/stream_key" .RE .fi .PP -Take screenshot: -.PP +.B Take screenshot: .nf .RS gpu-screen-recorder -w screen -o screenshot.jpg .PP .RE .fi -Record screen and camera: -.PP +.B Record screen and camera: .nf .RS gpu-screen-recorder -w "screen|/dev/video0" -o video.mp4 .PP .RE .fi -Record screen and camera. The camera is located at the bottom right and flipped horizontally: -.PP +.B Record screen and camera. The camera is located at the bottom right and flipped horizontally: .nf .RS gpu-screen-recorder -w "screen|/dev/video0;halign=end;valign=end;hflip=true;width=30%;height=30%" -o video.mp4 .PP .RE .fi -Record two monitors, side by side (assuming the first monitor has a resolution of 1920x1080) -.PP +.B Record two monitors, side by side (assuming the first monitor has a resolution of 1920x1080): .nf .RS gpu-screen-recorder -w "DP-1|DP-2;x=1920" -o video.mp4 .RE .fi +.PP +.B Stream whip with an authorization key: +.nf +.RS +gpu-screen-recorder -w screen -bm cbr -q 3500 -ffmpeg-opts "authorization=streamtest;ts_buffer_size=131072" -c whip -o https://b.siobud.com/api/whip +.PP +.RE +.fi .SH FILES .TP .I ~/.config/gpu-screen-recorder/gpu-screen-recorder.env @@ -616,6 +732,9 @@ The bug may have been previously reported or may not be related to gpu-screen-r .SH COPYRIGHT Copyright © dec05eba. Licensed under GPL-3.0-only. .SH SEE ALSO +.BR gsr\-cli (1), +.BR gsr\-kms\-server (1) +.PP .UR https://git.dec05eba.com/gpu-screen-recorder Project homepage .UE |
