Cannot stream video from RPI2/Navio2

Hello,

i after hours and hours of searching on the internet i am still not able to stream video from my webcam( that is attached to my Rpi2/Navio2) to my PC through VLC. I have found pages and pages but nothing works… When i do type lsusb i can see the webcam listed. The most common command i found that video stream should work is the following that also gets me that long list of error… Please can you help me? How can i finally stream video from my Rpi2/Navio2 to my PC and what is the appropriate command ???

/opt/vc/bin/raspivid -o - -t 0 -hf -w 640 -h 360 -fps 25|cvlc -vvv stream:///dev/stdin --sout ‘#standard{access=http,mux=ts,dst=:8090}’ :demux=h264
VLC media player 2.2.1 Terry Pratchett (Weatherwax) (revision 2.2.1-0-ga425c42)
[012308f8] core libvlc debug: VLC media player - 2.2.1 Terry Pratchett (Weatherwax)
[012308f8] core libvlc debug: Copyright © 1996-2015 the VideoLAN team
[012308f8] core libvlc debug: revision 2.2.1-0-ga425c42
[012308f8] core libvlc debug: configured with ./configure ‘–includedir=${prefix}/include’ ‘–mandir=${prefix}/share/man’ ‘–infodir=${prefix}/share/info’ ‘–localstatedir=/var’ ‘–libdir=${prefix}/lib/arm-linux-gnueabihf’ ‘–libexecdir=${prefix}/lib/arm-linux-gnueabihf’ ‘–disable-dependency-tracking’ ‘–build=arm-linux-gnueabihf’ ‘CPPFLAGS=-D_FORTIFY_SOURCE=2’ ‘LDFLAGS=-Wl,-z,relro’ ‘–config-cache’ ‘–disable-maintainer-mode’ ‘–disable-silent-rules’ ‘–disable-update-check’ ‘–enable-fast-install’ ‘–prefix=/usr’ ‘–docdir=/usr/share/doc/vlc-nox’ ‘–libdir=/usr/lib’ ‘–sysconfdir=/etc’ ‘–with-binary-version=1~deb8u1’ ‘–enable-a52’ ‘–enable-aa’ ‘–enable-bluray’ ‘–enable-bonjour’ ‘–enable-caca’ ‘–enable-chromaprint’ ‘–enable-dbus’ ‘–enable-dca’ ‘–enable-directfb’ ‘–enable-dvbpsi’ ‘–enable-dvdnav’ ‘–enable-faad’ ‘–enable-flac’ ‘–enable-fluidsynth’ ‘–enable-freerdp’ ‘–enable-freetype’ ‘–enable-fribidi’ ‘–enable-gles1’ ‘–enable-gles2’ ‘–enable-gnutls’ ‘–enable-jack’ ‘–enable-kate’ ‘–enable-libass’ ‘–enable-libmpeg2’ ‘–enable-libxml2’ ‘–enable-lirc’ ‘–enable-live555’ ‘–enable-mad’ ‘–enable-mkv’ ‘–enable-mod’ ‘–enable-mpc’ ‘–enable-mtp’ ‘–enable-mux_ogg’ ‘–enable-ncurses’ ‘–enable-notify’ ‘–enable-ogg’ ‘–enable-opus’ ‘–enable-pulse’ ‘–enable-qt’ ‘–enable-realrtsp’ ‘–enable-samplerate’ ‘–enable-schroedinger’ ‘–enable-sdl’ ‘–enable-sftp’ ‘–enable-shine’ ‘–enable-shout’ ‘–enable-skins2’ ‘–enable-smbclient’ ‘–enable-speex’ ‘–enable-svg’ ‘–enable-taglib’ ‘–enable-theora’ ‘–enable-twolame’ ‘–enable-upnp’ ‘–enable-vcdx’ ‘–enable-vdpau’ ‘–enable-vnc’ ‘–enable-vorbis’ ‘–enable-x264’ ‘–enable-zvbi’ ‘–with-kde-solid=/usr/share/kde4/apps/solid/actions/’ ‘–disable-decklink’ ‘–disable-dxva2’ ‘–disable-fdkaac’ ‘–disable-gnomevfs’ ‘–disable-goom’ ‘–disable-libtar’ ‘–disable-mfx’ ‘–disable-opencv’ ‘–disable-projectm’ ‘–disable-sndio’ ‘–disable-svgdec’ ‘–disable-telx’ ‘–disable-vpx’ ‘–disable-vsxu’ ‘–disable-wasapi’ ‘–enable-alsa’ ‘–enable-atmo’ ‘–enable-dc1394’ ‘–enable-dv1394’ ‘–enable-linsys’ ‘–enable-omxil’ ‘–enable-udev’ ‘–enable-v4l2’ ‘–enable-libva’ ‘–enable-vcd’ ‘–disable-oss’ ‘–disable-crystalhd’ ‘–disable-mmx’ ‘–disable-sse’ ‘–disable-neon’ ‘–disable-altivec’ ‘CFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security’ ‘CXXFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security’ ‘build_alias=arm-linux-gnueabihf’ ‘OBJCFLAGS=-g -O2 -fstack-protector-strong -Wformat -Werror=format-security’
[012308f8] core libvlc debug: searching plug-in modules
[012308f8] core libvlc debug: loading plugins cache file /usr/lib/vlc/plugins/plugins.dat
[012308f8] core libvlc debug: recursively browsing /usr/lib/vlc/plugins' [012308f8] core libvlc debug: saving plugins cache /usr/lib/vlc/plugins/plugins.dat [012308f8] core libvlc debug: plug-ins loaded: 450 modules [012308f8] core libvlc debug: opening config file (/home/pi/.config/vlc/vlcrc) [012308f8] core libvlc debug: translation test: code is "en_GB" [012308f8] core libvlc debug: CPU has capabilities ARM_NEON FPU [0139e460] core playlist debug: creating audio output [012cb220] core audio output debug: looking for audio output module matching "any": 5 candidates [012cb220] pulse audio output debug: using library version 5.0.0 [012cb220] pulse audio output debug: (compiled with version 5.0.0, protocol 29) [012cb220] pulse audio output error: PulseAudio server connection failure: Connection refused [012cb220] alsa audio output debug: Available ALSA PCM devices: [012cb220] alsa audio output debug: Discard all samples (playback) or generate zero samples (capture) (null) [012cb220] core audio output debug: using audio output module "alsa" [0139e460] core playlist debug: keeping audio output [0139e460] core playlist debug: adding itemstdin’ ( stream:///dev/stdin )
[75700520] core input debug: Creating an input for ‘stdin’
[012ca130] core interface debug: looking for interface module matching “hotkeys,none”: 19 candidates
[012ca130] core interface debug: using interface module “hotkeys”
[012c8330] core interface debug: looking for interface module matching “globalhotkeys,none”: 19 candidates
[0139e460] core playlist debug: meta ok for (null), need to fetch art
[75700ed8] core art finder debug: looking for meta fetcher module matching “any”: 1 candidates
[012c8330] core interface debug: no interface modules matched
[012c8330] core interface error: no suitable interface module
[012308f8] core libvlc error: interface “globalhotkeys,none” initialization failed
[012c8330] core interface debug: looking for interface module matching “dbus,none”: 19 candidates
[012c8330] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[012c8330] core interface debug: no interface modules matched
[012c8330] core interface error: no suitable interface module
[012308f8] core libvlc error: interface “dbus,none” initialization failed
[012c8330] core interface debug: looking for interface module matching “dummy”: 19 candidates
[012c8330] dummy interface: using the dummy interface module…
[012c8330] core interface debug: using interface module “dummy”
[0139e460] core playlist debug: processing request item: null, node: Playlist, skip: 0
[0139e460] core playlist debug: rebuilding array of current - root Playlist
[0139e460] core playlist debug: rebuild done - 1 items, index -1
[0139e460] core playlist debug: starting playback of the new playlist item
[0139e460] core playlist debug: resyncing on stdin
[0139e460] core playlist debug: stdin is at 0
[0139e460] core playlist debug: creating new input thread
[74300508] core input debug: Creating an input for ‘stdin’
[75700ed8] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/fetcher
[75700ed8] lua art finder debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher
[75700ed8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac
[0139e460] core playlist debug: requesting art for stdin
[741006f8] core stream output debug: using sout chain=standard{access=http,mux=ts,dst=:8090}' [741006f8] core stream output debug: stream=standard’
[74100960] core stream out debug: looking for sout stream module matching “standard”: 22 candidates
[740004d8] core art finder debug: looking for meta fetcher module matching “any”: 1 candidates
[74100960] core stream out debug: set config option: sout-standard-access to http
[74100960] core stream out debug: set config option: sout-standard-mux to ts
[74100960] core stream out debug: set config option: sout-standard-dst to :8090
[741015f0] core access out debug: looking for sout access module matching “http”: 8 candidates
[741015f0] core access out debug: net: listening to * port 8090
[741015f0] core access out debug: using sout access module “access_output_http”
[74102630] core mux debug: looking for sout mux module matching “ts”: 10 candidates
[74102630] mux_ts mux debug: shaping=200000 pcr=70000 dts_delay=400000
[75700ed8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/fetcher/tvrage.luac
[74102630] core mux debug: using sout mux module “mux_ts”
[741006f8] core stream output debug: muxer support adding stream at any time
[741006f8] core stream output debug: muxer prefers to wait for all ES before starting to mux
[74100960] stream_out_standard stream out debug: using http/ts://:8090' [74100960] core stream out debug: using sout stream module "stream_out_standard" [75700ed8] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher [74300508] core input debug: using timeshift granularity of 50 MiB, in path '/tmp' [75700ed8] core art finder debug: no meta fetcher modules matched [74300508] core input debug:stream:///dev/stdin’ gives access stream' demux’ path /dev/stdin' [0139e460] core playlist debug: searching art for stdin [74300508] core input debug: specified demuxh264’
[74300508] core input debug: creating demux: access=‘stream’ demux=‘h264’ location=’/dev/stdin’ file=’/dev/stdin’
[75700ed8] core art finder debug: looking for art finder module matching “any”: 2 candidates
[74106160] core demux debug: looking for access_demux module matching “stream”: 20 candidates
[74106160] core demux debug: no access_demux modules matched
[74300508] core input debug: creating access ‘stream’ location=’/dev/stdin’, path=’/dev/stdin’
[74106160] core access debug: looking for access module matching “stream”: 25 candidates
[74106160] filesystem access debug: opening file /dev/stdin' [74106160] core access debug: using access module "filesystem" [741064d0] core stream debug: Using stream method for AStream* [741064d0] core stream debug: starting pre-buffering [741064d0] core stream debug: received first data after 0 ms [74106690] core stream debug: looking for stream_filter module matching "any": 9 candidates [740004d8] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/fetcher [740004d8] lua art finder debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/fetcher [740004d8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/fetcher/tvrage.luac [74106690] core stream debug: no stream_filter modules matched [74106690] core stream debug: looking for stream_filter module matching "record": 9 candidates [74106690] core stream debug: using stream_filter module "record" [74300508] core input debug: creating demux: access='stream' demux='h264' location='/dev/stdin' file='/dev/stdin' [74108258] core demux debug: looking for demux module matching "h264": 65 candidates [75700ed8] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/art [75700ed8] lua art finder debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art [75700ed8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac [74108258] h264 demux error: this doesn't look like a H264 ES stream, continuing anyway [74108258] h264 demux debug: using 25.00 fps [74108778] core demux packetizer debug: looking for packetizer module matching "any": 23 candidates [74108778] core demux packetizer debug: using packetizer module "packetizer_h264" [74108258] core demux debug: using demux module "h264" [74300508] core input debug: starting in async mode [7410d348] core demux meta debug: looking for meta reader module matching "any": 2 candidates [740004d8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/fetcher/tvrage.luac [740004d8] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/fetcher [740004d8] core art finder debug: no meta fetcher modules matched [012308f8] core libvlc debug: searching art for stdin [740004d8] core art finder debug: looking for art finder module matching "any": 2 candidates [75700ed8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac [75700ed8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/01_googleimage.luac [75700ed8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/01_googleimage.luac [75700ed8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac [740004d8] lua art finder debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/art [740004d8] lua art finder debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/art [740004d8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac [7410d348] lua demux meta debug: Trying Lua scripts in /home/pi/.local/share/vlc/lua/meta/reader [7410d348] lua demux meta debug: Trying Lua scripts in /usr/lib/vlc/lua/meta/reader [7410d348] lua demux meta debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/reader/filename.luac [75700ed8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/02_frenchtv.luac [75700ed8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/03_lastfm.luac [740004d8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/00_musicbrainz.luac [740004d8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/01_googleimage.luac [7410d348] lua demux meta debug: Trying Lua scripts in /usr/share/vlc/lua/meta/reader [7410d348] core demux meta debug: no meta reader modules matched [74300508] core input debug:stream:///dev/stdin’ successfully opened
[74300508] core input debug: EOF reached
[0139e460] core playlist debug: finished input
[74108258] core demux debug: removing module “h264”
[74108778] core demux packetizer debug: removing module “packetizer_h264”
[74106160] core access debug: object waitpipe triggered
[74106690] core stream debug: removing module “record”
[74106160] core access debug: removing module “filesystem”
[0139e460] core playlist debug: dead input
[741006f8] core stream output debug: destroying useless sout
[74100960] core stream out debug: destroying chain… (name=standard)
[74100960] core stream out debug: removing module “stream_out_standard”
[74102630] core mux debug: removing module “mux_ts”
[741015f0] core access out debug: removing module “access_output_http”
[74101e00] core http host debug: HTTP host removed
[741015f0] access_output_http access out debug: Close
[74100960] core stream out debug: destroying chain done
[0139e460] core playlist debug: changing item without a request (current 0/1)
[0139e460] core playlist debug: nothing to play
[75700ed8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/03_lastfm.luac
[75700ed8] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[75700ed8] core art finder debug: no art finder modules matched
[0139e460] core playlist debug: art not found for stdin
[740004d8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/01_googleimage.luac
[740004d8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/02_frenchtv.luac
[740004d8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/02_frenchtv.luac
[740004d8] lua art finder debug: Trying Lua playlist script /usr/lib/vlc/lua/meta/art/03_lastfm.luac
[740004d8] lua art finder debug: skipping script (unmatched scope) /usr/lib/vlc/lua/meta/art/03_lastfm.luac
[740004d8] lua art finder debug: Trying Lua scripts in /usr/share/vlc/lua/meta/art
[740004d8] core art finder debug: no art finder modules matched
[012308f8] core libvlc debug: art not found for stdin

As far as I know raspivid only works with the Raspicam, not with an USB-webcam

Ok, thank you… Is there another way then that I could stream video through http protocol using vlc ??
If i manage to stream video through vlc, i will then be able to connect to it from mission planner by right clicking>Set MJPEG source …
I followed Oborne guide http://vps.oborne.me/gcs/Mjpeg%20Video%20Source%20with%20VLC.htm and I successfully managed to stream video from a Pc to mission planner running on tablet. However this guide is showing how to setup the video stream on a windows pc with GUI and not in rasperry without GUI…
Does anyone know how this can be done ??

THank you

If you want to use exactly VLC try its console version - cvlc. Some info is available here.

Hello,

so after some hours i finally managed the following. I think i am in the right direction but stil i have some issues and i am not completely satisfied…

  1. If on RPI2 terminal i give this command cvlc v4l2:///dev/video0:chroma=h264:width=800:height=600 --sout ‘#standard{access=http,mux=ts,vb=1200,dst=192.168.1.3:8080,name=stream,mime=video/ts}’ I can see my camera’s live feed when in the vlc of my windows tablet i go to Media>Stream>Network and i specify the ip address http://192.168.1.3:8080/. However, although the video flow is normal, it has a latency of about 3 seconds. Both my RPI2 and my tablet are on the same wifi local network. WHy does this happen ?? how can i reduce this latency ?
    The above command returns in the terminal this

VLC media player 2.2.1 Terry Pratchett (Weatherwax) (revision 2.2.1-0-ga425c42)
[00147698] pulse audio output error: PulseAudio server connection failure: Conne ction refused
[00152048] core interface error: no suitable interface module
[000b88f8] core libvlc error: interface “globalhotkeys,none” initialization fail ed
[00152048] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[00152048] core interface error: no suitable interface module
[000b88f8] core libvlc error: interface “dbus,none” initialization failed
[0014aa20] dummy interface: using the dummy interface module…
[73b016f8] access_output_http access out: Consider passing --http-host=IP on the command line instead.

  1. If on RPI2 terminal i give this command cvlc v4l2:///dev/video0:chroma=h264:width=800:height=600 --sout ‘#standard{access=http,mux=ts,dst=192.168.1.3:8080,name=stream,mime=video/ts}’ --sout=’#transcode{venc=ffmpeg,vcodec=MJPG,vb=5000,scale=1,acodec=none}:http{mux=mpjpeg,dst=:8080/}’ --sout-keep I can see my camera’s live feed within the mission planner HUD when I right click on the HUD, select Set MJPEG source and give the ip address http:192.168.1.3:8080/ . However, in that case the HUD actually shows one initial image of camera and then at some time after some seconds ita may update the video feed with extreme lag and latency. What should I do ???
    The above command returns in the terminal this

VLC media player 2.2.1 Terry Pratchett (Weatherwax) (revision 2.2.1-0-ga425c42)
[01094d70] pulse audio output error: PulseAudio server connection failure: Connection refused
[010900f0] core interface error: no suitable interface module
[00ff68f8] core libvlc error: interface “globalhotkeys,none” initialization failed
[01016798] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[01016798] core interface error: no suitable interface module
[00ff68f8] core libvlc error: interface “dbus,none” initialization failed
[010900f0] dummy interface: using the dummy interface module…
[73b02c80] stream_out_transcode stream out: input interval 33333 (base 1)
[73b02c80] stream_out_transcode stream out: output interval 33333 (base 1)
[mjpeg @ 0x743062a0] No JPEG data found in image
[mjpeg @ 0x743062a0] No JPEG data found in image
[mjpeg @ 0x743062a0] No JPEG data found in image
[mjpeg @ 0x743062a0] No JPEG data found in image

please help me overcome these problems…

Thank you