useful_scripts/record_screen.sh

10 lines
679 B
Bash
Raw Normal View History

2024-03-03 16:16:46 +00:00
#!/bin/bash
2024-03-03 18:02:53 +00:00
export LD_LIBRARY_PATH=/usr/local/lib
ffmpeg -hwaccel cuda -hwaccel_output_format cuda `# we need nvidia acceleration because of low fps without it` \
-f x11grab -r 30 -video_size 1920x1080 -i :0 `# this is screen` \
-f v4l2 -r 30 -video_size 640x480 -i /dev/video0 `# this is camera` \
-f alsa -i default `# this is audio. Why not pulse? Nvidia?` \
-c:v h264_nvenc `# this is video codec` \
2024-03-03 16:16:46 +00:00
-filter_complex "[0][1]overlay=main_w-overlay_w-2:main_h-overlay_h-2[v]" -map [v] -map 2 `# this is for placing camera in bottom right corner. IDK how it works` \
2024-03-03 18:02:53 +00:00
video.mp4 # output file