Comments (6)
Okay, I can reproduce this; I'm not sure what the underlying error is yet but the lack of PiCameraError is definitely a bug which was introduced when I factored the encoder classes out into their own unit. Should be fixed shortly and it'll be included in 0.8. Many thanks for the well written bug report!
from picamera.
Ah, looks like I'd already got this on the issue list as #28 - anyway, I should be pushing a fix shortly
from picamera.
Pushing a fix for both problems, or just the "PiCameraError
not defined" one?
I'm trying to be clever and pipe the H264 output to some process. :)
from picamera.
The fix is specifically for the missing PiCameraError
. I can't reproduce the specific error of piping the output to another process; this is the code I used to test the process, which worked successfully (in as much as it wrote 5 seconds worth of video recording to a file, via a cat
process):
#!/usr/bin/env python
import io
import time
import picamera
from subprocess import Popen, PIPE
with picamera.PiCamera() as camera:
with io.open('foo.h264', 'wb') as output_file:
process = Popen(['cat', '-'], stdin=PIPE, stdout=output_file)
camera.start_preview()
time.sleep(2)
camera.start_recording(process.stdin, format='h264')
camera.wait_recording(5)
camera.stop_recording()
process.communicate()
from picamera.
Though, now I look at your example and my code it does occur to me that you will have to specify the format manually (the format='h264'
bit in my code) - otherwise the start_recording
method won't know how to configure the encoder. Admittedly at the moment, the only valid option is h264 but that's probably going to change in the near future to support MJPG streams.
from picamera.
Ill send my code to reproduce soon
On Dec 7, 2013 11:06 PM, "Dave Jones" [email protected] wrote:
Though, now I look at your example and my code it does occur to me that
you will have to specify the format manually (the format='h264' bit in my
code) - otherwise the start_recording method won't know how to configure
the encoder. Admittedly at the moment, the only valid option is h264 but
that's probably going to change in the near future to support MJPG streams.—
Reply to this email directly or view it on GitHub.
from picamera.
Related Issues (20)
- Easy way to tap off frames pre-encoding
- python3-picamera package depends on python3-numpy
- What is the default intra-frame period? HOT 2
- Limited running time HOT 1
- Not supported in bullseye Raspberry Pi OS version HOT 3
- Jumping exposure time on Raspberry Pi HQ camera HOT 1
- [Docmentation] How to find out the Bayer pattern from the CFA layout HOT 2
- Can one access both frames from the OPQV-dual stream and output the difference in real time? HOT 2
- libmmal.so: cannot open shared object file: No such file or directory HOT 6
- Frame freezes whilst try display/save high resolution frame HOT 1
- shutter_speed TypeError HOT 12
- Cannot install on development machine
- No such file or directory HOT 1
- PiCamera start_preview blocks indefinitely
- Realtime Motion Detection Latency
- Camera eposure time doubled from shutter speed?
- Is the `PiBayerArray.flush` method unpacking data correctly?
- 4.16. Raw Bayer data captures - Example Code - Assertion Error
- mjk
- stereo mode: how to switch camera sides HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from picamera.