- def update_size_display() -> Any:
- try:
- size = summarize_size(os.stat(filename).st_size)
- except FileNotFoundError:
- size = '--'
- size_display.set_label(f'<big>{size}</big>')
- return GLib.SOURCE_REMOVE if recording is None else GLib.SOURCE_CONTINUE
- GLib.timeout_add_seconds(1, update_size_display)
-
- command = (['ffmpeg', '-framerate', '25'] + video_source(stack) +
- ['-f', 'pulse', '-ac', '2', '-i', 'default', filename])
- # pylint: disable=consider-using-with
- recording = Recording(
- process=subprocess.Popen(command, stdin=subprocess.PIPE))