diff --git a/.gitignore b/.gitignore index 8fca4d7..735d447 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ gpu-screen-recorder/gpu-screen-recorder_source/ +gpu-screen-recorder-gtk/source/ diff --git a/Dockerfile b/Dockerfile index ef9abd3..a37ac23 100644 --- a/Dockerfile +++ b/Dockerfile @@ -35,6 +35,11 @@ rpm-ostree install ffmpeg ffmpeg-libs intel-media-driver pipewire-codec-aptx lib # install Pulseaudio utilities RUN rpm-ostree install pulseaudio-utils +# install gpu screen recorder gtk +COPY gpu-screen-recorder-gtk/ /tmp/gpu-screen-recorder-gtk/ +RUN cd /tmp/gpu-screen-recorder-gtk && \ +./install.sh + RUN rpm-ostree cleanup -m && \ rm -rf /tmp/* /var/* && mkdir -p /var/tmp && chmod -R 1777 /var/tmp && \ ostree container commit \ No newline at end of file diff --git a/gpu-screen-recorder-gtk/com.dec05eba.gpu_screen_recorder.appdata.xml b/gpu-screen-recorder-gtk/com.dec05eba.gpu_screen_recorder.appdata.xml new file mode 100644 index 0000000..4421aea --- /dev/null +++ b/gpu-screen-recorder-gtk/com.dec05eba.gpu_screen_recorder.appdata.xml @@ -0,0 +1,200 @@ + + + com.dec05eba.gpu_screen_recorder + GPU Screen Recorder + A shadowplay-like screen recorder for Linux. The fastest screen recorder for Linux + dec05eba + CC0-1.0 + GPL-3.0 + https://git.dec05eba.com/gpu-screen-recorder/about/ + https://git.dec05eba.com/?p=about + https://git.dec05eba.com/?p=about + https://git.dec05eba.com/?p=about + + + pointing + keyboard + + + +

+ This is a screen recorder that has minimal impact on system performance by recording a window using the GPU only, similar to shadowplay on windows. This is the fastest screen recording tool for Linux. This screen recorder works with both X11 and Wayland. +

+

+ This screen recorder can be used for recording your desktop offline, for live streaming and for nvidia-like instant replay, where only the last few seconds are saved. +

+

+ There are some restrictions when recording on AMD/Intel. Videos created on AMD/Intel are in variable framerate format. Very out of date video players might have an issue playing such videos. I recommend using MPV or a browser to play such videos, otherwise you might experience stuttering in the video. + Recording a monitor requires (restricted) root access which means that you have to install GPU Screen Recorder system-wide: flatpak install flathub --system com.dec05eba.gpu_screen_recorder + and pkexec needs to be installed on the system. This is also the case when using wayland on Nvidia. + Some distros such as manjaro disable hardware accelerated H264/HEVC which means GPU Screen Recorder wont work on AMD/Intel and you have to either switch to another distro or install mesa from source (or install mesa-git for example). +

+
+ + com.dec05eba.gpu_screen_recorder.desktop + + + Simple view + https://raw.githubusercontent.com/dec05eba/com.dec05eba.gpu_screen_recorder/master/resources/screenshot1.png + + + Advanced view + https://raw.githubusercontent.com/dec05eba/com.dec05eba.gpu_screen_recorder/master/resources/screenshot2.png + + + + + + +

Experimental wayland support on AMD/Intel/NVIDIA. Hotkeys not supported.

+
+
+ + +

Attempt to fix screen recording when multiple graphics cards are connected

+
+
+ + +

Show proper error when running on wayland. Preparing for wayland support.

+
+
+ + +

AMD/Intel: fix multi monitor capture coordinate being incorrect for some GPU driver versions.

+
+
+ + +

Attempt to fix a recent nvidia (cuda) driver bug on RTX cards that causes a freeze when stopping recording.

+
+
+ + +

Fix issue where the application freezes and keyboard freezes when selecting a new hotkey and another widget is clicked.

+
+
+ + +

Attempt to fix possible issue on some systems with amd/intel where capture region is incorrect when multiple monitors are connected.

+
+
+ + +

Attempt to fix possible audio/video sync on NVIDIA after recording for a long time. Temporary disable opus/flac because it breaks when recording multiple audio inputs.

+
+
+ + +

AMD/Intel: Add support for capturing cursor when recording a monitor. Fix some cases of capture being glitched when using multiple monitors.

+
+
+ + +

Enable AMD/Intel monitor capture. Requires the flatpak to be installed system-wide and it requires restricted root access. Record a single window if you dont like these restrictions. Videos created on AMD/Intel should be played with MPV otherwise it might have issues such as stuttering.

+
+
+ + +

Add experimental support for AMD/Intel. Quality might not be well tuned yet and the video is in variable framerate mode, which might cause issues with some out of date video editing software or video players. Recording on AMD/intel is currently limited to a window (monitor capture is not possible yet).

+
+
+ + +

Show error when using wayland (because wayland is not supported)

+
+
+ + +

Add option to workaround a NVIDIA driver "bug" that causes framerate to drop a bit when recording (overclock memory transfer rate back to normal)

+
+
+ + +

