Recorder#
- class ignis.services.recorder.RecorderService(*args: Any, **kwargs: Any)#
A screen recorder. Uses XDG Desktop portal and PipeWire. Allow record screen with microphone audio and internal system audio.
- Dependencies:
GStreamer
PipeWire
gst-plugin-pipewire
gst-plugins-good
gst-plugins-ugly
pipewire-pulse: for audio recording.
- Raises:
GstNotFoundError -- If GStreamer is not found.
GstPluginNotFoundError -- If GStreamer plugin is not found.
Example usage:
from ignis.services.recorder import RecorderService from ignis.utils import Utils recorder = RecorderService.get_default() recorder.start_recording(record_internal_audio=True) # record for 30 seconds and then stop Utils.Timeout(ms=30 * 1000, target=recorder.stop_recording)
- recording_started()#
Signal
Emitted when recording starts.
- recording_stopped()#
Signal
Emitted when recording stops.
- property default_file_location: str#
read-write
The default location for saving recordings.
Default:
$HOME/Videos
.
- property default_filename: str#
read-write
The default filename for recordings. Supports time formating.
Default:
%Y-%m-%d_%H-%M-%S.mp4
- start_recording(path: str | None = None, record_microphone: bool = False, record_internal_audio: bool = False, audio_devices: list[str] | None = None) None #
Start recording.
- Parameters:
path (
str
|None
, default:None
) -- Recording path. It will overridedefault_file_location
anddefault_filename
properties.record_microphone (
bool
, default:False
) -- Whether record audio from microphone.record_internal_audio (
bool
, default:False
) -- Whether record internal audio.audio_devices (
list
[str
] |None
, default:None
) -- A list of audio devices names from which audio should be recorded.
- Return type: