Skip to content

Commit 874ed33

Browse files
committed
Quality is ignored for the MJPEG video encoder (but not the JPEG image encoder)
1 parent 949421b commit 874ed33

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

docs/fov.rst

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -859,12 +859,11 @@ influence the camera's behaviour.
859859
The Still Port
860860
--------------
861861

862-
Whenever the still port is used to capture images, it (briefly)
863-
forces the camera's mode to one of the two supported still modes (see
864-
:ref:`camera_modes`), meaning that images are captured using the full area of the
865-
sensor. It also uses a strong noise reduction algorithm on captured images so
866-
that they appear higher quality.
867-
.. They "appear" to be higher quality, or they "are" higher quality? This almost makes it seem like the images appear to be a higher quality than they actually are.
862+
Whenever the still port is used to capture images, it (briefly) forces the
863+
camera's mode to one of the two supported still modes (see
864+
:ref:`camera_modes`), meaning that images are captured using the full area of
865+
the sensor. It also uses a strong noise reduction algorithm on captured images
866+
so that they appear higher quality.
868867

869868
The still port is used by the various :meth:`~PiCamera.capture` methods when
870869
their *use_video_port* parameter is ``False`` (which it is by default).

picamera/camera.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1179,9 +1179,8 @@ def start_recording(
11791179
to maintain. For the ``'h264'`` format, use values between 10 and 40
11801180
where 10 is extremely high quality, and 40 is extremely low (20-25 is
11811181
usually a reasonable range for H.264 encoding). For the ``mjpeg``
1182-
format, use JPEG quality values between 1 and 100 (where higher
1183-
values are higher quality). Quality 0 is special and seems to be
1184-
a "reasonable quality" default.
1182+
format, the quality is ignored (it can be specified without error
1183+
though); *bitrate* alone controls the quality of the output.
11851184
11861185
* *quantization* - Deprecated alias for *quality*.
11871186

tests/test_record.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
RecordingCase('h264', '.h264', {'bitrate': 20000000, 'profile': 'main'}),
6363
RecordingCase('mjpeg', '.mjpg', {}),
6464
RecordingCase('mjpeg', '.mjpg', {'bitrate': 10000000}),
65-
RecordingCase('mjpeg', '.mjpg', {'bitrate': 0, 'quality': 20}),
65+
RecordingCase('mjpeg', '.mjpg', {'bitrate': 1000000}),
6666
) + tuple(
6767
RecordingCase(fmt, '.data', {})
6868
for fmt in RAW_FORMATS

0 commit comments

Comments
 (0)