diff options
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 55 |
1 files changed, 35 insertions, 20 deletions
@@ -7,6 +7,8 @@ similar to shadowplay on windows. This is the fastest screen recording tool for This screen recorder can be used for recording your desktop offline, for live streaming and for nvidia shadowplay-like instant replay, where only the last few minutes are saved. +This is a cli-only tool, if you want an UI for this check out [GPU Screen Recorder GTK](https://git.dec05eba.com/gpu-screen-recorder-gtk/) or if you prefer a ShadowPlay-like UI then check out [GPU Screen Recorder UI](https://git.dec05eba.com/gpu-screen-recorder-ui/). + Supported video codecs: * H264 (default) * HEVC (Optionally with HDR) @@ -46,14 +48,22 @@ This should work fine on AMD/Intel X11 or Wayland. On Nvidia X11 G-SYNC only wor For example it can cause your computer to freeze when recording certain games. # Installation -If you are running an Arch Linux based distro, then you can find gpu screen recorder on aur under the name gpu-screen-recorder-git (`yay -S gpu-screen-recorder-git`).\ +If you are running an Arch Linux based distro then you can find gpu screen recorder on aur under the name gpu-screen-recorder (`yay -S gpu-screen-recorder`).\ If you are running another distro then you can run `sudo ./install.sh`, but you need to manually install the dependencies, as described below.\ You can also install gpu screen recorder ([the gtk gui version](https://git.dec05eba.com/gpu-screen-recorder-gtk/)) from [flathub](https://flathub.org/apps/details/com.dec05eba.gpu_screen_recorder), which is the easiest method to install GPU Screen Recorder on non-arch based distros.\ -The only official ways to install GPU Screen Recorder is either from source, AUR or flathub. If you install GPU Screen Recorder from somewhere else and have an issue then try installing it -from one of the official sources before reporting it as an issue. If you install GPU Screen Recorder flatpak, which is the gtk gui version then you can still run GPU Screen Recorder command line by using the flatpak command option, for example `flatpak run --command=gpu-screen-recorder com.dec05eba.gpu_screen_recorder -w screen -f 60 -o video.mp4`. Note that if you want to record your monitor on AMD/Intel then you need to install the flatpak system-wide (like so: `flatpak install flathub --system com.dec05eba.gpu_screen_recorder`). +## Unofficial install methods +The only official ways to install GPU Screen Recorder is either from source, AUR or flathub. Other sources may be out of date and missing features or may not work correctly.\ +If you install GPU Screen Recorder from somewhere else and have an issue then try installing it from one of the official sources before reporting it as an issue.\ +If you still prefer to install GPU Screen Recorder with a package manager instead of from source or as a flatpak then you may be able to find a package for your distro.\ +Here are some known unofficial packages: +* Debian/Ubuntu: [Pacstall](https://pacstall.dev/packages/gpu-screen-recorder) +* Nix: [NixOS wiki](https://wiki.nixos.org/wiki/Gpu-screen-recorder) +* openSUSE: [openSUSE software repository](https://software.opensuse.org/package/gpu-screen-recorder) +* Gentoo: [Guru](https://github.com/gentoo/guru/blob/master/media-video/gpu-screen-recorder/gpu-screen-recorder-9999.ebuild) + # Dependencies GPU Screen Recorder uses meson build system so you need to install `meson` to build GPU Screen Recorder. @@ -61,6 +71,7 @@ GPU Screen Recorder uses meson build system so you need to install `meson` to bu These are the dependencies needed to build GPU Screen Recorder: * libglvnd (which provides libgl, libglx and libegl) +* vulkan-headers * ffmpeg (libavcodec, libavformat, libavutil, libswresample, libavfilter) * x11 (libx11, libxcomposite, libxrandr, libxfixes, libxdamage) * libpulse @@ -93,11 +104,18 @@ When compiling GPU Screen Recorder with portal support (`-Dportal=true`, which i * libpipewire (and libspa which is usually part of libpipewire) # How to use -Run `gpu-screen-recorder --help` to see all options and also examples. +Run `gpu-screen-recorder --help` to see all options and also examples.\ +There is also a gui for the gpu screen recorder called [GPU Screen Recorder GTK](https://git.dec05eba.com/gpu-screen-recorder-gtk/).\ +There is also a new alternative UI for GPU Screen Recorder in the style of ShadowPlay called [GPU Screen Recorder UI](https://git.dec05eba.com/gpu-screen-recorder-ui/). ## Recording Here is an example of how to record your monitor and the default audio output: `gpu-screen-recorder -w screen -f 60 -a default_output -o ~/Videos/test_video.mp4`. Yyou can stop and save the recording with `Ctrl+C` or by running `killall -SIGINT gpu-screen-recorder`. -You can see a list of monitor names to record if you use an invalid monitor name, for example: `gpu-screen-recorder -w invalid -f 60 -o video.mp4`. +You can see a list of capture options to record if you run `gpu-screen-recorder --list-capture-options`. This will list possible capture options and monitor names, for example:\ +``` + window + DP-1|1920x1080 +``` +in this case you could record a window or a monitor with the name `DP-1`. ## Streaming Streaming works the same as recording, but the `-o` argument should be path to the live streaming service you want to use (including your live streaming key). Take a look at `scripts/twitch-stream.sh` to see an example of how to stream to twitch. ## Replay mode @@ -111,15 +129,15 @@ The replay buffer is stored in ram (as encoded video), so don't use a too large To save a video in replay mode, you need to send signal SIGUSR1 to gpu screen recorder. You can do this by running `killall -SIGUSR1 gpu-screen-recorder`.\ To stop recording send SIGINT to gpu screen recorder. You can do this by running `killall -SIGINT gpu-screen-recorder` or pressing `Ctrl-C` in the terminal that runs gpu screen recorder. When recording a regular non-replay video this will also save the video.\ To pause/unpause recording send SIGUSR2 to gpu screen recorder. You can do this by running `killall -SIGUSR2 gpu-screen-recorder`. This is only applicable and useful when recording (not streaming nor replay).\ -## Finding audio device name -You can find the default output audio device (headset, speakers (in other words, desktop audio)) with the command `pactl get-default-sink`. Add `monitor` to the end of that to use that as an audio input in gpu screen recorder.\ -You can find the default input audio device (microphone) with the command `pactl get-default-source`. This input should not have `monitor` added to the end when used in gpu screen recorder.\ -Example of recording both desktop audio and microphone: `gpu-screen-recorder -w screen -f 60 -a "$(pactl get-default-sink).monitor" -a "$(pactl get-default-source)" -o ~/Videos/test_video.mp4`.\ -A name (that is visible to pipewire) can be given to an audio input device by prefixing the audio input with `<name>/`, for example `dummy/$(pactl get-default-sink).monitor`.\ -Note that if you use multiple audio inputs then they are each recorded into separate audio tracks in the video file. If you want to merge multiple audio inputs into one audio track then separate the audio inputs by "|" in one -a argument, -for example `-a "$(pactl get-default-sink).monitor|$(pactl get-default-source)"`. - -There is also a gui for the gpu screen recorder called [gpu-screen-recorder-gtk](https://git.dec05eba.com/gpu-screen-recorder-gtk/). +## Audio device name +To record the default output device (desktop audio) you can use the `default_output` option, for example `-a default_output`.\ +To record the default input device (microphone) you can use the `default_input` option, for example `-a default_input`.\ +To list all available audio devices run `gpu-screen-recorder --list-audio-devices`. The name to use with GPU Screen Recorder will be on the left side and the human readable name is on the right side.\ +To record multiple audio devices to multiple audio tracks specify the `-a` option multiple times, for example `-a default_output -a default_input`.\ +To record multiple audio devices into one audio track (merged) specify the `-a` option once split with `|` for each audio device, for example `-a "default_output|default_input"`.\ +In wireplumber the name of the audio will be in the format `gsr-<audio_device>`, but you can change that name by prefixing the audio device with a name and then a forward slash, for example: `-a "name/default_output"`.\ +You can also record audio from specific applications instead of from audio devices by using the `-aa` option to only record the specified applications or `-aai` to record all applications except the ones provided.\ +To list all available application to record from run `gpu-screen-recorder --list-application-audio`. ## Simple way to run replay without gui Run the script `scripts/start-replay.sh` to start replay and then `scripts/save-replay.sh` to save a replay and `scripts/stop-replay.sh` to stop the replay. The videos are saved to `$HOME/Videos`. You can use these scripts to start replay at system startup if you add `scripts/start-replay.sh` to startup (this can be done differently depending on your desktop environment / window manager) and then go into @@ -137,7 +155,7 @@ You have to reboot your computer after installing GPU Screen Recorder for the fi Look at the [scripts](https://git.dec05eba.com/gpu-screen-recorder/tree/scripts) directory for script examples. For example if you want to automatically save a recording/replay into a folder with the same name as the game you are recording. # Reporting bugs -Issues are reported on this Github page: [https://github.com/dec05eba/gpu-screen-recorder-issues/issues](https://github.com/dec05eba/gpu-screen-recorder-issues/issues). +Issues are reported on this Github page: [https://github.com/dec05eba/gpu-screen-recorder-issues](https://github.com/dec05eba/gpu-screen-recorder-issues). # Contributing patches See [https://git.dec05eba.com/?p=about](https://git.dec05eba.com/?p=about) for contribution steps. # Donations @@ -168,8 +186,5 @@ Try recording to an SSD and make sure it's not using NTFS file system. Also reco You have to either record in hdr mode (-k `hevc_hdr` or -k `av1_hdr` option) to record a HDR video or record with desktop portal option (`-w portal`) to turn the HDR recording into SDR. ## GPU Screen Recorder records night light when recording in HDR mode You can record with desktop portal option (`-w portal`) instead which ignores night light, if you are ok with recording without HDR. - -# TODO -* Dynamically change bitrate/resolution to match desired fps. This would be helpful when streaming for example, where the encode output speed also depends on upload speed to the streaming service. -* Implement opengl injection to capture texture. This fixes VRR without having to use NvFBC direct capture. -* Always use direct capture with NvFBC once the capture issue in mpv fullscreen has been resolved (maybe detect if direct capture fails in nvfbc and switch to non-direct recording. NvFBC says if direct capture fails). +## Kdenlive says that the video is not usable for editing because it has variable frame rate +To fix this you can either record the video in .mkv format or constant frame rate (-fm cfr). |