diff --git a/Makefile b/Makefile index a26db516a5..5d4590d8ed 100644 --- a/Makefile +++ b/Makefile @@ -11,7 +11,7 @@ BUILD_ARGS := $(BUILD_ARGS) MAJOR := $(word 1,$(subst ., ,$(TAG_VERSION))) MINOR := $(word 2,$(subst ., ,$(TAG_VERSION))) MAJOR_MINOR_PATCH := $(word 1,$(subst -, ,$(TAG_VERSION))) -FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-4.3.1) +FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-6.0) all: hub \ distributor \ @@ -357,9 +357,9 @@ test_video: video hub chrome firefox edge done # Using ffmpeg to verify file integrity # https://superuser.com/questions/100288/how-can-i-check-the-integrity-of-a-video-file-avi-mpeg-mp4 - docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/chrome_video.mp4 -f null - 2>error.log - docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log - docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:4.3.1-ubuntu2004 -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log + docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/chrome_video.mp4 -f null - 2>error.log + docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log + docker run -v $$(pwd):$$(pwd) -w $$(pwd) jrottenberg/ffmpeg:6.0-alpine -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log .PHONY: \ all \ diff --git a/NodeDocker/config.toml b/NodeDocker/config.toml index 5ea58b2120..501a1f349c 100644 --- a/NodeDocker/config.toml +++ b/NodeDocker/config.toml @@ -14,7 +14,7 @@ configs = [ # socat -4 TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock url = "http://127.0.0.1:2375" # Docker image used for video recording -video-image = "selenium/video:ffmpeg-4.3.1-20231020" +video-image = "selenium/video:ffmpeg-6.0-20231020" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values diff --git a/README.md b/README.md index f2b497a86a..b4a14e54fa 100644 --- a/README.md +++ b/README.md @@ -473,7 +473,7 @@ ___ ## Video recording -Tests execution can be recorded by using the `selenium/video:ffmpeg-4.3.1-20231020` +Tests execution can be recorded by using the `selenium/video:ffmpeg-6.0-20231020` Docker image. One container is needed per each container where a browser is running. This means if you are running 5 Nodes/Standalone containers, you will need 5 video containers, the mapping is 1-1. @@ -500,7 +500,7 @@ This example shows how to start the containers manually: ``` bash $ docker network create grid $ docker run -d -p 4444:4444 -p 6900:5900 --net grid --name selenium --shm-size="2g" selenium/standalone-chrome:4.14.1-20231020 -$ docker run -d --net grid --name video -v /tmp/videos:/videos selenium/video:ffmpeg-4.3.1-20231020 +$ docker run -d --net grid --name video -v /tmp/videos:/videos selenium/video:ffmpeg-6.0-20231020 # Run your tests $ docker stop video && docker rm video $ docker stop selenium && docker rm selenium @@ -547,7 +547,7 @@ configs = [ # Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue. url = "http://127.0.0.1:2375" # Docker image used for video recording -video-image = "selenium/video:ffmpeg-4.3.1-20231020" +video-image = "selenium/video:ffmpeg-6.0-20231020" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values @@ -678,7 +678,7 @@ configs = [ # Linux: varies from machine to machine, please mount /var/run/docker.sock. If this does not work, please create an issue. url = "http://127.0.0.1:2375" # Docker image used for video recording -video-image = "selenium/video:ffmpeg-4.3.1-20231020" +video-image = "selenium/video:ffmpeg-6.0-20231020" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values diff --git a/Video/Dockerfile b/Video/Dockerfile index 4edc5a64af..bfd121903d 100644 --- a/Video/Dockerfile +++ b/Video/Dockerfile @@ -1,38 +1,29 @@ -FROM jrottenberg/ffmpeg:4.3.1-ubuntu2004 +FROM jrottenberg/ffmpeg:6.0-alpine LABEL authors="Selenium " -#================================================ -# Customize sources for apt-get -#================================================ -RUN echo "deb http://archive.ubuntu.com/ubuntu focal main universe\n" > /etc/apt/sources.list \ - && echo "deb http://archive.ubuntu.com/ubuntu focal-updates main universe\n" >> /etc/apt/sources.list \ - && echo "deb http://security.ubuntu.com/ubuntu focal-security main universe\n" >> /etc/apt/sources.list - -# No interactive frontend during docker build -ENV DEBIAN_FRONTEND=noninteractive \ - DEBCONF_NONINTERACTIVE_SEEN=true - #======================== # Supervisor #======================== -RUN apt-get -qqy update \ - && apt-get upgrade -yq \ - && apt-get -qqy --no-install-recommends install \ - supervisor x11-xserver-utils x11-utils curl jq python3-pip \ - && python3 -m pip install --upgrade pip \ - && python3 -m pip install --upgrade setuptools \ - && python3 -m pip install --upgrade wheel \ - && rm -rf /var/lib/apt/lists/* /var/cache/apt/* +RUN apk update \ + && apk upgrade \ + && apk add --no-cache --update --virtual .build-deps supervisor bash curl jq xset python3 py3-psutil py3-pip \ + && ln -sf python3 /usr/bin/python \ + && rm -rf /tmp/* /var/cache/apk/* + +ENV PYTHONUNBUFFERED=1 +RUN python3 -m pip install --no-cache --upgrade --no-cache-dir pip urllib3 setuptools requests wheel #====================================== # Add Supervisor configuration files #====================================== +ENV SE_VIDEO_FOLDER /videos +RUN mkdir -p /opt/bin/ +RUN mkdir -p /var/run/supervisor /var/log/supervisor ${SE_VIDEO_FOLDER} + COPY supervisord.conf /etc COPY entry_point.sh video.sh video_ready.py /opt/bin/ -RUN cd /opt/bin && pip install psutil - -RUN mkdir -p /var/run/supervisor /var/log/supervisor /videos +RUN chmod +x /opt/bin/* ENTRYPOINT ["/opt/bin/entry_point.sh"] CMD ["/opt/bin/entry_point.sh"] @@ -44,6 +35,5 @@ ENV SE_FRAME_RATE 15 ENV SE_CODEC libx264 ENV SE_PRESET "-preset ultrafast" ENV FILE_NAME video.mp4 -ENV SE_VIDEO_FOLDER /videos EXPOSE 9000 diff --git a/docker-compose-v3-video.yml b/docker-compose-v3-video.yml index fae5921a5d..f5f9502e51 100644 --- a/docker-compose-v3-video.yml +++ b/docker-compose-v3-video.yml @@ -34,7 +34,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 chrome_video: - image: selenium/video:ffmpeg-4.3.1-20231020 + image: selenium/video:ffmpeg-6.0-20231020 volumes: - /tmp/videos:/videos depends_on: @@ -44,7 +44,7 @@ services: - FILE_NAME=chrome_video.mp4 edge_video: - image: selenium/video:ffmpeg-4.3.1-20231020 + image: selenium/video:ffmpeg-6.0-20231020 volumes: - /tmp/videos:/videos depends_on: @@ -54,7 +54,7 @@ services: - FILE_NAME=edge_video.mp4 firefox_video: - image: selenium/video:ffmpeg-4.3.1-20231020 + image: selenium/video:ffmpeg-6.0-20231020 volumes: - /tmp/videos:/videos depends_on: diff --git a/generate_release_notes.sh b/generate_release_notes.sh index 014f561565..c936c48d4c 100755 --- a/generate_release_notes.sh +++ b/generate_release_notes.sh @@ -17,7 +17,7 @@ CHROMEDRIVER_VERSION=$(docker run --rm selenium/node-chrome:${TAG_VERSION} chrom EDGEDRIVER_VERSION=$(docker run --rm selenium/node-edge:${TAG_VERSION} msedgedriver --version | awk '{print $4}') FIREFOX_VERSION=$(docker run --rm selenium/node-firefox:${TAG_VERSION} firefox --version | awk '{print $3}') GECKODRIVER_VERSION=$(docker run --rm selenium/node-firefox:${TAG_VERSION} geckodriver --version | awk 'NR==1{print $2}') -FFMPEG_VERSION=$(docker run --entrypoint="" --rm selenium/video:ffmpeg-4.3.1-${BUILD_DATE} ffmpeg -version | awk '{print $3}' | head -n 1) +FFMPEG_VERSION=$(docker run --entrypoint="" --rm selenium/video:ffmpeg-6.0-${BUILD_DATE} ffmpeg -version | awk '{print $3}' | head -n 1) echo "" >> release_notes.md