- command = (['ffmpeg', '-framerate', '25'] + video_source(stack) +
- ['-f', 'pulse', '-ac', '2', '-i', 'default', filename])
- # pylint: disable=consider-using-with
- recording = Recording(
- filename=filename,
- process=subprocess.Popen(command, stdin=subprocess.PIPE))
+
+def on_start_recording(_: Gtk.Button, stack: Gtk.Stack) -> None:
+ global recording # pylint: disable=global-statement
+ assert recording is None
+
+ filename = make_filename()
+ begin_monitoring_file_size(find_size_display(stack), filename)
+
+ recording = Stream.start(
+ ['ffmpeg', '-framerate', '25'] + video_source(stack) +
+ ['-f', 'pulse', '-ac', '2', '-i', 'default', filename])