Skip to content

Commit

Permalink
update: Rollback FFmpeg v6.1.1 (#2247)
Browse files Browse the repository at this point in the history
Signed-off-by: Viet Nguyen Duc <nguyenducviet4496@gmail.com>
  • Loading branch information
VietND96 committed May 4, 2024
1 parent 3f30189 commit b079935
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 39 deletions.
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion NodeDocker/config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
30 changes: 15 additions & 15 deletions charts/selenium-grid/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`

Expand Down Expand Up @@ -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 |
Expand Down
4 changes: 2 additions & 2 deletions charts/selenium-grid/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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/)
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-v3-video-upload.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
6 changes: 3 additions & 3 deletions docker-compose-v3-video.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand Down
12 changes: 8 additions & 4 deletions tests/SeleniumTests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit b079935

Please sign in to comment.