Make it clear when graphics card is not supported

+
+
+ + +
    +
  • Add VRR record option, only use with VRR as it might have driver issues!
  • +
  • Add opus/flac audio options. opus/flac is only supported by .mp4/.mkv. Automatically changes audio codec if not supported by the container
  • +
+
+
+ + +

Fix broken replay when recording with audio (possibly broken in normal recording as well)

+
+
+ + +
    +
  • Switch to EGL (fixes possible window capture issues when using a compositor)
  • +
  • Add option to change hotkeys
  • +
  • Add option to merge audio tracks into one audio track
  • +
  • Add option to follow the focused window
  • +
  • Add option to force set h264/hevc (services such as discord can't play hevc videos directly in the application)
  • +
  • Show proper error when NVIDIA GPU is not in use
  • +
+
+
+ + +

Allow choosing between mp4, flv and mkv for record/replay. mkv survives system crashes

+
+
+ + +

Re-enable screen-direct, disable h264 forced fallback and use p6 again

+
+
+ + +

Attempt to fix stuttering in video that can happen sometimes (especially when vsync is enabled)

+
+
+ + +

Properly fallback to h264 if hevc is not supported by the gpu

+
+
+ + +

Fix livestreaming: flv does not properly fallback to h264

+
+
+ + +

Use lower preset on older gpus (kepler) and switch to h264 if h265 is not supported

+
+
+ + +

Tune options to try and reduce file size

+
+
+ + +

Better tune quality options for different resolutions

+
+
+ + +

Fix crash caused by invalid memory write when recording audio

+
+
+ + +

Fix possible pulseaudio crash

+
+
+ + +

Fixes some streaming issues (mostly metadata missing)

+
+
+ +
+ +
diff --git a/gpu-screen-recorder-gtk/gpu-screen-recorder-gtk b/gpu-screen-recorder-gtk/gpu-screen-recorder-gtk new file mode 100755 index 0000000..b50fb40 Binary files /dev/null and b/gpu-screen-recorder-gtk/gpu-screen-recorder-gtk differ diff --git a/gpu-screen-recorder-gtk/gpu-screen-recorder-gtk.desktop b/gpu-screen-recorder-gtk/gpu-screen-recorder-gtk.desktop new file mode 100644 index 0000000..0a83558 --- /dev/null +++ b/gpu-screen-recorder-gtk/gpu-screen-recorder-gtk.desktop @@ -0,0 +1,10 @@ +[Desktop Entry] +Type=Application +Name=GPU Screen Recorder +GenericName=Screen recorder +Comment=A gpu based screen recorder / streaming program +Icon=com.dec05eba.gpu_screen_recorder +Exec=gpu-screen-recorder-gtk +Terminal=false +Keywords=gpu-screen-recorder;screen recorder;streaming;twitch;replay; +Categories=AudioVideo;Recorder; diff --git a/gpu-screen-recorder-gtk/icons/hicolor/128x128/apps/com.dec05eba.gpu_screen_recorder.png b/gpu-screen-recorder-gtk/icons/hicolor/128x128/apps/com.dec05eba.gpu_screen_recorder.png new file mode 100644 index 0000000..f2b99a1 Binary files /dev/null and b/gpu-screen-recorder-gtk/icons/hicolor/128x128/apps/com.dec05eba.gpu_screen_recorder.png differ diff --git a/gpu-screen-recorder-gtk/icons/hicolor/64x64/apps/com.dec05eba.gpu_screen_recorder.png b/gpu-screen-recorder-gtk/icons/hicolor/64x64/apps/com.dec05eba.gpu_screen_recorder.png new file mode 100644 index 0000000..f66332b Binary files /dev/null and b/gpu-screen-recorder-gtk/icons/hicolor/64x64/apps/com.dec05eba.gpu_screen_recorder.png differ diff --git a/gpu-screen-recorder-gtk/install.sh b/gpu-screen-recorder-gtk/install.sh new file mode 100755 index 0000000..af56bbf --- /dev/null +++ b/gpu-screen-recorder-gtk/install.sh @@ -0,0 +1,14 @@ +#!/bin/sh -e + +script_dir=$(dirname "$0") +cd "$script_dir" + +[ $(id -u) -ne 0 ] && echo "You need root privileges to run the install script" && exit 1 + +#./build.sh + +install -Dm755 "gpu-screen-recorder-gtk" "/usr/bin/gpu-screen-recorder-gtk" +install -Dm644 "gpu-screen-recorder-gtk.desktop" "/usr/share/applications/com.dec05eba.gpu_screen_recorder.desktop" +install -Dm644 com.dec05eba.gpu_screen_recorder.appdata.xml "/usr/share/metainfo/com.dec05eba.gpu_screen_recorder.appdata.xml" +install -Dm644 icons/hicolor/64x64/apps/com.dec05eba.gpu_screen_recorder.png "/usr/share/icons/hicolor/64x64/apps/com.dec05eba.gpu_screen_recorder.png" +install -Dm644 icons/hicolor/128x128/apps/com.dec05eba.gpu_screen_recorder.png "/usr/share/icons/hicolor/128x128/apps/com.dec05eba.gpu_screen_recorder.png"