elgalu / docker-selenium

[NOT MAINTAINED] Please use <https://github.com/SeleniumHQ/docker-selenium>
https://github.com/SeleniumHQ/docker-selenium
Other
1.42k stars 334 forks source link

How to record a video without compression ? #323

Closed arman-sydikov closed 5 years ago

arman-sydikov commented 5 years ago

How to record a video without compression ?

I have enough space in hard disk and limited CPU, so I don't want to waste CPU on video compression, I have a scheduled task on a separate machine that will handle video compression.

I tried FFMPEG_CODEC_ARGS=copy and FFMPEG_CODEC_ARGS=, but none of these work.

Operating System

Linux GDais00016 3.10.0-327.el7.x86_64 #1 SMP Thu Nov 19 22:10:57 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

Image version

3.141.59-p13

Docker version

Docker version 18.09.1, build 4c52b90

arman-sydikov commented 5 years ago

https://trac.ffmpeg.org/wiki/Capture/Desktop

ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 -c:v libx264 -crf 0 -preset ultrafast output.mkv

-crf 0 tells x264 to encode in lossless mode; -preset ultrafast advises it to do so fast.

Actually https://github.com/elgalu/docker-selenium#record-videos contains the information about how to set these options with FFMPEG_CODEC_ARGS, I just didn't know that example in README is for lossless recording.

diemol commented 5 years ago

Thanks for figuring it out and posting it as a comment @algakzru