Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improves MJPEG video encoding #179

Merged
merged 1 commit into from Nov 29, 2014
Merged

Conversation

andyg24
Copy link

@andyg24 andyg24 commented Nov 8, 2014

As discussed in raspberrypi/userland#208, the MJPEG encoder may deadlock
if the FIFO is full on shutdown. This change increases the encoder buffer size,
which helps to keep the FIFO size down.

With this change, the following program exits cleanly. Previously, it would
lock up the camera, requiring a reboot.

import picamera
import time

camera = picamera.PiCamera()
camera.resolution = (1296, 972)
camera.framerate = 15

camera.start_recording('test.mjpeg', format='mjpeg', quality=0)
time.sleep(5)
camera.stop_recording()

raspberrypi/userland#208, the MJPEG encoder may deadlock
if the FIFO is full on shutdown. This change increases the encoder buffer size,
which helps to keep the FIFO size down.

With this change, the following program exits cleanly. Previously, it would
lock up the camera, requiring a reboot.

import picamera
import time

camera = picamera.PiCamera()
camera.resolution = (1296, 972)
camera.framerate = 15

camera.start_recording('test.mjpeg', format='mjpeg', quality=0)
time.sleep(5)
camera.stop_recording()
waveform80 added a commit that referenced this pull request Nov 29, 2014
Improves MJPEG video encoding
@waveform80 waveform80 merged commit f60cc99 into waveform80:master Nov 29, 2014
@waveform80
Copy link
Owner

Excellent - many thanks for the PR!

@waveform80 waveform80 added this to the 1.9 milestone Jan 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants