diff --git a/shell/bash/avt/README.md b/shell/bash/avt/README.md index b850b01..0ae6522 100644 --- a/shell/bash/avt/README.md +++ b/shell/bash/avt/README.md @@ -46,4 +46,4 @@ # Requirements This assumes you use X11, PipeWire and pipewire-pulse. -You also need a pretty fast disk and a lot of free space to record with this tool with the default settings. Consider increasing `rec_crf` if you don't have those. +You also need a pretty fast disk and a lot of free space to record with this tool with the default settings. Consider increasing [`rec_crf`](https://trac.ffmpeg.org/wiki/Encode/H.264#crf) or choosing a slower [`rec_preset`](https://trac.ffmpeg.org/wiki/Encode/H.264#Preset) if you don't have those. diff --git a/shell/bash/avt/avt b/shell/bash/avt/avt index 2f8851e..87f92ae 100755 --- a/shell/bash/avt/avt +++ b/shell/bash/avt/avt @@ -22,6 +22,8 @@ rec_out: set output file (default: $HOME/Desktop/$(date +%F_%H-%M-%S).mkv) rec_fps: set framerate (default: 60) rec_res: set resolution (default: 1920x1080) rec_out: set output file (default: $HOME/Desktop/$(date +%F_%H-%M-%S).mkv) +rec_preset: set preset (default: ultrafast) +rec_vrate: replace -crf options rec_crf: set crf, use 0 for lossless (default: 10) rec_adev: space separated pulseaudio source devices (default: default and first running monitor) rec_ar: set audio samplerate (default: 192000) @@ -81,7 +83,7 @@ foreach (@sinks) { $pulse_inputs \ -filter_complex "$audio_filter" \ -c:a pcm_s16le -ar "${rec_ar:-192000}" \ - -c:v libx264rgb -x264opts opencl -profile:v high444 -crf "${rec_crf:-4}" -tune film -preset ultrafast -r 60 \ + -c:v libx264rgb ${avt_cl+-x264opts opencl} -profile:v high444 -preset "${rec_preset:-ultrafast}" ${rec_vrate:--crf "${rec_crf:-10}"} -tune zerolatency -r 60 \ -map 0:v $audio_maps -map '[merged]:a' \ "$OUTPUTFILE" @@ -101,7 +103,7 @@ normalize() { ffmpeg -y \ ${nvid_cl+-hwaccel opencl} -i "$1" \ ${nvid_cl+-init_hw_device opencl=ocl -filter_hw_device ocl} \ - -c:v libx264${nvid_rgb+rgb} ${nvid_cl+-x264opts opencl} -preset "${nvid_preset:-veryslow}" ${nvid_vrate:--crf "${nvid_crf:-21}"} \ + -c:v libx264${nvid_rgb+rgb} ${avt_cl+-x264opts opencl} -preset "${nvid_preset:-veryslow}" ${nvid_vrate:--crf "${nvid_crf:-21}"} \ -pix_fmt "${nvid_pixfmt:-yuv420p}" -profile:v "${nvid_profile:-high}" \ -c:a "${nvid_ac:-aac}" -b:a "${nvid_ba:-160k}" -ar "${nvid_ar:-48000}" \ -map 0 \