I composed a small pygame script that catches photos from both similarly Pi Digicam Module and CVBS electronic camera plugged into Raspberry Pi using EasyCap, combines them and conserves them into a file. Making use of MJPG-Streamer i remained in a position to stream combined image over regional network to similarly Android (Nexus 7) as extremely well as Windows (Dektop).

Python script:.
import pygame.
import pygame.image.
import pygame.digicam.
import os.


size = (640,480).
cam0 = pygame.digital camera.Digital electronic camera(‘/ dev/video0’, measurement).
cam1 = pygame.camera.Digicam(‘/ dev/video1’, measurements).


image0 = cam0.get _ image().
impression1 = cam1.get _ image().
image3 = pygame.Area(( size[0] * 2, sizing[1])).

while Correct:.
image0 = cam0.get _ image( image0).
impression1 = cam1.get _ graphic( picture1).
graphic3.blit( image0,(,)).
image3.blit( graphic1,( measurement[0],)).
pygame.picture.help you conserve( image3,”/ run/stream/pic. jpg”).

mjpg_streamer command:.
LD_LIBRARY_Route=/ usr/community/lib mjpg_streamer -i “input_file. so -f/ operate/stream -n pic.jpg” -o “output_http. so -w/ usr/regional/www -n”.


One thought on “2 cams Aspect By Element video streaming from Raspberry Pi utilizing mjpg-streamer”

Leave a Reply

Your email address will not be published. Required fields are marked *