Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion picamera2/encoders/h264_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def _start(self):

# The output objects may need to know what kind of stream this is.
for out in self._output:
out._add_stream("video", "h264")
out._add_stream("video", "h264", width=self._width, height=self._height)

super()._start()

Expand Down
2 changes: 1 addition & 1 deletion picamera2/encoders/libav_h264_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def _start(self):
self._stream.pix_fmt = "yuv420p"

for out in self._output:
out._add_stream(self._stream, self._codec, rate=self.framerate)
out._add_stream(self._stream, self._codec, rate=self.framerate, width=self.width, height=self.height)

preset = "ultrafast"
if self.profile is not None:
Expand Down
3 changes: 2 additions & 1 deletion picamera2/encoders/mjpeg_encoder.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def _setup(self, quality):
def _start(self):
# The output objects may need to know what kind of stream this is.
for out in self._output:
out._add_stream("video", "mjpeg", rate=30) # seem to need a rate to prevent timestamp warnings
# Seem to need a rate to prevent timestamp warnings.
out._add_stream("video", "mjpeg", rate=30, width=self.width, height=self.height)

super()._start()