Giter Site home page Giter Site logo

raspberrypi's People

Contributors

mmxuxp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

raspberrypi's Issues

order of "--save-pts" and "--nopreview" flags in veye_raspivid

This command (--no-preview before --save-pts):
./veye_raspivid --verbose --settings --timeout 2000 --output ~/Videos/testvid1.h264 --nopreview --save-pts > ~/Videos/testvid1.log 2>&1

yields the expected video recording and no preview on screen. Logfile:

camera num -1

veye_raspivid Camera App v1.3.12

Width 1920, Height 1080, filename /home/pi/Videos/testvid1.h264
bitrate 17000000, framerate 30, time delay 2000
H264 Profile high
H264 Level 4
H264 Quantisation level 0, Inline headers No
H264 Fill SPS Timings No
H264 Intra refresh type (null), period -1
H264 Slices 1
Wait method : Simple capture
Initial state 'record'

Preview No, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
mmal: mmal_component_enable w 1920 h 1080

raspipreview_create com
Encoder component done
mmal: Splitter has 4 output port,you could use num 2,3 for extend
Splitter component done
Starting component connection stage
Connecting camera video port to encoder input port
Opening output file "/home/pi/Videos/testvid1.h264"
Enabling encoder output port
mmal: running now!!
Starting video capture
mmal: running stop!! 0
Finished capture
Closing down
Close down completed, all components disconnected, disabled and destroyed

However, this command (--save-pts before --nopreview):
./veye_raspivid --verbose --settings --timeout 2000 --output ~/Videos/testvid2.h264 --save-pts --nopreview > ~/Videos/testvid2.log 2>&1

generates the appropriate video, but ignores the --nopreview flag, as can be seen from the log file:

camera num -1

veye_raspivid Camera App v1.3.12

Width 1920, Height 1080, filename /home/pi/Videos/testvid2.h264
bitrate 17000000, framerate 30, time delay 2000
H264 Profile high
H264 Level 4
H264 Quantisation level 0, Inline headers No
H264 Fill SPS Timings No
H264 Intra refresh type (null), period -1
H264 Slices 1
Wait method : Simple capture
Initial state 'record'

Preview Yes, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
mmal: mmal_component_enable w 1920 h 1080

raspipreview_create com
Encoder component done
mmal: Splitter has 4 output port,you could use num 2,3 for extend
Splitter component done
Starting component connection stage
Connecting camera video port to encoder input port
Opening output file "/home/pi/Videos/testvid2.h264"
Enabling encoder output port
mmal: running now!!
Starting video capture
mmal: running stop!! 0
Finished capture
Closing down
Close down completed, all components disconnected, disabled and destroyed

0.000
33.332
66.663
99.993
133.326
166.657
199.988
233.321
266.654
299.982

veye_raspivid splits video in half and puts it together wrong

Hello
when using veye_raspivid and using any other format then 1080*1920 it splits the video in half and display both halves wrong.
1080p is behaving normally, but 720 is not.changed bitrate and other settings, but nothing changes the behaviour.

We've

this is 720x1280
grafik

this is 1080x1920

grafik

I've attatched the exact commands

$ /usr/local/share/veye-raspberrypi/veye_raspivid -b 5120000 -w 1280 -h 720 -fps 30
camera num -1
Hardare version: 2a22082
mmal: mmal_component_enable w 1280 h 720 fps 30

 raspipreview_create  com
mmal: Splitter has 4 output port,you could use num 2,3 for extend

$ /usr/local/share/veye-raspberrypi/veye_raspivid -b 5120000 -w 1920 -h 1080 -fps 30
camera num -1
Hardare version: 2a22082
mmal: mmal_component_enable w 1920 h 1080 fps 30

 raspipreview_create  com
mmal: Splitter has 4 output port,you could use num 2,3 for extend

Low FPS with CS-MIPI-SC132 using OpenCV

Hello! I tried capture2opencv example on CS-MIPI-SC132 and got a small FPS(12) on rpi 3b. After changing 3b to 4 I got a same FPS(12). It just reading a stream without any calculation! Which is the right way to use CS-MIPI-SC132 with opencv? I would like to change this example, but I don't know how this should work. How people use cameras like this in projects with small FPS (and latency). Previews work's well but they without opencv.

Thank you!

Support for RTSP og mjpeg

I want to use this camera together with VLC and / or third part NVR. Is it possible to feed RTSP- or mjpeg from this driver?

Recording video using video.py from examples

My configuration is Raspberry Pi 4/ 2G (latest buster) python3.7.1. Im using modified file video.py from examples:

def callback(data):
    buff = Dcam.buffer(data)
    print("one frame len %d" % buff.length)
    file = buff.userdata
    buff.as_array.tofile(file)
    return 0

if __name__ == "__main__":
    try:
        camera = Dcam.mipi_camera()
        print("Open camera...")
        camera.init_camera()
        **file = open("/home/pi/test.h264", "wb")**
        # Need keep py_object reference
        file_obj = ctypes.py_object(file)
        camera.start_video_stream(callback, file_obj)
        time.sleep(10)
        camera.stop_video_stream()
        file.close()
        print("Close camera...")
        camera.close_camera()
    except Exception as e:
        print(e)

My observations only on using python examples (elf programs that recording video that you provided have no issue):

  • output file is corrupted, it's seems like it recorded 5sec instead of 10sec .
  • quality set bandwidth to 17MB/s is ....poor when on camera there is fast movement

Is this normal ? I can provide my video for better see this "artifacts" and issue that I've described. Could you please support? What I'm missing to get python video script working as well as veye_raspivid .

test.zip

Python Sample Code

Any way there could be some Python sample code along with the C sample code. I'm struggling to understand how you guys wrangled MMAL in your application.

Thanks,
~ Rit

Cant run camera in python

When try load libdmipicam.so, i recivie OSError: /lib/libdmipicam.so: undefined symbol: mmal_log_category
My setup: Rpi 4b OS: Linux raspberrypi 6.1.21-v8+ #1642 SMP PREEMPT Mon Apr 3 17:24:16 BST 2023 aarch64 GNU/Linux

Shutter speed on VEYE-MIPI-290/327

I'm using VEYE-MIPI-327 camera module on Raspberry Pi and i try to set the longer shutter speed as possible.

I've found the mshutter setting (section 3.10 on i2c wiki) http://wiki.veye.cc/index.php/VEYE-MIPI-290/327_i2c/

The documentation say

value is exposure time(seconds)

I need to use the 327 module to take picture with exposure time between 1 to 10 seconds.

but I don't understand how to use this settings.

in section 3.16 (aespeed) i read

AE adjust speed,p1 is agc speed, p2 is shutter speed,Slow to Fast: [0,0x64]

But seems that nothing happens (but the i2c communication works)

It's possible to know the setting to take picture with longest time and greater sensitivity as possible?

Questions & Bug

Questions:

  1. Can we use the veye camera with python code?
  2. Veye camera need to setup Coral USB Accelerator or its detected automatic?
  3. How to filter car lights in night for less blur

Bug

  1. When i run this code sudo install -m 644 ./libdmipicam.so /usr/lib/ i receive this cannot stat './libdmipicam.so': No such file or directory

image

veye_mipi_i2c.sh

Hi,
we realized that when writing a command to change camera settings with veye_mipi_i2c.sh, sometimes the camera settings change, and sometimes NOT. Apparently, the return-value does not depend on the actual state of the camera setting.

I think this is a bug and needs to be improved.

pause state not working in veye_raspivid

According to the documentation, as far as I understand, running veye_raspivid with the --initial flag set to "pause" should not output any video data until the state is set to "record", for example by using the --signal flag and sending a SIGUSR1 signal to the process.

However, running the following command yields a 5 second video recording:

./veye_raspivid --verbose --settings --timeout 5000 --initial pause --output /tmp/signal_pause.h264 --nopreview > /tmp/signal_pause.output 2>&1

No matter what I do with different flags, using signals, not using timeout, etc, I cannot make the "pause" state actually stop the recording.

Am I misunderstanding something, or is the pause state not actually implemented?

For reference, this is the output file from the command above:

camera num -1

veye_raspivid Camera App v1.3.12

Width 1920, Height 1080, filename /tmp/signal_pause.h264
bitrate 17000000, framerate 30, time delay 5000
H264 Profile high
H264 Level 4
H264 Quantisation level 0, Inline headers No
H264 Fill SPS Timings No
H264 Intra refresh type (null), period -1
H264 Slices 1
Wait method : Simple capture
Initial state 'pause'


Preview No, Full screen Yes
Preview window 0,0,1024,768
Opacity 255
mmal: mmal_component_enable w 1920 h 1080 

 raspipreview_create  com 
Encoder component done
mmal: Splitter has 4 output port,you could use num 2,3 for extend
Splitter component done
Starting component connection stage
Connecting camera video port to encoder input port
Opening output file "/tmp/signal_pause.h264"
Enabling encoder output port
mmal: running now!!
Pausing video capture
mmal: running stop!! 0
Finished capture
Closing down
Close down completed, all components disconnected, disabled and destroyed

VEYE-MIPI-327E Segmentation fault

When I execute the demo program written in C language, I get the following error

pi@raspberrypi:~/veye/raspberrypi/D_mipi_rpi/c_demo $ ./capture
Open camera...
mmal: mmal_component_enable w 1920 h 1080

Capture image dimage1920x1080.jpg...
Segmentation fault
pi@raspberrypi:~/veye/raspberrypi/D_mipi_rpi/c_demo $

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.