Add man page

Thanks Seyed.
This commit is contained in:
dec05eba
2025-12-22 01:51:35 +01:00
parent 52e3083cfb
commit 53ffdead0f
3 changed files with 407 additions and 225 deletions

402
gpu-screen-recorder.1 Normal file
View File

@@ -0,0 +1,402 @@
.TH GPU-SCREEN-RECORDER 1 "2025-12-22" "5.10.2" "GPU Screen Recorder Manual"
.SH NAME
gpu-screen-recorder \- The fastest screen recording tool for Linux
.SH SYNOPSIS
.B gpu-screen-recorder
.RI [ options ]
.B \-w
.I window_id|monitor|focused|portal|region
.RI [ options ]
.B \-o
.I output_file
.PP
.B gpu-screen-recorder
.B \-\-help
|
.B \-\-version
|
.B \-\-list\-capture\-options
|
.B \-\-list\-audio\-devices
|
.B \-\-list\-application\-audio
|
.B \-\-info
.SH DESCRIPTION
.B gpu-screen-recorder
is the fastest screen recording tool for Linux. It uses the GPU
only to record the screen to minimize system performance impact. It supports recording,
live streaming, instant replay (similar to NVIDIA ShadowPlay), and
screenshot capture. The tool works on both X11 and Wayland with AMD,
Intel, and NVIDIA graphics cards.
.PP
Key features include:
.RS
.IP \(bu 3
GPU-accelerated encoding using H264, HEVC, AV1, VP8, or VP9 codecs
.IP \(bu 3
Support for HDR recording (HEVC HDR and AV1 HDR)
.IP \(bu 3
Instant replay buffer (last N seconds recording)
.IP \(bu 3
Live streaming capabilities
.IP \(bu 3
Audio recording from devices and applications (PipeWire required for app audio)
.IP \(bu 3
Plugin system for custom graphics overlay
.IP \(bu 3
Minimal performance impact compared to traditional screen recorders
.RE
.SH OPTIONS
.SS Capture Options
.TP
.BI \-w " window_id|monitor|focused|portal|region"
Specify what to record. Valid values are:
.RS
.IP \(bu 3
.B window
- Record a specific window (use window ID, X11 only)
.IP \(bu 3
.B screen
- Record the first monitor found
.IP \(bu 3
.B screen\-direct
- NVIDIA X11 only, for VRR/G-SYNC support (not recommended due to driver issues)
.IP \(bu 3
.B focused
- Record the currently focused window (X11 only)
.IP \(bu 3
.B portal
- Use xdg-desktop-portal with PipeWire (Wayland only)
.IP \(bu 3
.B region
- Record a specific region (use with
.B \-region
option)
.IP \(bu 3
Monitor name (e.g.,
.BR DP\-1 )
- Record specific monitor
.RE
Run
.B \-\-list\-capture\-options
to see available options.
.TP
.BI \-region " WxH+X+Y"
Specify region to capture when using
.BR \-w " region."
Format is width x height + X offset + Y offset. Use 0x0 for full monitor.
It is compatible with tools such as slop (X11) and slurp (Wayland).
.TP
.BI \-c " container_format"
Container format (mp4, mkv, flv, webm). Defaults to extension from
.B \-o
filename.
.TP
.BI \-s " WxH"
Output resolution limit (e.g., 1920x1080). Use 0x0 for original resolution.
Required for
.BR \-w " focused."
.TP
.BI \-f " fps"
Frame rate (default: 60). For variable frame rate mode, this is maximum FPS.
.TP
.BI \-cursor " yes|no"
Record cursor (default: yes).
.SS Audio Options
.TP
.BI \-a " audio_source"
Audio device or application to record. Can be specified multiple times.
Formats:
.RS
.IP \(bu 3
.B default_output
- Default output device
.IP \(bu 3
.B default_input
- Default input device
.IP \(bu 3
.B device:name
- Specific device
.IP \(bu 3
.B app:name
- Application audio (case-insensitive)
.IP \(bu 3
.B app\-inverse:name
- All applications except specified
.IP \(bu 3
Combine sources with | (e.g.,
.BR "default_output|app:firefox" )
.RE
.TP
.BI \-ac " aac|opus|flac"
Audio codec (default: opus for mp4/mkv, aac otherwise). FLAC temporarily disabled.
.TP
.BI \-ab " bitrate"
Audio bitrate in kbps (default: 128 for opus/flac, 160 for aac). 0 = automatic.
.SS Video Quality Options
.TP
.BI \-k " codec"
Video codec:
.BR auto ", " h264 ", " hevc ", " av1 ", " vp8 ", " vp9 ", " hevc_hdr ", " av1_hdr ", " hevc_10bit ", " av1_10bit
(default: auto → h264). HDR options not available on X11 or portal capture.
10-bit capture reduces banding but may not be supported properly by all video players.
.TP
.BI \-q " quality"
Quality preset (medium, high, very_high, ultra) for QP/VBR mode, or bitrate (kbps) for CBR mode (default: very_high).
.TP
.BI \-bm " auto|qp|vbr|cbr"
Bitrate mode (default: auto → qp). CBR recommended for replay buffer.
.TP
.BI \-fm " cfr|vfr|content"
Frame rate mode: constant, variable, or match content (default: vfr). Content mode only on X11 or portal.
Content mode syncs video to the captured content and is recommended for smoothest video when the game is running
at the same frame rate or lower than what you are trying to record at.
.TP
.BI \-cr " limited|full"
Color range (default: limited). Full range may cause issues with some video players/websites.
.TP
.BI \-tune " performance|quality"
Encoding tune (default: performance). Currently NVIDIA only.
.TP
.BI \-keyint " seconds"
Keyframe interval in seconds (default: 2.0). Affects seeking precision.
.TP
.BI \-encoder " gpu|cpu"
Encoding device (default: gpu). CPU encoding only for H264.
.TP
.BI \-fallback\-cpu\-encoding " yes|no"
Fallback to CPU if GPU encoding unavailable (default: no).
.SS Replay Buffer Options
.TP
.BI \-r " seconds"
Replay buffer duration (2-86400 seconds). When set, only saves on command.
.TP
.BI \-replay\-storage " ram|disk"
Buffer storage location (default: ram). Disk mode may reduce SSD lifespan.
.TP
.BI \-restart\-replay\-on\-save " yes|no"
Clear buffer after saving replay (default: no).
.TP
.BI \-df " yes|no"
Organize replays in date-based folders (default: no).
.SS Advanced Options
.TP
.BI \-oc " yes|no"
Overclock NVIDIA memory (X11 only). Requires Coolbits=12. Use at own risk.
.TP
.BI \-p " plugin.so"
Load plugin (.so file). Can be specified multiple times.
.TP
.BI \-sc " script_path"
Script to run after saving video. Receives filepath and type ("regular", "replay", "screenshot").
.TP
.BI \-restore\-portal\-session " yes|no"
Restore previous portal session (Wayland portal, default: no).
.TP
.BI \-portal\-session\-token\-filepath " path"
Portal session token file (default: ~/.config/gpu-screen-recorder/restore_token).
.TP
.BI \-gl\-debug " yes|no"
OpenGL debug output (default: no).
.TP
.BI \-v " yes|no"
Print FPS and damage info (default: yes).
.SS Output Options
.TP
.BI \-o " output"
Output file path (or directory for replay mode). Required except when outputting to stdout.
.TP
.BI \-ro " directory"
Output directory for regular recordings during replay/streaming mode.
.SS Information Commands
.TP
.B \-\-help
Show help message.
.TP
.B \-\-version
Show version (5.10.2).
.TP
.B \-\-info
Show system info (codecs, capture options).
.TP
.B \-\-list\-capture\-options
List available windows and monitors.
.TP
.B \-\-list\-audio\-devices
List PulseAudio devices.
.TP
.B \-\-list\-application\-audio
List applications for audio capture.
.SH SIGNALS
GPU Screen Recorder can be controlled via signals:
.TP
.B SIGINT (Ctrl+C)
Stop and save recording (stop without save in replay mode).
.TP
.B SIGUSR1
Save replay (replay mode only).
.TP
.B SIGUSR2
Pause/unpause recording (not for streaming/replay).
.TP
.B SIGRTMIN
Start/stop regular recording during replay/streaming.
.TP
.B SIGRTMIN+1
Save last 10 seconds (replay mode).
.TP
.B SIGRTMIN+2
Save last 30 seconds (replay mode).
.TP
.B SIGRTMIN+3
Save last 60 seconds (replay mode).
.TP
.B SIGRTMIN+4
Save last 5 minutes (replay mode).
.TP
.B SIGRTMIN+5
Save last 10 minutes (replay mode).
.TP
.B SIGRTMIN+6
Save last 30 minutes (replay mode).
.PP
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:
.PP
.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
.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
.nf
.RS
gpu-screen-recorder -w $(xdotool selectwindow) -f 60 -o video.mp4
.RE
.fi
.PP
Instant replay (last 60 seconds):
.PP
.nf
.RS
gpu-screen-recorder -w screen -f 60 -c mkv -r 60 -o ~/Videos
.RE
.fi
.PP
Record region using slop:
.PP
.nf
.RS
gpu-screen-recorder -w region -region $(slop) -o video.mp4
.RE
.fi
.PP
Record region using slurp:
.PP
.nf
.RS
gpu-screen-recorder -w region -region $(slurp -f "%wx%h+%x+%y") -o video.mp4
.RE
.fi
.PP
Instant replay and launch a script when saving replay
.PP
.nf
.RS
gpu-screen-recorder -w screen -f 60 -c mkv -r 60 -sc ./script.sh -o ~/Videos
.RE
.fi
.PP
Stream to Twitch:
.PP
.nf
.RS
gpu-screen-recorder -w screen -f 60 -a default_output -o "rtmp://live.twitch.tv/app/stream_key"
.RE
.fi
.PP
Take screenshot:
.PP
.nf
.RS
gpu-screen-recorder -w screen -o screenshot.jpg
.RE
.fi
.SH FILES
.TP
.I ~/.config/gpu-screen-recorder.env
Environment variables for systemd service (optional).
.TP
.I /usr/lib/modprobe.d/gsr-nvidia.conf
NVIDIA suspend/resume fix.
.TP
.I ~/.config/gpu-screen-recorder/restore_token
Portal session token storage (default location).
.SH TIPS
.IP \(bu 3
Some video editors don't support videos in variable frame rate mode.
Change video container to .mkv or capture in constant frame rate mode instead to workaround this issue
.IP \(bu 3
Variable frame rate may cause issues in some video players (use MPV)
.IP \(bu 3
H.265/HEVC not supported in browsers/Discord (use H264 for sharing)
.IP \(bu 3
Some distros disable hardware codecs (use Flatpak version)
.IP \(bu 3
Use CBR mode (
.B \-bm cbr
) for replay buffer to control RAM usage
.SH PERFORMANCE TIPS
.IP \(bu 3
Save to SSD (HDD may be too slow)
.IP \(bu 3
Close other screen recorders (including idle OBS)
.SH KNOWN ISSUES
.IP \(bu 3
NVIDIA: CUDA breaks after suspend (install gsr-nvidia.conf fix)
.IP \(bu 3
AMD: Possible black bars colors with HEVC/AV1 (use H264 or FFmpeg >=8)
.SH SEE ALSO
.UR https://git.dec05eba.com/gpu-screen-recorder
Project homepage
.UE
.br
.UR https://git.dec05eba.com/gpu-screen-recorder-gtk
GTK GUI version (will be removed in the future)
.UE
.br
.UR https://git.dec05eba.com/gpu-screen-recorder-ui
ShadowPlay-style UI
.UE
.br
.BR xdotool (1),
.BR slop (1),
.BR slurp (1),
.SH AUTHORS
Developed by dec05eba and contributors.
.SH COPYRIGHT
Copyright © dec05eba. Licensed under GPL3-only.
.SH BUGS
Report bugs at
.UR mailto:dec05eba@protonmail.com
dec05eba@protonmail.com
.UE .

View File

@@ -115,6 +115,7 @@ executable('gsr-kms-server', 'kms/server/kms_server.c', dependencies : dependenc
executable('gpu-screen-recorder', src, dependencies : dep, install : true)
install_headers('plugin/plugin.h', install_dir : 'include/gsr')
install_man('gpu-screen-recorder.1')
if get_option('systemd') == true
install_data(files('extra/gpu-screen-recorder.service'), install_dir : 'lib/systemd/user')

View File

@@ -202,234 +202,13 @@ static void usage_header() {
static void usage_full() {
const bool inside_flatpak = getenv("FLATPAK_ID") != NULL;
const char *program_name = inside_flatpak ? "flatpak run --command=gpu-screen-recorder com.dec05eba.gpu_screen_recorder" : "gpu-screen-recorder";
usage_header();
printf("\n");
printf("OPTIONS:\n");
printf(" -w Window id to record, a display (monitor name), \"screen\", \"screen-direct\", \"focused\", \"portal\" or \"region\".\n");
printf(" If this is \"portal\" then xdg desktop screencast portal with PipeWire will be used. Portal option is only available on Wayland.\n");
printf(" If you select to save the session (token) in the desktop portal capture popup then the session will be saved for the next time you use \"portal\",\n");
printf(" but the session will be ignored unless you run GPU Screen Recorder with the '-restore-portal-session yes' option.\n");
printf(" If this is \"region\" then the region specified by the -region option is recorded.\n");
printf(" If this is \"screen\" then the first monitor found is recorded.\n");
printf(" \"screen-direct\" can only be used on Nvidia X11, to allow recording without breaking VRR (G-SYNC). This also records all of your monitors.\n");
printf(" Using this \"screen-direct\" option is not recommended unless you use VRR (G-SYNC) as there are Nvidia driver issues that can cause your system or games to freeze/crash.\n");
printf(" The \"screen-direct\" option is not needed on AMD, Intel nor Nvidia on Wayland as VRR works properly in those cases.\n");
printf(" Run GPU Screen Recorder with the --list-capture-options option to list valid values for this option.\n");
printf("\n");
printf(" -c Container format for output file, for example mp4, or flv. Only required if no output file is specified or if recording in replay buffer mode.\n");
printf(" If an output file is specified and -c is not used then the container format is determined from the output filename extension.\n");
printf(" Only containers that support h264, hevc, av1, vp8 or vp9 are supported, which means that only mp4, mkv, flv, webm (and some others) are supported.\n");
printf("\n");
printf(" -s The output resolution limit of the video in the format WxH, for example 1920x1080. If this is 0x0 then the original resolution is used. Optional, except when -w is \"focused\".\n");
printf(" Note: the captured content is scaled to this size. The output resolution might not be exactly as specified by this option. The original aspect ratio is respected so the resolution will match that.\n");
printf(" The video encoder might also need to add padding, which will result in black bars on the sides of the video. This is especially an issue on AMD.\n");
printf("\n");
printf(" -region\n");
printf(" The region to capture, only to be used with -w region. This is in format WxH+X+Y, which is compatible with tools such as slop (X11) and slurp (kde plasma, wlroots and hyprland).\n");
printf(" The region can be inside any monitor. If width and height are 0 (for example 0x0+500+500) then the entire monitor that the region is inside in will be recorded.\n");
printf(" Note: currently the region can't span multiple monitors.\n");
printf("\n");
printf(" -f Frame rate to record at. Recording will only capture frames at this target frame rate.\n");
printf(" For constant frame rate mode this option is the frame rate every frame will be captured at and if the capture frame rate is below this target frame rate then the frames will be duplicated.\n");
printf(" For variable frame rate mode this option is the max frame rate and if the capture frame rate is below this target frame rate then frames will not be duplicated.\n");
printf(" Content frame rate is similar to variable frame rate mode, except the frame rate will match the frame rate of the captured content when possible, but not capturing above the frame rate set in this -f option.\n");
printf(" Optional, set to 60 by default.\n");
printf("\n");
printf(" -a Audio device or application to record from (pulse audio device). Can be specified multiple times. Each time this is specified a new audio track is added for the specified audio device or application.\n");
printf(" The audio device can also be \"default_output\" in which case the default output device is used, or \"default_input\" in which case the default input device is used.\n");
printf(" Multiple audio sources can be merged into one audio track by using \"|\" as a separator into one -a argument, for example: -a \"default_output|default_input\".\n");
printf(" The audio name can also be prefixed with \"device:\", for example: -a \"device:default_output\".\n");
printf(" To record audio from an application then prefix the audio name with \"app:\", for example: -a \"app:Brave\". The application name is case-insensitive.\n");
printf(" To record audio from all applications except the provided ones prefix the audio name with \"app-inverse:\", for example: -a \"app-inverse:Brave\".\n");
printf(" \"app:\" and \"app-inverse:\" can't be mixed in one audio track.\n");
printf(" One audio track can contain both audio devices and application audio, for example: -a \"default_output|device:alsa_output.pci-0000_00_1b.0.analog-stereo.monitor|app:Brave\".\n");
printf(" Recording application audio is only possible when the sound server on the system is PipeWire.\n");
printf(" If the audio name is an empty string then the argument is ignored.\n");
printf(" Optional, no audio track is added by default.\n");
printf(" Run GPU Screen Recorder with the --list-audio-devices option to list valid audio device names.\n");
printf(" Run GPU Screen Recorder with the --list-application-audio option to list valid application names. It's possible to use an application name that is not listed in --list-application-audio,\n");
printf(" for example when trying to record audio from an application that hasn't started yet.\n");
printf("\n");
printf(" -q Video/image quality. Should be either 'medium', 'high', 'very_high' or 'ultra' when using '-bm qp' or '-bm vbr' options, and '-bm qp' is the default option used.\n");
printf(" 'high' is the recommended option when live streaming or when you have a slower harddrive.\n");
printf(" When using '-bm cbr' option then this is option is instead used to specify the video bitrate in kbps.\n");
printf(" Optional when using '-bm qp' or '-bm vbr' options, set to 'very_high' be default.\n");
printf(" Required when using '-bm cbr' option.\n");
printf("\n");
printf(" -r Replay buffer time in seconds. If this is set, then only the last seconds as set by this option will be stored\n");
printf(" and the video will only be saved when the gpu-screen-recorder is closed. This feature is similar to Nvidia's instant replay feature This option has be between 2 and 86400.\n");
printf(" Note that the video data is stored in RAM (unless -replay-storage disk is used), so don't use too long replay buffer time and use constant bitrate option (-bm cbr) to prevent RAM usage from going too high in busy scenes.\n");
printf(" Optional, disabled by default.\n");
printf("\n");
printf(" -replay-storage\n");
printf(" Specify where temporary replay is stored. Should be either 'ram' or 'disk'. If set to 'disk' then replay data is stored in temporary files in the same directory as -o.\n");
printf(" Preferably avoid setting this to 'disk' unless -o is set to a HDD, as constant writes to a SSD can reduce the life-time of the SSD.\n");
printf(" Optional, set to 'ram' by default.\n");
printf("\n");
printf(" -restart-replay-on-save\n");
printf(" Restart replay on save. For example if this is set to 'no' and replay time (-r) is set to 60 seconds and a replay is saved once then the first replay video is 60 seconds long\n");
printf(" and if a replay is saved 10 seconds later then the second replay video will also be 60 seconds long and contain 50 seconds of the previous video as well.\n");
printf(" If this is set to 'yes' then after a replay is saved the replay buffer data is cleared and the second replay will start from that point onward.\n");
printf(" The replay is only restarted when saving a full replay (SIGUSR1 signal)\n");
printf(" Optional, set to 'no' by default.\n");
printf("\n");
printf(" -k Video codec to use. Should be either 'auto', 'h264', 'hevc', 'av1', 'vp8', 'vp9', 'hevc_hdr', 'av1_hdr', 'hevc_10bit' or 'av1_10bit'.\n");
printf(" Optional, set to 'auto' by default which defaults to 'h264'. Forcefully set to 'h264' if the file container type is 'flv'.\n");
printf(" 'hevc_hdr' and 'av1_hdr' option is not available on X11 nor when using the portal capture option.\n");
printf(" 'hevc_10bit' and 'av1_10bit' options allow you to select 10 bit color depth which can reduce banding and improve quality in darker areas, but not all video players support 10 bit color depth\n");
printf(" and if you upload the video to a website the website might reduce 10 bit to 8 bit.\n");
printf(" Note that when using 'hevc_hdr' or 'av1_hdr' the color depth is also 10 bits.\n");
printf("\n");
printf(" -ac Audio codec to use. Should be either 'aac', 'opus' or 'flac'. Optional, set to 'opus' for .mp4/.mkv files, otherwise set to 'aac'.\n");
printf(" 'opus' and 'flac' is only supported by .mp4/.mkv files. 'opus' is recommended for best performance and smallest audio size.\n");
printf(" Flac audio codec is option is disable at the moment because of a temporary issue.\n");
printf("\n");
printf(" -ab Audio bitrate in kbps. If this is set to 0 then it's the same as if it's absent, in which case the bitrate is determined automatically depending on the audio codec.\n");
printf(" Optional, by default the bitrate is 128kbps for opus and flac and 160kbps for aac.\n");
printf("\n");
printf(" -oc Overclock memory transfer rate to the maximum performance level. This only applies to NVIDIA on X11 and exists to overcome a bug in NVIDIA driver where performance level\n");
printf(" is dropped when you record a game. Only needed if you are recording a game that is bottlenecked by GPU. The same issue exists on Wayland but overclocking is not possible on Wayland.\n");
printf(" Works only if your have \"Coolbits\" set to \"12\" in NVIDIA X settings, see README for more information. Note! use at your own risk! Optional, disabled by default.\n");
printf("\n");
printf(" -fm Framerate mode. Should be either 'cfr' (constant frame rate), 'vfr' (variable frame rate) or 'content'. Optional, set to 'vfr' by default.\n");
printf(" 'vfr' is recommended for general recording for less issue with very high system load but some applications such as video editors may not support it properly.\n");
printf(" 'content' is currently only supported on X11 or when using portal capture option. The 'content' option matches the recording frame rate to the captured content.\n");
printf(" 'content' is the best option to use when possible as it avoids capturing duplicate frames, which results in a smoother video.\n");
printf("\n");
printf(" -bm Bitrate mode. Should be either 'auto', 'qp' (constant quality), 'vbr' (variable bitrate) or 'cbr' (constant bitrate). Optional, set to 'auto' by default which defaults to 'qp' on all devices\n");
printf(" except steam deck that has broken drivers and doesn't support qp.\n");
printf(" Note: 'vbr' option is not supported when using '-encoder cpu' option.\n");
printf("\n");
printf(" -cr Color range. Should be either 'limited' (aka mpeg) or 'full' (aka jpeg). Optional, set to 'limited' by default.\n");
printf(" Limited color range means that colors are in range 16-235 (4112-60395 for hdr) while full color range means that colors are in range 0-255 (0-65535 for hdr).\n");
printf(" Note that some buggy video players (such as vlc) are unable to correctly display videos in full color range and when upload the video to websites the website\n");
printf(" might re-encoder the video to make the video limited color range.\n");
printf("\n");
printf(" -tune\n");
printf(" Tune for performance or quality. Should be either 'performance' or 'quality'. At the moment this option only has an effect on Nvidia where setting this to quality\n");
printf(" sets options such as preset, multipass and b frames. Optional, set to 'performance' by default.\n");
printf("\n");
printf(" -df Organise replays in folders based on the current date.\n");
printf("\n");
printf(" -sc Run a script on the saved video file (asynchronously). The first argument to the script is the filepath to the saved video/screenshot file and the second argument is the recording type (either \"regular\", \"replay\" or \"screenshot\").\n");
printf(" Not applicable for live streams.\n");
printf(" Note: the script has to be executable.\n");
printf("\n");
printf(" -p A plugin (.so) to load. This can be specified multiple times to load multiple plugins.\n");
printf("\n");
printf(" -cursor\n");
printf(" Record cursor. Optional, set to 'yes' by default.\n");
printf("\n");
printf(" -keyint\n");
printf(" Specifies the keyframe interval in seconds, the max amount of time to wait to generate a keyframe. Keyframes can be generated more often than this.\n");
printf(" This also affects seeking in the video and may affect how the replay video is cut. If this is set to 10 for example then you can only seek in 10-second chunks in the video.\n");
printf(" Setting this to a higher value reduces the video file size if you are ok with the previously described downside. This option is expected to be a floating point number.\n");
printf(" By default this value is set to 2.0.\n");
printf("\n");
printf(" -restore-portal-session\n");
printf(" If GPU Screen Recorder should use the same capture option as the last time. Using this option removes the popup asking what you want to record the next time you record with '-w portal'\n");
printf(" if you selected the option to save session (token) in the desktop portal screencast popup.\n");
printf(" This option may not have any effect on your Wayland compositor and your systems desktop portal needs to support ScreenCast version 5 or later. Optional, set to 'no' by default.\n");
printf("\n");
printf(" -portal-session-token-filepath\n");
printf(" This option is used together with -restore-portal-session option to specify the file path to save/restore the portal session token to/from.\n");
printf(" This can be used to remember different portal capture options depending on different recording option (such as recording/replay).\n");
printf(" Optional, set to \"$XDG_CONFIG_HOME/gpu-screen-recorder/restore_token\" by default ($XDG_CONFIG_HOME defaults to \"$HOME/.config\").\n");
printf(" Note: the directory to the portal session token file is created automatically if it doesn't exist.\n");
printf("\n");
printf(" -encoder\n");
printf(" Which device should be used for video encoding. Should either be 'gpu' or 'cpu'. 'cpu' option currently only work with h264 codec option (-k).\n");
printf(" Optional, set to 'gpu' by default.\n");
printf("\n");
printf(" -fallback-cpu-encoding\n");
printf(" If this is set to 'yes' and GPU encoding is not available on the system then CPU encoding will be used instead. Optional, set to 'no' by default.\n");
printf(" If the fallback to CPU encoding happens then h264 codec will forcefully be used.\n");
printf(" This should ideally not be used. Instead properly install vaapi on your system to encode the video with your GPU.\n");
printf(" Some very old GPUs don't support video encoding in which case this option may be used.\n");
printf("\n");
printf(" --info\n");
printf(" List info about the system. Lists the following information (prints them to stdout and exits):\n");
printf(" Supported video codecs (h264, h264_software, hevc, hevc_hdr, hevc_10bit, av1, av1_hdr, av1_10bit, vp8, vp9) and image codecs (jpeg, png) (if supported).\n");
printf(" Supported capture options (window, focused, screen, monitors and portal, if supported by the system).\n");
printf(" If opengl initialization fails then the program exits with 22, if no usable drm device is found then it exits with 23. On success it exits with 0.\n");
printf("\n");
printf(" --list-capture-options\n");
printf(" List available capture options. Lists capture options in the following format (prints them to stdout and exits):\n");
printf(" <option>\n");
printf(" <monitor_name>|<resolution>\n");
printf(" For example:\n");
printf(" window\n");
printf(" DP-1|1920x1080\n");
printf(" The <option> and <monitor_name> is the name that can be passed to GPU Screen Recorder with the -w option.\n");
printf(" --list-capture-options optionally accepts a card path (\"/dev/dri/cardN\") which can improve the performance of running this command.\n");
printf("\n");
printf(" --list-audio-devices\n");
printf(" List audio devices. Lists audio devices in the following format (prints them to stdout and exits):\n");
printf(" <audio_device_name>|<audio_device_name_in_human_readable_format>\n");
printf(" For example:\n");
printf(" bluez_input.88:C9:E8:66:A2:27|WH-1000XM4\n");
printf(" alsa_output.pci-0000_0c_00.4.iec958-stereo|Monitor of Starship/Matisse HD Audio Controller Digital Stereo (IEC958)\n");
printf(" The <audio_device_name> is the name that can be passed to GPU Screen Recorder with the -a option.\n");
printf("\n");
printf(" --list-application-audio\n");
printf(" Lists applications that you can record from (prints them to stdout and exits), for example:\n");
printf(" firefox\n");
printf(" csgo\n");
printf(" These names are the application audio names that can be passed to GPU Screen Recorder with the -a option.\n");
printf("\n");
printf(" --version\n");
printf(" Print version (%s) and exit\n", GSR_VERSION);
printf("\n");
//fprintf(stderr, " -pixfmt The pixel format to use for the output video. yuv420 is the most common format and is best supported, but the color is compressed, so colors can look washed out and certain colors of text can look bad. Use yuv444 for no color compression, but the video may not work everywhere and it may not work with hardware video decoding. Optional, set to 'yuv420' by default\n");
printf(" -o The output file path. If omitted then the encoded data is sent to stdout. Required in replay mode (when using -r).\n");
printf(" In replay mode this has to be a directory instead of a file.\n");
printf(" Note: the directory to the file is created automatically if it doesn't already exist.\n");
printf("\n");
printf(" -ro The output directory for regular recordings in replay/streaming mode. Required to start recording in replay/streaming mode.\n");
printf(" Note: the directory to the file is created automatically if it doesn't already exist.\n");
printf("\n");
printf(" -v Prints fps and damage info once per second. Optional, set to 'yes' by default.\n");
printf("\n");
printf(" -gl-debug\n");
printf(" Print opengl debug output. Optional, set to 'no' by default.\n");
printf("\n");
printf(" -h, --help\n");
printf(" Show this help.\n");
printf("\n");
printf("NOTES:\n");
printf(" Send signal SIGINT to gpu-screen-recorder (Ctrl+C, or pkill -SIGINT -f gpu-screen-recorder) to stop and save the recording. When in replay mode this stops recording without saving.\n");
printf(" Send signal SIGUSR2 to gpu-screen-recorder (pkill -SIGUSR2 -f gpu-screen-recorder) to pause/unpause recording. Only applicable when recording (not streaming nor replay).\n");
printf(" Send signal SIGUSR1 to gpu-screen-recorder (pkill -SIGUSR1 -f gpu-screen-recorder) to save a replay (when in replay mode).\n");
printf(" Send signal SIGRTMIN+1 to gpu-screen-recorder (pkill -SIGRTMIN+1 -f gpu-screen-recorder) to save a replay of the last 10 seconds (when in replay mode).\n");
printf(" Send signal SIGRTMIN+2 to gpu-screen-recorder (pkill -SIGRTMIN+2 -f gpu-screen-recorder) to save a replay of the last 30 seconds (when in replay mode).\n");
printf(" Send signal SIGRTMIN+3 to gpu-screen-recorder (pkill -SIGRTMIN+3 -f gpu-screen-recorder) to save a replay of the last 60 seconds (when in replay mode).\n");
printf(" Send signal SIGRTMIN+4 to gpu-screen-recorder (pkill -SIGRTMIN+4 -f gpu-screen-recorder) to save a replay of the last 5 minutes (when in replay mode).\n");
printf(" Send signal SIGRTMIN+5 to gpu-screen-recorder (pkill -SIGRTMIN+5 -f gpu-screen-recorder) to save a replay of the last 10 minutes (when in replay mode).\n");
printf(" Send signal SIGRTMIN+6 to gpu-screen-recorder (pkill -SIGRTMIN+6 -f gpu-screen-recorder) to save a replay of the last 30 minutes (when in replay mode).\n");
printf(" Send signal SIGRTMIN to gpu-screen-recorder (pkill -SIGRTMIN -f gpu-screen-recorder) to start/stop recording a regular video when in replay/streaming mode.\n");
printf("\n");
printf("EXAMPLES:\n");
printf(" %s -w screen -o video.mp4\n", program_name);
printf(" %s -w screen -f 60 -a default_output -o video.mp4\n", program_name);
printf(" %s -w screen -f 60 -a default_output -a default_input -o video.mp4\n", program_name);
printf(" %s -w $(xdotool selectwindow) -f 60 -a default_output -o video.mp4\n", program_name);
printf(" %s -w screen -f 60 -a \"default_output|default_input\" -o video.mp4\n", program_name);
printf(" %s -w screen -f 60 -a default_output -c mkv -r 60 -o \"$HOME/Videos\"\n", program_name);
printf(" %s -w screen -f 60 -a default_output -c mkv -r 1800 -replay-storage disk -bm cbr -q 40000 -o \"$HOME/Videos\"\n", program_name);
printf(" %s -w screen -f 60 -a default_output -c mkv -sc ./script.sh -r 60 -o \"$HOME/Videos\"\n", program_name);
printf(" %s -w portal -f 60 -a default_output -restore-portal-session yes -o video.mp4\n", program_name);
printf(" %s -w screen -f 60 -a default_output -bm cbr -q 15000 -o video.mp4\n", program_name);
printf(" %s -w screen -f 60 -a \"app:firefox|app:csgo\" -o video.mp4\n", program_name);
printf(" %s -w screen -f 60 -a \"app-inverse:firefox|app-inverse:csgo\" -o video.mp4\n", program_name);
printf(" %s -w screen -f 60 -a \"default_input|app-inverse:Brave\" -o video.mp4\n", program_name);
printf(" %s -w screen -o image.jpg\n", program_name);
printf(" %s -w screen -q medium -o image.jpg\n", program_name);
printf(" %s -w region -region 640x480+100+100 -o video.mp4\n", program_name);
printf(" %s -w region -region $(slop) -o video.mp4\n", program_name);
printf(" %s -w region -region $(slurp -f \"%%wx%%h+%%x+%%y\") -o video.mp4\n", program_name);
printf(" %s -w screen -p ./plugin.so -o video.mp4\n", program_name);
//fprintf(stderr, " gpu-screen-recorder -w screen -f 60 -q ultra -pixfmt yuv444 -o video.mp4\n");
if(inside_flatpak)
printf(" Run \"man /var/lib/flatpak/app/com.dec05eba.gpu_screen_recorder/current/active/files/share/man/man1/gpu-screen-recorder.1\" to open the man page for GPU Screen Recorder to see an explanation for each option and examples\n");
else
printf(" Run \"man gpu-screen-recorder.1\" to open the man page for GPU Screen Recorder to see an explanation for each option and examples\n");
fflush(stdout);
}