Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #242 from vania-pooh/master
Browse files Browse the repository at this point in the history
Added ability to hide browser cursor on recorded video
  • Loading branch information
vania-pooh authored Apr 20, 2020
2 parents 147765c + 79cfd9b commit a043bca
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion selenium/video/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"

0 comments on commit a043bca

Please sign in to comment.