PiHeich
Posts: 25
Joined: Sun Jul 14, 2013 8:48 pm

Streaming a /dev/video0 to web page, HELP

Mon Aug 26, 2013 5:03 pm

Hi, sorry for my english xD

I made a kernel for raspberry, for installing a USB video grabber drivers (LOGILINK VG0001A)

Now i need to stream this video on a web page so i tried whit vlc:

on server:

Code: Select all

cvlc v4l2:// :v4l2-vdev=/dev/video0  --sout "#transcode{vcodec=mp2v,vb=200,width=360,heigh=288}:http{mux=ts,dst=:8082}" --no-sout-audio
on web page:

Code: Select all

<embed type="application/x-vlc-plugin" pluginspage="http://www.videolan.org" version="VideoLAN.VLCPlugin.2"  width="100%"  height="100%" id="vlc" loop="yes" autoplay="yes" target="http://193.5.154.122:8082/"></embed>
output on termina:

Code: Select all

pi@raspberrypi ~ $ cvlc v4l2:// :v4l2-vdev=/dev/video0  -                                                                  out "#transcode{vcodec=mp2v,vb=200,width=360,heigh=288}:htt                                                                  p{mux=ts,dst=:8082}" --no-sout-audio
VLC media player 2.0.3 Twoflower (revision 2.0.2-93-g77aa89                                                                  e)
[0x161b70] inhibit interface error: Failed to connect to the D-Bus session daemon: /usr/bin/dbus-launch terminated abnormally with the following error: Autolaunch error: X11 initialization failed.

[0x161b70] main interface error: no suitable interface module
[0x16ea50] main interface error: no suitable interface module
[0x14d8f0] main libvlc error: interface "globalhotkeys,none" initialization failed
[0x16ea50] dummy interface: using the dummy interface module...
[mpeg2video @ 0x1954a0] Warning vbv_delay will be set to 0xFFFF (=VBR) as the specified vbv buffer is too large for the given bitrate!
[mpeg2video @ 0x1a13a0] Warning vbv_delay will be set to 0xFFFF (=VBR) as the specified vbv buffer is too large for the given bitrate!
[mpeg2video @ 0x1a13a0] rc buffer underflow
[mpeg2video @ 0x1a13a0] rc buffer underflow
[mpeg2video @ 0x1a13a0] rc buffer underflow
[mpeg2video @ 0x1a13a0] rc buffer underflow
[mpeg2video @ 0x1a13a0] rc buffer underflow
[mpeg2video @ 0x1a13a0] rc buffer underflow
[mpeg2video @ 0x1a13a0] rc buffer underflow
[mpeg2video @ 0x1a13a0] rc buffer underflow
[mpeg2video @ 0x1a13a0] rc buffer underflow
^C[mpeg2video @ 0x1a13a0] rc buffer underflow
pi@raspberrypi ~ $
this work quite good, cpu usage 97% .... and a problem is the mobile devices can't watch this video...

Can i make another stream whit another software using less cpu? Can i use a <video> tag HTML5 for watch this video and not a plugin?
I need a <video> tag HTML5 for display the video in mobile devices and i have other objects like buttons in my web page.

Thanks :)

ps:
OS: raspian
Server: Apache

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Streaming a /dev/video0 to web page, HELP

Tue Aug 27, 2013 8:26 am

Try using ffmpeg and ffserver ?
Or maybe even Motion
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

PiHeich
Posts: 25
Joined: Sun Jul 14, 2013 8:48 pm

Re: Streaming a /dev/video0 to web page, HELP

Tue Aug 27, 2013 10:05 am

is it possible to make a .m3u8 file and what this in the web page whit this code?

Code: Select all

<video autoplay="true" width="480" height="320">
<source src="/var/www/playlist.m3u8">
</video>

PiHeich
Posts: 25
Joined: Sun Jul 14, 2013 8:48 pm

Re: Streaming a /dev/video0 to web page, HELP

Tue Aug 27, 2013 11:41 am

SirLagz wrote:Try using ffmpeg and ffserver ?
Or maybe even Motion
No, i need to view the "webcam" (is a usb video grabber) in a <video> tag, my /dev/video0 il a video from dvd player...

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Streaming a /dev/video0 to web page, HELP

Tue Aug 27, 2013 2:56 pm

PiHeich wrote:
SirLagz wrote:Try using ffmpeg and ffserver ?
Or maybe even Motion
No, i need to view the "webcam" (is a usb video grabber) in a <video> tag, my /dev/video0 il a video from dvd player...
Maybe I'm not getting what you want to do...
Do you want to embed the video into a webpage ?
Or do you just want to view the video via webbrowser ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

Return to “Raspberry Pi OS”