Posts: 7
Joined: Fri Aug 31, 2012 8:55 pm

Using raspivid with mjpg-streamer

Sat May 18, 2013 6:53 pm

Any ideas as to how I can use raspivid with mjpg-streamer or something similar to stream video from webpage. I am also using WebIOPi if there is anything in there that would be helpful.

Here's the typical html that I use to display the video stream from the RPi using mjpg-streamer and a attached USB webcam.
<img width="640" height="480" src="http://raspberrypi.local:8001/?action=stream">

I have a played with the following and it works great. However I need to view the video in a web browser.

# on the RPi
raspivid -w 640 -h 480 -fps 30 -t 999999 -o - | nc 5001

# On my Linux host
nc -l 5001 | mplayer -fps 40 -cache 1024 -

James Ronald

Posts: 1
Joined: Sat Jun 15, 2013 9:00 am

Re: Using raspivid with mjpg-streamer

Sat Jun 15, 2013 9:03 am

Probably too late for OP - but this will help anyone else:

http://blog.miguelgrinberg.com/post/str ... nd-android

Posts: 7
Joined: Fri Aug 31, 2012 8:55 pm

Re: Using raspivid with mjpg-streamer

Sat Jun 15, 2013 2:54 pm

That's what I ended up doing as an interim solution. I can only get about 10FPS to work in a some what reliable fashion. I'm hoping the someone will add a http server option to raspivid or a raspivid type plug-in for mjpg-streamer. Using the mjpg-streamer http server as an example, I figure that I would be about 10 of hours of work to get something working.

Posts: 1
Joined: Fri Mar 07, 2014 4:13 pm

Re: Using raspivid with mjpg-streamer

Fri Mar 07, 2014 4:19 pm

I too have a USBattached webcam and got curious as how to use raspivid and raspistill with a webcam, since both commands rely on the optional camera module?

All I get when running raspivid and raspistill is :

mmal: mmal_vc_component_create: failed to create component 'vc.ril.camera' (1:ENOMEM)
mmal: mmal_component_create_core: could not create component 'vc.ril.camera' (1)
mmal: Failed to create camera component
mmal: main: Failed to create camera component
mmal: Camera is not detected. Please check carefully the camera module is installed correctly

Can't really find any more info on this as most posters on this actually do use the the optional camera module..

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

Re: Using raspivid with mjpg-streamer

Fri Mar 07, 2014 5:23 pm

The official camera apps are of zero use without the official
camera ... normal webcams are mostly exposed via the
popular V4L2 / V4L APIs , which many applications support
already and readily use (esp. motion or mjpg-streamer) - the
Pi camera is directly connected to the GPU and uses a
Broadcom-specific way of access.

Because of that , the foundation has released a V4L2 driver for
the official camera. It should make the camera availible to any
V4L2 - compatible application , just like regular webcams.

Which might be useful for anybody who actually has the
same problem as the first poster , i guess the goal is to get
more performance out of it than 10 fps via
timelapse / temporary file workarounds.

http://www.raspberrypi.org/phpBB3/viewt ... 43&t=62364

• 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 “Camera board”