From 79cfd9bb155b2f3f1edc616706218cd02eab7c7b Mon Sep 17 00:00:00 2001 From: Ivan Krutov Date: Mon, 20 Apr 2020 17:05:49 +0300 Subject: [PATCH] Added ability to hide browser cursor on recorded video --- selenium/video/entrypoint.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/selenium/video/entrypoint.sh b/selenium/video/entrypoint.sh index e8eb905d0..feeb7fcf8 100755 --- a/selenium/video/entrypoint.sh +++ b/selenium/video/entrypoint.sh @@ -9,6 +9,11 @@ PRESET=${PRESET:-""} if [ "$CODEC" == "libx264" -a -n "$PRESET" ]; then PRESET="-preset $PRESET" fi +INPUT_OPTIONS=${INPUT_OPTIONS:-""} +HIDE_CURSOR=${HIDE_CURSOR:-""} +if [ -n "$HIDE_CURSOR" ]; then + INPUT_OPTIONS="$INPUT_OPTIONS -draw_mouse 0" +fi retcode=1 max_attempts=300 attempts=0 @@ -22,4 +27,4 @@ until [ $retcode -eq 0 -o $attempts -eq $max_attempts ]; do fi attempts=$((attempts+1)) done -exec ffmpeg -y -f x11grab -video_size ${VIDEO_SIZE} -r ${FRAME_RATE} -i ${BROWSER_CONTAINER_NAME}:${DISPLAY} -codec:v ${CODEC} ${PRESET} -pix_fmt yuv420p "/data/$FILE_NAME" +exec ffmpeg -y -f x11grab -video_size ${VIDEO_SIZE} -r ${FRAME_RATE} ${INPUT_OPTIONS} -i ${BROWSER_CONTAINER_NAME}:${DISPLAY} -codec:v ${CODEC} ${PRESET} -pix_fmt yuv420p "/data/$FILE_NAME"