Comments (4)
I was thinking something similar and grouping encoder_data together. I was actually thinking a static class with properties but a tuple would be a simpler implementation. I share your thoughts though that frame should probably be renamed.
from picamera.
FYI, a namedtuple (derived from tuple) basically is a static class with properties (its implementation in the collections module is a bit of a hack that involves eval()
but to be honest I couldn't come up with a better way of designing it :). Still, that sounds like the way to go - and makes future expansion of the facility easy as I can just extend the namedtuple with more fields.
What source of encoder data were you hoping to combine with this? If they're equally easy to grab I'm more than happy to extend the ticket to include them.
from picamera.
I see, namedtuple does sound like the way to go. Other data that springs to mind, although it might not be easily accessible:
- size, total size of the video
- length
- dropped frames
from picamera.
Size is certainly possible - I'll add properties for the size of the current frame and the total size of the video recorded so far (bytes). It should also be possible to add a property for the size of video since the last call to split_recording()
.
Isn't length (which I'm assuming is the duration of the video recorded so far) equivalent to PTS? I'll have to experiment with this a bit and see if the reading from the pts field in the buffer header starts to vary from the wall-clock.
Not sure about dropped frames - picamera itself has no facility for dropping frames in the case of over-run - it rather dumbly assumes that whatever stream the user gives it is capable of handling the throughput. As far as I'm aware there's no facility for asking MMAL if the encoder's dropped any frames either - but if you know of one I'm happy to look into it.
from picamera.
Related Issues (20)
- Empty rgb files written to disk HOT 2
- Corrupted H264 files when switching between ring buffers HOT 3
- picamera.exc.PiCameraMMALError: Failed to create MMAL component b'vc.camera_info': Function not implemented HOT 11
- JPEG "quality" argument ignored? HOT 1
- 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?
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.