Skip to content

Commit

Permalink
Increase FFmpeg thread queue sizes
Browse files Browse the repository at this point in the history
This seems to work better on lower-powered Pis.

Signed-off-by: David Plowman <[email protected]>
  • Loading branch information
davidplowman committed Jan 2, 2024
1 parent 54c279c commit 19c3144
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions picamera2/outputs/ffmpegoutput.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def start(self):
# ideal because we're likely to pick up some jitter, but works passably, and I
# don't have a better alternative right now.
video_input = ['-use_wallclock_as_timestamps', '1',
'-thread_queue_size', '32', # necessary to prevent warnings
'-thread_queue_size', '64', # necessary to prevent warnings
'-i', '-']
video_codec = ['-c:v', 'copy']
audio_input = []
Expand All @@ -65,7 +65,7 @@ def start(self):
audio_input = ['-itsoffset', str(self.audio_sync),
'-f', 'pulse',
'-sample_rate', str(self.audio_samplerate),
'-thread_queue_size', '512', # necessary to prevent warnings
'-thread_queue_size', '1024', # necessary to prevent warnings
'-i', self.audio_device]
audio_codec = ['-b:a', str(self.audio_bitrate),
'-c:a', self.audio_codec]
Expand Down

0 comments on commit 19c3144

Please sign in to comment.