Skip to content
Snippets Groups Projects
Unverified Commit 96e27604 authored by Volkor Barbarian Warrior's avatar Volkor Barbarian Warrior
Browse files

Fix up the video recording :)

parent 4aae73c2
No related branches found
No related tags found
No related merge requests found
...@@ -6,9 +6,10 @@ ...@@ -6,9 +6,10 @@
#photo_format="date +%F-%T.png" #photo_format="date +%F-%T.png"
#video_format="date +%F-%T.mp4" #video_format="date +%F-%T.mp4"
## ffmpeg config for screen recording (1st line is cpu, second is nvidia gpu encoding) ## ffmpeg config for screen recording (1st line is CPU Encoding, 2nd is VAAPI)
#ffmpeg_config="-preset veryfast -vcodec libx264 -tune zerolatency -b:v 3M" #ffmpeg_config="-preset veryfast -vcodec libx264 -tune zerolatency -b:v 3M"
#ffmpeg_config="-preset llhq -vcodec h264_nvenc -tune zerolatency -b:v 3M" # I can't actually test this, because nvidia drivers broke #ffmpeg_config="-vaapi_device /dev/dri/renderD128 -vf "format=nv12,hwupload" -c:v h264_vaapi -b:v 3M"
## directory to save screenshots (To disable file saving, put it in /tmp, where it will be deleted on reboot) ## directory to save screenshots (To disable file saving, put it in /tmp, where it will be deleted on reboot)
#file_dir="${HOME}/Pictures/screenshots" #file_dir="${HOME}/Pictures/screenshots"
......
...@@ -196,9 +196,10 @@ fi ...@@ -196,9 +196,10 @@ fi
if [ "$video" = "true" ] ; then if [ "$video" = "true" ] ; then
video_path="$file_dir/$($video_format)" video_path="$file_dir/$($video_format)"
$debug && echo -e "${r}DEBUG:${nc} VIDEO_PATH: $video_path" $debug && echo -e "${r}DEBUG:${nc} VIDEO_PATH: $video_path"
echo -e "${r}WARNING: PRESS ${nc}q${r} to end screen recording!${nc}" echo -e "${r}WARNING: PRESS ${nc}q${r} to end screen recording!${nc}"
if ! ffcast -s ffmpeg -- "${ffmpeg_config} ${video_path}"; then if ! ffmpeg -f x11grab -framerate 30 $(slop -f '-video_size %wx%h -i +%x,%y') $ffmpeg_config $video_path; then
echo -e "${r}ERROR:${nc} Failed to take screenshot (ffcast crashed/user exited)" echo -e "${r}ERROR:${nc} Failed to take screenshot (ffcast crashed/user exited)"
exit 1 exit 1
fi fi
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment