Skip to content

Instantly share code, notes, and snippets.

@BonsaiDen
Last active September 3, 2023 10:12
Show Gist options
  • Save BonsaiDen/71209a0867d2da2ba8c8 to your computer and use it in GitHub Desktop.
Save BonsaiDen/71209a0867d2da2ba8c8 to your computer and use it in GitHub Desktop.
Record from Virtual Frame Buffer via ffmpeg
xvfb-run -s "-screen 0 1280x800x16" -e /dev/stdout -a /home/ivo/Desktop/foo.sh
./ffmpeg -r 30 -f x11grab -draw_mouse 0 -s 1280x800 -i :99 -c:v libvpx -quality realtime -cpu-used 0 -b:v 384k -qmin 10 -qmax 42 -maxrate 384k -bufsize 1000k -an screen.webm
# foo.sh
google-chrome --incognito --window-size=1280,800 --app=http://github.com
@lsoica
Copy link

lsoica commented Jan 1, 2019

Were you able to get a mouse cursor with xvfb in your recordings ? (something -draw_mouse 1 should achieve, just that I'm not able to get it working)

@umeshs88
Copy link

I get these errors on ubuntu20.4

[26646:26695:0731/064953.009382:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[26646:26695:0731/064953.009426:ERROR:bus.cc(393)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[26646:26716:0731/064953.085092:ERROR:object_proxy.cc(622)] Failed to call method: org.freedesktop.DBus.Properties.Get: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[26646:26716:0731/064953.085444:ERROR:object_proxy.cc(622)] Failed to call method: org.freedesktop.UPower.GetDisplayDevice: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
[26646:26716:0731/064953.085726:ERROR:object_proxy.cc(622)] Failed to call method: org.freedesktop.UPower.EnumerateDevices: object_path= /org/freedesktop/UPower: org.freedesktop.DBus.Error.ServiceUnknown: The name org.freedesktop.UPower was not provided by any .service files
libva error: vaGetDriverNameByIndex() failed with unknown libva error, driver_name = (null)
[26693:26693:0731/064953.177171:ERROR:viz_main_impl.cc(162)] Exiting GPU process due to errors during initialization
[26792:26792:0731/064953.247597:ERROR:gpu_init.cc(441)] Passthrough is not supported, GL is swiftshader

Any inputs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment