Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to configure video-image? #2022

Closed
alxweis opened this issue Nov 22, 2023 · 7 comments
Closed

How to configure video-image? #2022

alxweis opened this issue Nov 22, 2023 · 7 comments

Comments

@alxweis
Copy link

alxweis commented Nov 22, 2023

What happened?

My Setup

docker-compose.yml

version: "3"
services:
  node-docker:
    image: selenium/node-docker:4.15.0-20231110
    volumes:
      - ./assets:/opt/selenium/assets
      - ./config.toml:/opt/bin/config.toml
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - selenium-hub
    environment:
      - SE_EVENT_BUS_HOST=selenium-hub
      - SE_EVENT_BUS_PUBLISH_PORT=4442
      - SE_EVENT_BUS_SUBSCRIBE_PORT=4443
    shm_size: 2gb

  selenium-hub:
    image: selenium/hub:4.15.0-20231110
    container_name: selenium-hub
    ports:
      - "4442:4442"
      - "4443:4443"
      - "4444:4444"

config.toml

[docker]
configs = [
    "selenium/standalone-chrome:100.0", "{\"browserName\": \"chrome\", \"browserVersion\": \"100.0\"}",
    "selenium/standalone-chrome:93.0", "{\"browserName\": \"chrome\", \"browserVersion\": \"93.0\"}"
]

url = "http://127.0.0.1:2375"
video-image = "selenium/video:ffmpeg-4.3.1-20231016"

Description

With the Simple Grid, a separate video container is started for each node container. The ENV variables of the video containers can therefore easily be adjusted in docker-compose.yml.

With the Dynamic Grid, however, the video image is only referenced in the config.toml so that it can be used for test sessions.
So the question for me is whether it is possible to set ENV variables for these video containers, for example the frame rate or the name of the video file?

Below is an image of a video container in Docker desktop with SE_ ENV variables that may be able to be set.
image

Command used to start Selenium Grid with Docker

docker-compose up

Relevant log output

NA

Operating System

Windows 10

Docker Selenium version (tag)

4.15.0-20231110

Copy link

@alxweis, thank you for creating this issue. We will troubleshoot it as soon as we can.


Info for maintainers

Triage this issue by using labels.

If information is missing, add a helpful comment and then I-issue-template label.

If the issue is a question, add the I-question label.

If the issue is valid but there is no time to troubleshoot it, consider adding the help wanted label.

If the issue requires changes or fixes from an external project (e.g., ChromeDriver, GeckoDriver, MSEdgeDriver, W3C), add the applicable G-* label, and it will provide the correct link and auto-close the issue.

After troubleshooting the issue, please add the R-awaiting answer label.

Thank you!

@diemol
Copy link
Member

diemol commented Nov 22, 2023

Why would you want to set it through an environment variable?

@alxweis
Copy link
Author

alxweis commented Nov 22, 2023

Because I thought that's how it had to be done. Refering to

you can set static properties for containers via ENV variables. Or are there other ways to set these variables for video container?

@diemol
Copy link
Member

diemol commented Nov 23, 2023

You can set everything via flags or environment variables https://www.selenium.dev/documentation/grid/configuration/cli_options/#docker.

For this use case, we recommend using a config.toml because it makes the configuration more straightforward to handle.

If you have more questions, I will leave some links below, including our Slack channel.

Copy link

💬 Please ask questions at:

@alxweis
Copy link
Author

alxweis commented Nov 27, 2023

You can set everything via flags or environment variables https://www.selenium.dev/documentation/grid/configuration/cli_options/#docker.

For this use case, we recommend using a config.toml because it makes the configuration more straightforward to handle.

If you have more questions, I will leave some links below, including our Slack channel.

Thank you for your response!
You can only specify the version of docker-video-image in the CLI options, but you cannot edit further options of the video container like SE_FRAME_RATE.
So is there another way to set SE_FRAME_RATE for video container or is it just not supported?

Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants