Giter VIP home page Giter VIP logo

cinepi's Introduction

CinePI

Software to enable Cinema Camera capabilities for Raspberry Pi  

Banner

 

Software Overview

Description of the software side of the camera which involve multiple layers of logic/configuration at the application ( userspace ) and kernel level.

 


Architecture:

This section will highlight the logic responsible for dealing with the RAW frames streamed from the image sensor.

V4L2 ( Unicam ) -> V4L2Copy -> V4L2 Loopback Device -> yavtad/rawcam  -> live_view_display
                                                    -> yavtar2/rawcam -> save_dng_frames 

V4L2 Loopback

V4L2 Loopback is used to create a virtual V4L2 device that will act as the source for our RAW frames. V4L2 Loopback allows for multiple applications to access the same device at the same time and in this way acts a "poor-mans multi-threaded" experience where we can have say one application access the RAW frames for live view and a seperate application access the same RAW frames for saving to disk. This way one will not necessearily affect the other and they stay independant* ( conceptually this is what I expected but in practice this is not necessarily true and comes with quirks. This is not the way to implement actual multi-threading so simply acts a temporary solution for the time being. )

 

V4L2Copy ( V4L2Utils)

V4L2Utils comes bundled with a very handy utility V4L2Copy that as it's name might suggest, can copy the data from one V4L2 device to another. This is used to copy data from the original camera V4L2 source ( /dev/video0 ) to our new virtual V4L2 device ( /dev/video4 ).

 

Yavta ( 6by9 fork )

This specific application is where the actual processing of RAW frames happens. This forked version was tuned to work the Raspberry Pi High Quality Camera and in this particualr project is used in two parts:

  1. yavtad/rawcam | Live view Display: This application is modified to specifically handle the rendering of RAW frames to the display ( HDMI ) and has all the necessary MMAL settings to create a proper live view. ( Gamma, CCM, etc.. )

  2. yavtar2/rawcam | RAW Frame Recorder: This application is modified specifically to handle the saving of RAW frames to disk. Also handles the GPIO logic for start/stop trigger and live timecode display.

 

Summary: V4L2Copy is used to pipe RAW frames from the original V4L2 device to our new virtual V4L2 Loopback device. Two seperate instances of Yavta are used to read RAW frames from our virtual device to perform liveview and recording capabilities.

 

 


Main process:

The section will highlight the main process that is spawned at bootup. It is responsible for further spawning and managing of 3 sub-processes that comprise of the entire camera system.

camera/cameracore3.py   -> camera/cameracore2.py ( configures VL42 and starts both yavta instances)
                        -> controls-thread/bmdproxy.py ( bluetooth service )
                        -> mmal_render_ui/render ( live_view overlays )

cameracore3

This python script is responsible for spawning the 3 main sub-processes necessary for the entire camera system. This script is called at bootup via rc.local

cameracore2

This python script is responsible for spawning and managing the both the live-view and frame recording yavta instances based on current frame dimensions.

bmdproxy

This python script initializes the BLE server that implements logic that allows it to interface with applications that use the Blackmagic Camera Control Protocol over bluetooth.

mmal_ui_render

This application implements the logic to read/update/draw the necessary live view settings overtop of the live view image.

 

Banner

Hardware Overview

Coming soon...

cinepi's People

Contributors

nocantsin avatar schoolpost avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.