User avatar
howroyd
Posts: 39
Joined: Thu Aug 02, 2012 1:41 pm
Location: Loughborough
Contact: Website

Webcam to SD Card in C++

Thu Nov 01, 2012 12:53 pm

Hi all.

I have my webcam working nicely, outputting on http://localhost:8080.

I am running a cpp programme, which I would like to include some code for the webcam. I want to save the video feed to the SD card in C++.

How do I create a file (mjpg??)
Save the video in realtime
Stop saving (then I can open a new file for another video)

Any help greatly received,

Cheers

ghans
Posts: 7882
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: Webcam to SD Card in C++

Thu Nov 01, 2012 1:22 pm

Have a look into V4L2 (Video for Linux 2) and Linux File I/O.
Else , motion and mjpeg-streamer look like open-source to me ,
have a look into their source code.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

Return to “C/C++”