Skip to content
Snippets Groups Projects
Commit d2f8638e authored by bta's avatar bta
Browse files

sdump: use examid and hostname in the filename and in the drawtext.

parent e5ff055a
Branches master
No related tags found
No related merge requests found
......@@ -5,6 +5,8 @@ set -x
DATE=`date +%Y-%m-%dT%H:%M:%S`
BASEDIR=/local/sdump
HOSTNAME=`hostname`
EXAMID=`cat /local/examid`
start() {
# Prepare the output directory
......@@ -39,7 +41,7 @@ start() {
# Start the screen dump
#CMD="ffmpeg -framerate 1 -f x11grab -i :0.0 -vcodec libx265 -crf 28 \"${BASEDIR}/${DATE}.mkv\""
CMD="ffmpeg -framerate 1 -f x11grab -i :0.0 -vcodec libx265 -crf 28 -vf \"drawtext='text=%{localtime\:%X}:fontsize=32:fontcolor=red'\" \"${BASEDIR}/${DATE}.mkv\""
CMD="ffmpeg -framerate 1 -f x11grab -i :0.0 -vcodec libx265 -crf 28 -vf \"drawtext='text=${EXAMID}-${HOSTNAME}-%{localtime\:%x-%X}:fontsize=32:fontcolor=red'\" \"${BASEDIR}/${EXAMID}-${HOSTNAME}-${DATE}.mkv\""
#CMD="PATH=\"$PATH:.\" [sysdump] -framerate 1 -f x11grab -i :0.0 -vcodec libx265 -crf 28 -vf \"drawtext='text=%{localtime\:%X}:fontsize=32:fontcolor=red'\" \"${BASEDIR}/${DATE}.mkv\""
su - sdump -c "${CMD}"
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment