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!
Here鈥檚 how we at @taskworld managed to perform video recording into an MP4 file using docker-selenium.
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/*
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
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
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'
}
correct, we won't be putting video recording in these images
Most helpful comment
Here鈥檚 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
ffmpegandgpac:Take screen recording
Use
docker exec -ti bashto spawn a new shell inside a running container. Run this command to record the video: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:
Hope this helps! Cheers :D