Update 2023-05-03 07:55 OpenBSD/amd64-x13
This commit is contained in:
parent
3cbef4ce23
commit
1e27073357
32
.bin/rec_scr_noaudio
Executable file
32
.bin/rec_scr_noaudio
Executable file
@ -0,0 +1,32 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
_vidfile="/home/sdk/rec-screen.mkv"
|
||||
_outfile="/home/sdk/rec-encoded-$(date "+%Y%m%d_%H%M%S").mp4"
|
||||
|
||||
_res="1920x1080"
|
||||
_fps="24"
|
||||
|
||||
_vid_in="-framerate ${_fps} -f x11grab -i :0.0"
|
||||
_vid_proc="-c:v libx264rgb -crf 0 -qp 0 -framerate ${_fps} -sws_flags neighbor -preset ultrafast -tune zerolatency"
|
||||
|
||||
_ffmpeg_param="${_vid_in} ${_vid_proc} ${_mic_proc}"
|
||||
|
||||
printf 'Press q to stop.\n'
|
||||
set -x
|
||||
ffmpeg -y -loglevel error -hide_banner ${_ffmpeg_param} "${_vidfile}"
|
||||
set +x
|
||||
|
||||
printf 'Encoding...\n'
|
||||
set -x
|
||||
ffmpeg -hide_banner -y \
|
||||
-i "${_vidfile}" \
|
||||
-c:v libx264 \
|
||||
-crf 28 \
|
||||
-s ${_res} \
|
||||
-preset veryfast \
|
||||
-movflags faststart \
|
||||
-threads 12 \
|
||||
"${_outfile}"
|
||||
set +x
|
||||
printf '%s\n' "${_outfile}"
|
Loading…
Reference in New Issue
Block a user