https://github.com/jonathonreinhart/spice-record
Record SPICE session output to MP4 video
https://github.com/jonathonreinhart/spice-record
libvirt mp4 qemu-kvm
Last synced: about 1 year ago
JSON representation
Record SPICE session output to MP4 video
- Host: GitHub
- URL: https://github.com/jonathonreinhart/spice-record
- Owner: JonathonReinhart
- License: mit
- Created: 2017-04-09T16:06:58.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2023-03-21T08:22:40.000Z (about 3 years ago)
- Last Synced: 2025-04-14T13:21:35.665Z (about 1 year ago)
- Topics: libvirt, mp4, qemu-kvm
- Language: Python
- Size: 82 KB
- Stars: 35
- Watchers: 4
- Forks: 8
- Open Issues: 14
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[spice-record]
============
This is a simple utility for recording a [SPICE] sesion to MP4 video.
It uses libvirt to connect to the VMs, `SpiceClientGLib` to access the graphics
device, and FFmpeg to encode MP4 videos.
## Usage
```
usage: spice-record [-h] [--vcodec VCODEC]
[--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}]
[-r FRAMERATE] [-c LIBVIRT_URI] [-o FILENAME]
DOMAIN-NAME|ID|UUID
positional arguments:
DOMAIN-NAME|ID|UUID Machine to record
optional arguments:
-h, --help show this help message and exit
--vcodec VCODEC Set the output video codec (see "ffmpeg -encoders" for
choices)
--loglevel {DEBUG,INFO,WARNING,ERROR,CRITICAL}
Set the logging level (default=WARNING)
-r FRAMERATE, --framerate FRAMERATE
-c LIBVIRT_URI, --connect LIBVIRT_URI
Connect to hypervisor (e.g. qemu:///system)
-o FILENAME, --output FILENAME
Output filename (defaults to .mp4)
```
## Requirements
- Python 3
- `libvirt-python` (not `libvirt-glib`)
- `spice-glib`
- `pygobject3`
- `ffmpeg`
If `virt-manager` is installed on a modern distro (which has ported all of its
Python apps to Python 3), then everything should already be installed, aside
from `ffmpeg`.
## Notes
Currently, the spice server only supports a single client connection. When
another connection is opened, the current one is disconnected. Thus, this
utility is limited in its usability as it cannot record a user interacting with
the VM, and only an automatic ongoing process. There is however, an
experimental feature to enable [multiple concurrent
connections][MultipleClients] to a single spice server.
[spice-record]: https://github.com/JonathonReinhart/spice-record
[SPICE]: https://www.spice-space.org/
[MultipleClients]: https://www.spice-space.org/multiple-clients.html