My goal is to have a Ubuntu (Desktop) server that "just" converts html5 web pages to video. I want to capture smooth css and js animations.
So far I have tried this: (phantomjs)
https://gist.github.com/phanan/e03f75082e6eb114a35c
Timing and frame rate are too fast or fast.
My best solution is to open a Google Chrome window in kiosk mode, wait 3 seconds, and then burn via ffmpeg using x11grab. It is like a “bloated” and unprofessional decision.
program.sh
#!/bin/bash
duration=$1
outputFile=$2
stop=$(($duration+5))
./openBrowser.sh $stop & PIDOIS=$!
./recScreen.sh $duration $outputFile & PIDMIX=$!
wait $PIDIOS
wait $PIDMIX
recScreen.sh
#!/bin/bash
sleep 3
ffmpeg -video_size 1920x1080 -framerate 30 -f x11grab -i :0.0 -c:v libx264 -qp 0 -preset ultrafast -t "$1" "$2".mkv
killall -9 chrome
openBrowser.sh
#!/bin/bash
/usr/bin/google-chrome --kiosk --incognito http://localhost/testanimation
Can this be done differently? Perhaps a virtual display? (must have a GPU, though). It should be like a desktop server, so I don't need pop-ups or error messages from the OS (since they will be recorded in the video ...)