refactor(install\_software.sh): remove redundant script for recording screen and delete the corresponding file record\_screen.sh

remove the following lines from install\_software.sh:

```bash
ffmpeg -vsync 0 -hwaccel cuda -hwaccel_output_format cuda     `# we need nvidia acceleration because of low fps without it` \
--r 30 -video_size 640x480 -i /dev/video0  `# this is camera` \
--f alsa -i default -async 1                                   `# this is audio. Why not pulse? Nvidia?` \
--c:v h264_nvenc                                     `# this is video codec` \
video.mp4 # output file
```

Also, remove the filter\_complex line and the x11grab section.

This refactoring is done to simplify the script and make it more focused on installing software rather than recording the screen.
This commit is contained in:
Digital Studium 2024-03-08 17:36:58 +03:00
parent 3f2c2e10bc
commit f83665e777
2 changed files with 12 additions and 25 deletions

View File

@ -6,6 +6,8 @@ curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dear
sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
# for nodejs/opencommit # for nodejs/opencommit
curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash - curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
# obs-studio repo
sudo add-apt-repository ppa:obsproject/obs-studio -y
# apt packages # apt packages
sudo nala update sudo nala update
@ -16,7 +18,10 @@ strace `# for tracing` \
docker.io `# containers` \ docker.io `# containers` \
docker-compose `# containers` \ docker-compose `# containers` \
nvidia-container-toolkit `# containers` \ nvidia-container-toolkit `# containers` \
nodejs `# for opencommit` nodejs `# for opencommit` \
ffmpeg `# for video` \
v4l2loopback-dkms `# for obs-studio` \
obs-studio `# for screen recording`
sudo nvidia-ctk runtime configure --runtime=docker --set-as-default sudo nvidia-ctk runtime configure --runtime=docker --set-as-default
sudo service docker restart sudo service docker restart
@ -28,6 +33,12 @@ do
sudo usermod -a -G $group $USER sudo usermod -a -G $group $USER
done done
# background removal for obs-studio
wget https://github.com/occ-ai/obs-backgroundremoval/releases/download/1.1.10/obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
sudo apt install -y ./obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
rm -f obs-backgroundremoval-1.1.10-x86_64-linux-gnu.deb
# install opencommit # install opencommit
if ! command -v opencommit &> /dev/null if ! command -v opencommit &> /dev/null
then then
@ -41,21 +52,6 @@ then
oco config set OCO_AI_PROVIDER=ollama oco config set OCO_AI_PROVIDER=ollama
fi fi
# install ffmpeg with nvidia
if ! command -v ffmpeg &> /dev/null
then
git clone --depth 1 https://git.ffmpeg.org/ffmpeg.git ffmpeg/
git clone --depth 1 https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers && sudo make install && cd -
sudo nala install -y build-essential yasm cmake libtool libc6 libc6-dev unzip wget libnuma1 libnuma-dev libasound2-dev
cd ffmpeg
./configure --enable-nonfree --enable-cuda-nvcc --enable-libnpp --enable-libxcb --enable-indev=alsa --enable-outdev=alsa --extra-cflags=-I/usr/lib/cuda/include --extra-ldflags=-L/usr/lib/cuda/lib64 --disable-static --enable-shared
make -j 8
sudo make install
cd -
rm -rf ffmpeg nv-codec-headers
fi
# install pet # install pet
if ! command -v pet &> /dev/null if ! command -v pet &> /dev/null
then then

View File

@ -1,9 +0,0 @@
#!/bin/bash
export LD_LIBRARY_PATH=/usr/local/lib
ffmpeg -vsync 0 -hwaccel cuda -hwaccel_output_format cuda `# we need nvidia acceleration because of low fps without it` \
-r 30 -video_size 640x480 -i /dev/video0 `# this is camera` \
-f alsa -i default -async 1 `# this is audio. Why not pulse? Nvidia?` \
-c:v h264_nvenc `# this is video codec` \
video.mp4 # output file
#-filter_complex 'overlay=main_w-overlay_w:main_h-overlay_h' `# this is overlay` \
#-f x11grab -framerate 30 -video_size 1920x1080 -i :0 `# this is screen` \