useful_scripts/record_screen.sh

10 lines
614 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 -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` \
2024-03-03 18:02:53 +00:00
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` \