def METHOD_NAME(self):
    self.recording = False
    window.fps_counter.enabled = True
    window.exit_button.visible = True
    print('stop recording')
    # self.convert_to_gif()
    # command = 'ffmpeg -framerate 60 -f image2 -i video_temp/%04d.png -c:v libvpx-vp9 -pix_fmt yuva420p untitled_video.webm'
    command = f'ffmpeg -framerate 60 -f image2 -i {self.file_path}/untitled_video_%04d.png {self.video_name}.mp4'
    result = subprocess.Popen(command, shell=True)
    application.calculate_dt = True
    # print('converting to video:', result)
    print('saved webm to:', Path(f'{self.file_path.parent}/{self.video_name}.webm'))