Skip to content
New issue

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

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

Already on GitHub? # to your account

Docs for simple video recording solution? #148

Closed
geekdave opened this issue Jan 14, 2016 · 4 comments
Closed

Docs for simple video recording solution? #148

geekdave opened this issue Jan 14, 2016 · 4 comments

Comments

@geekdave
Copy link

I've seen a few mentions of people rolling their own video recording solution using this project.

Just wondering if enough best practices exist to either create some docs, or possibly just rattle off some suggested packages to stitch together to make this possible.

We're currently relying exclusively on Browser-as-a-Service vendors, and would like to augment with our own internal browser farm. The video recording piece is a huge value-add of the vendor service.

Thanks!

@dtinth
Copy link

dtinth commented Feb 7, 2017

Here’s how we at @taskworld managed to perform video recording into an MP4 file using docker-selenium.

Install FFmpeg and MP4Box

Create a new image based off docker-selenium and install ffmpeg and gpac:

apt-get update && apt-get install -y ffmpeg gpac && rm -rf /var/lib/apt/lists/*
  • FFmpeg is used to record the screen
  • MP4Box (from package gpac) is used to clean up the recorded file

Take screen recording

Use docker exec -ti bash to spawn a new shell inside a running container. Run this command to record the video:

ffmpeg -video_size 1360x1020 -framerate 15 -f x11grab -i :99.0 /path/to/recording.mp4

Clean up the MP4 file

I might be wrong, but after ffmpeg recorded the video, the generated file is not optimized for HTTP streaming. For example, the video will not start until fully loaded and seeking will not work, etc. MP4Box is used to fix this:

MP4Box -isma -inter 500 /path/to/recording.mp4

Hope this helps! Cheers :D

@elgalu
Copy link
Member

elgalu commented Feb 8, 2017

Thanks for pointing to MP4Box @dtinth I successfully implemented it and seems to have fixed my bad-ending-time video issues on Zalenium

@elgalu
Copy link
Member

elgalu commented Apr 28, 2017

Should we keep this issue open @ddavison ? I think if we agree to leave video recording out of the scope of this project we can close this one.

Users can still get video recording by using Zalenium

@diemol has even implemented per-test video recording so you can pass the capability recordVideo: 'true' which is even compatible with Sauce Labs and enable/disable videos per tests:

capabilities: {
    browserName: 'chrome',
    screenResolution: '1680x1050',

    // Record video in Zalenium?
    recordVideo: 'true'
}

@ddavison
Copy link
Member

correct, we won't be putting video recording in these images

@lock lock bot locked and limited conversation to collaborators Aug 14, 2019
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants