Remove dependency on sibs for building
This commit is contained in:
parent
33ed64355f
commit
4162e9b272
5
.gitignore
vendored
5
.gitignore
vendored
@ -3,4 +3,9 @@ sibs-build/
|
||||
compile_commands.json
|
||||
tests/sibs-build/
|
||||
tests/compile_commands.json
|
||||
|
||||
.clangd/
|
||||
|
||||
main.o
|
||||
sound.o
|
||||
gpu-screen-recorder
|
||||
|
@ -15,7 +15,7 @@ When recording a 4k game, fps drops from 30 to 7 when using OBS Studio, however
|
||||
the fps remains at 30.
|
||||
|
||||
# Installation
|
||||
gpu screen recorder can be built using [sibs](https://git.dec05eba.com/sibs) or if you are running Arch Linux, then you can find it on aur under the name gpu-screen-recorder-git (`yay -S gpu-screen-recorder-git`).\
|
||||
Run `./build.sh` or if you are running Arch Linux, then you can find gpu screen recorder on aur under the name gpu-screen-recorder-git (`yay -S gpu-screen-recorder-git`).\
|
||||
Recording monitors requires a gpu with NvFBC support (note: this is not required when recording a single window!). Normally only tesla and quadro gpus support this, but by using [nvidia-patch](https://github.com/keylase/nvidia-patch) or [nvlax](https://github.com/illnyang/nvlax) you can do this on all gpus that support nvenc as well (gpus as old as the nvidia 600 series), provided you are not using outdated gpu drivers.
|
||||
|
||||
# How to use
|
||||
|
8
build.sh
Executable file
8
build.sh
Executable file
@ -0,0 +1,8 @@
|
||||
#!/bin/sh -e
|
||||
|
||||
dependencies="glew libavcodec libavformat libavutil x11 xcomposite glfw3 libpulse-simple libswresample"
|
||||
includes="$(pkg-config --cflags $dependencies) -I/opt/cuda/targets/x86_64-linux/include"
|
||||
libs="$(pkg-config --libs $dependencies) /usr/lib/libcuda.so -ldl -pthread -lm"
|
||||
g++ -c src/sound.cpp -O2 $includes -DPULSEAUDIO=1
|
||||
g++ -c src/main.cpp -O2 $includes -DPULSEAUDIO=1
|
||||
g++ -o gpu-screen-recorder -O2 sound.o main.o -s $libs
|
@ -29,4 +29,4 @@ read output_file_name
|
||||
output_dir=$(dirname "$output_file_name")
|
||||
mkdir -p "$output_dir"
|
||||
|
||||
./sibs-build/linux_x86_64/release/gpu-screen-recorder -w "$window_id" -c mp4 -f "$fps" -a "$selected_audio_input" -o "$output_file_name"
|
||||
./gpu-screen-recorder -w "$window_id" -c mp4 -f "$fps" -a "$selected_audio_input" -o "$output_file_name"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$#" -ne 5 ] && echo "usage: replay.sh <window_id> <fps> <audio_input> <replay_time_sec> <output_file>" && exit 1
|
||||
./sibs-build/linux_x86_64/release/gpu-screen-recorder -w "$1" -c mp4 -f "$2" -a "$3" -r "$4" -o "$5"
|
||||
./gpu-screen-recorder -w "$1" -c mp4 -f "$2" -a "$3" -r "$4" -o "$5"
|
||||
|
@ -3,4 +3,4 @@
|
||||
# Stream on twitch while also saving the video to disk locally
|
||||
|
||||
[ "$#" -ne 5 ] && echo "usage: twitch-stream-local-copy.sh <window_id> <fps> <audio_input> <livestream_key> <local_file>" && exit 1
|
||||
./sibs-build/linux_x86_64/release/gpu-screen-recorder -w "$1" -c flv -f "$2" -a "$3" | tee -- "$5" | ffmpeg -i pipe:0 -c:v copy -f flv -- "rtmp://live.twitch.tv/app/$4"
|
||||
./gpu-screen-recorder -w "$1" -c flv -f "$2" -a "$3" | tee -- "$5" | ffmpeg -i pipe:0 -c:v copy -f flv -- "rtmp://live.twitch.tv/app/$4"
|
||||
|
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
[ "$#" -ne 4 ] && echo "usage: twitch-stream.sh <window_id> <fps> <audio_input> <livestream_key>" && exit 1
|
||||
./sibs-build/linux_x86_64/release/gpu-screen-recorder -w "$1" -c flv -f "$2" -a "$3" | ffmpeg -i pipe:0 -c:v copy -f flv -- "rtmp://live.twitch.tv/app/$4"
|
||||
./gpu-screen-recorder -w "$1" -c flv -f "$2" -a "$3" | ffmpeg -i pipe:0 -c:v copy -f flv -- "rtmp://live.twitch.tv/app/$4"
|
||||
|
Loading…
Reference in New Issue
Block a user