From 3561658404ac92306131307d4ddecae3f1135b12 Mon Sep 17 00:00:00 2001 From: Viet Nguyen Duc Date: Sat, 4 May 2024 13:14:35 +0000 Subject: [PATCH] update: Rollback FFmpeg v6.1.1 Signed-off-by: Viet Nguyen Duc --- Makefile | 12 ++++++------ NodeDocker/config.toml | 2 +- README.md | 14 +++++++++----- charts/selenium-grid/README.md | 30 +++++++++++++++--------------- charts/selenium-grid/values.yaml | 4 ++-- docker-compose-v3-video-upload.yml | 6 +++--- docker-compose-v3-video.yml | 6 +++--- tests/SeleniumTests/__init__.py | 12 ++++++++---- 8 files changed, 47 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index 2dc9a53c1..e08272d08 100644 --- a/Makefile +++ b/Makefile @@ -17,9 +17,9 @@ 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-7.0) -FFMPEG_BASED_NAME := $(or $(FFMPEG_BASED_NAME),$(FFMPEG_BASED_NAME),ndviet) -FFMPEG_BASED_TAG := $(or $(FFMPEG_BASED_TAG),$(FFMPEG_BASED_TAG),7.0-ubuntu2204) +FFMPEG_TAG_VERSION := $(or $(FFMPEG_TAG_VERSION),$(FFMPEG_TAG_VERSION),ffmpeg-6.1.1) +FFMPEG_BASED_NAME := $(or $(FFMPEG_BASED_NAME),$(FFMPEG_BASED_NAME),linuxserver) +FFMPEG_BASED_TAG := $(or $(FFMPEG_BASED_TAG),$(FFMPEG_BASED_TAG),version-6.1.1-cli) PLATFORMS := $(or $(PLATFORMS),$(PLATFORMS),linux/amd64) all: hub \ @@ -476,9 +476,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 -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) -v error -i ./tests/videos/chrome_video.mp4 -f null - 2>error.log - docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log - docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log + docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) --entrypoint="" $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) ffmpeg -v error -i ./tests/videos/chrome_video.mp4 -f null - 2>error.log + docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) --entrypoint="" $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) ffmpeg -v error -i ./tests/videos/firefox_video.mp4 -f null - 2>error.log + docker run -u $$(id -u) -v $$(pwd):$$(pwd) -w $$(pwd) --entrypoint="" $(FFMPEG_BASED_NAME)/ffmpeg:$(FFMPEG_BASED_TAG) ffmpeg -v error -i ./tests/videos/edge_video.mp4 -f null - 2>error.log test_node_docker: hub standalone_docker standalone_chrome standalone_firefox standalone_edge video sudo rm -rf ./tests/tests diff --git a/NodeDocker/config.toml b/NodeDocker/config.toml index ca033ec13..8f2a5f571 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-7.0-20240425" +video-image = "selenium/video:ffmpeg-6.1.1-20240425" # 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 0016c5438..d90216560 100644 --- a/README.md +++ b/README.md @@ -512,7 +512,7 @@ ___ ## Video recording -Tests execution can be recorded by using the `selenium/video:ffmpeg-7.0-20240425` +Tests execution can be recorded by using the `selenium/video:ffmpeg-6.1.1-20240425` 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. @@ -523,6 +523,10 @@ The video Docker image we provide is based on the ffmpeg Ubuntu image provided b [jrottenberg/ffmpeg](https://github.com/jrottenberg/ffmpeg) project, thank you for providing this image and simplifying our work :tada: +From image tag based `4.20.0` onwards, the video Docker image is based on the FFmpeg Ubuntu image provided by +[linuxserver/docker-ffmpeg](https://github.com/linuxserver/docker-ffmpeg) project since the image is available for multi-platform. +Thank you for simplifying our project and helping us move forward with multiple architecture support. + **Notes**: - If you have questions or feedback, please use the community contact points shown [here](https://www.selenium.dev/support/). - Please report any bugs through GitHub [issues](https://github.com/SeleniumHQ/docker-selenium/issues/new/choose), and provide @@ -539,7 +543,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.20.0-20240425 -$ docker run -d --net grid --name video -v /tmp/videos:/videos selenium/video:ffmpeg-7.0-20240425 +$ docker run -d --net grid --name video -v /tmp/videos:/videos selenium/video:ffmpeg-6.1.1-20240425 # Run your tests $ docker stop video && docker rm video $ docker stop selenium && docker rm selenium @@ -559,7 +563,7 @@ Besides the video recording mentioned above, you can enable the upload functiona version: "3" services: chrome_video: - image: selenium/video:nightly + image: selenium/video:ffmpeg-6.1.1-20240425 depends_on: - chrome environment: @@ -630,7 +634,7 @@ host-config-keys = ["Dns", "DnsOptions", "DnsSearch", "ExtraHosts", "Binds"] # 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-7.0-20240425" +video-image = "selenium/video:ffmpeg-6.1.1-20240425" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values @@ -765,7 +769,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-7.0-20240425" +video-image = "selenium/video:ffmpeg-6.1.1-20240425" # Uncomment the following section if you are running the node on a separate VM # Fill out the placeholders with appropriate values diff --git a/charts/selenium-grid/README.md b/charts/selenium-grid/README.md index 0fec9e60f..9a579b8b5 100644 --- a/charts/selenium-grid/README.md +++ b/charts/selenium-grid/README.md @@ -299,20 +299,20 @@ ingress-nginx: ### Configuration global For now, global configuration supported is: -| Parameter | Default | Description | -|-------------------------------------------------|-----------------------|-------------------------------------------| -| `global.K8S_PUBLIC_IP` | `""` | Public IP of the host running K8s | -| `global.seleniumGrid.imageRegistry` | `selenium` | Distribution registry to pull images | -| `global.seleniumGrid.imageTag` | `4.20.0-20240425` | Image tag for all selenium components | -| `global.seleniumGrid.nodesImageTag` | `4.20.0-20240425` | Image tag for browser's nodes | -| `global.seleniumGrid.videoImageTag` | `ffmpeg-7.0-20240425` | Image tag for browser's video recorder | -| `global.seleniumGrid.imagePullSecret` | `""` | Pull secret to be used for all images | -| `global.seleniumGrid.imagePullSecret` | `""` | Pull secret to be used for all images | -| `global.seleniumGrid.affinity` | `{}` | Affinity assigned globally | -| `global.seleniumGrid.logLevel` | `INFO` | Set log level for all components | -| `global.seleniumGrid.defaultNodeStartupProbe` | `exec` | Default startup probe method in Nodes | -| `global.seleniumGrid.defaultNodeLivenessProbe` | `exec` | Default liveness probe method in Nodes | -| `global.seleniumGrid.stdoutProbeLog` | `true` | Enable probe logs output in kubectl logs | +| Parameter | Default | Description | +|------------------------------------------------|-------------------------|------------------------------------------| +| `global.K8S_PUBLIC_IP` | `""` | Public IP of the host running K8s | +| `global.seleniumGrid.imageRegistry` | `selenium` | Distribution registry to pull images | +| `global.seleniumGrid.imageTag` | `4.20.0-20240425` | Image tag for all selenium components | +| `global.seleniumGrid.nodesImageTag` | `4.20.0-20240425` | Image tag for browser's nodes | +| `global.seleniumGrid.videoImageTag` | `ffmpeg-6.1.1-20240425` | Image tag for browser's video recorder | +| `global.seleniumGrid.imagePullSecret` | `""` | Pull secret to be used for all images | +| `global.seleniumGrid.imagePullSecret` | `""` | Pull secret to be used for all images | +| `global.seleniumGrid.affinity` | `{}` | Affinity assigned globally | +| `global.seleniumGrid.logLevel` | `INFO` | Set log level for all components | +| `global.seleniumGrid.defaultNodeStartupProbe` | `exec` | Default startup probe method in Nodes | +| `global.seleniumGrid.defaultNodeLivenessProbe` | `exec` | Default liveness probe method in Nodes | +| `global.seleniumGrid.stdoutProbeLog` | `true` | Enable probe logs output in kubectl logs | #### Configuration `global.K8S_PUBLIC_IP` @@ -845,7 +845,7 @@ This table contains the configuration parameters of the chart and their default | `videoRecorder.enabled` | `false` | Enable video recorder for node | | `videoRecorder.imageRegistry` | `nil` | Distribution registry to pull the image (this overwrites `.global.seleniumGrid.imageRegistry` value) | | `videoRecorder.imageName` | `video` | Selenium video recorder image name | -| `videoRecorder.imageTag` | `ffmpeg-7.0-20240425` | Image tag of video recorder | +| `videoRecorder.imageTag` | `ffmpeg-6.1.1-20240425` | Image tag of video recorder | | `videoRecorder.imagePullPolicy` | `IfNotPresent` | Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) | | `videoRecorder.uploader.enabled` | `false` | Enable the uploader for videos | | `videoRecorder.uploader.destinationPrefix` | `` | Destination for uploading video file. It is following `rclone` config | diff --git a/charts/selenium-grid/values.yaml b/charts/selenium-grid/values.yaml index f9ee8f1e4..013fd0477 100644 --- a/charts/selenium-grid/values.yaml +++ b/charts/selenium-grid/values.yaml @@ -11,7 +11,7 @@ global: # Image tag for browser's nodes nodesImageTag: 4.20.0-20240425 # Image tag for browser's video recorder - videoImageTag: ffmpeg-7.0-20240425 + videoImageTag: ffmpeg-6.1.1-20240425 # kubectl image is used to execute kubectl commands in utility jobs kubectlImage: bitnami/kubectl:latest # Pull secret for all components, can be overridden individually @@ -1107,7 +1107,7 @@ videoRecorder: # Image of video recorder imageName: video # Image of video recorder - # imageTag: ffmpeg-7.0-20240425 + # imageTag: ffmpeg-6.1.1-20240425 # Image pull policy (see https://kubernetes.io/docs/concepts/containers/images/#updating-images) imagePullPolicy: IfNotPresent # Image pull secret (see https://kubernetes.io/docs/tasks/configure-pod-container/pull-image-private-registry/) diff --git a/docker-compose-v3-video-upload.yml b/docker-compose-v3-video-upload.yml index 6cd7b0a57..373f9bdf4 100644 --- a/docker-compose-v3-video-upload.yml +++ b/docker-compose-v3-video-upload.yml @@ -35,7 +35,7 @@ services: - SE_EVENT_BUS_SUBSCRIBE_PORT=4443 chrome_video: - image: selenium/video:ffmpeg-7.0-20240425 + image: selenium/video:ffmpeg-6.1.1-20240425 depends_on: - chrome environment: @@ -56,7 +56,7 @@ services: - RCLONE_CONFIG_S3_NO_CHECK_BUCKET=true edge_video: - image: selenium/video:ffmpeg-7.0-20240425 + image: selenium/video:ffmpeg-6.1.1-20240425 depends_on: - edge environment: @@ -77,7 +77,7 @@ services: - RCLONE_CONFIG_S3_NO_CHECK_BUCKET=true firefox_video: - image: selenium/video:ffmpeg-7.0-20240425 + image: selenium/video:ffmpeg-6.1.1-20240425 depends_on: - firefox environment: diff --git a/docker-compose-v3-video.yml b/docker-compose-v3-video.yml index d29ce871a..926955d7c 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-7.0-20240425 + image: selenium/video:ffmpeg-6.1.1-20240425 volumes: - /tmp/videos:/videos depends_on: @@ -44,7 +44,7 @@ services: - FILE_NAME=chrome_video.mp4 edge_video: - image: selenium/video:ffmpeg-7.0-20240425 + image: selenium/video:ffmpeg-6.1.1-20240425 volumes: - /tmp/videos:/videos depends_on: @@ -54,7 +54,7 @@ services: - FILE_NAME=edge_video.mp4 firefox_video: - image: selenium/video:ffmpeg-7.0-20240425 + image: selenium/video:ffmpeg-6.1.1-20240425 volumes: - /tmp/videos:/videos depends_on: diff --git a/tests/SeleniumTests/__init__.py b/tests/SeleniumTests/__init__.py index a292d1860..e55ab6da7 100644 --- a/tests/SeleniumTests/__init__.py +++ b/tests/SeleniumTests/__init__.py @@ -68,15 +68,19 @@ def test_visit_basic_auth_secured_page(self): def test_play_video(self): driver = self.driver - driver.get('https://hls-js.netlify.com/demo/') + driver.get('https://docs.flowplayer.com/tools/stream-tester') wait = WebDriverWait(driver, WEB_DRIVER_WAIT_TIMEOUT) - video = wait.until( - EC.element_to_be_clickable((By.TAG_NAME, 'video')) + play_button = wait.until( + EC.element_to_be_clickable((By.TAG_NAME, 'flowplayer-play-icon')) ) - video.click() + play_button.click() + video = driver.find_element(By.TAG_NAME, 'video') wait.until( lambda d: d.find_element(By.TAG_NAME, 'video').get_property('currentTime') ) + wait.until( + lambda d: d.find_element(By.TAG_NAME, 'video').get_property('paused') == False + ) paused = video.get_property('paused') self.assertFalse(paused)