samip537
Posts: 32
Joined: Sat Aug 02, 2014 5:06 pm
Location: Turku, Finland
Contact: Website

Streaming the RPi-camera feed

Fri Oct 19, 2018 11:18 pm

Hello everyone, I'm trying to stream the video from the Raspi camera, but having no luck.

Any ideas on how to get it working? I would need the stream to be viewable though OBS so I can add it as a source there.

Hardware in use:
  • Raspberry Pi Zero W
  • Raspberry Pi Official Camera Module
I have tried to stream with these commands:

Code: Select all

cvlc --no-audio -A alsa,none --alsa-audio-device default v4l2:///dev/video0 --v4l2-width 640 --v4l2-height 480 --sout '#transcode{vcodec=h264,scale=Auto,acodec=none,scodec=none}:http{mux=ffmpeg{mux=flv},dst=:8080/stream}' -I dummy

Code: Select all

cvlc --no-audio -A alsa,none --alsa-audio-device default v4l2:///dev/video0 --v4l2-width 640 --v4l2-height 480 --sout '#http{mux=ffmpeg{mux=flv},dst=:8080/stream' -I dummy
Log:

Code: Select all

VLC media player 2.2.6 Umbrella (revision 2.2.6-0-g1aae78981c)
[004a2348] core interface error: no suitable interface module
[00411918] core libvlc error: interface "globalhotkeys,none" initialization failed
[00498da8] dbus interface error: Failed to connect to the D-Bus session daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY for X11
[00498da8] core interface error: no suitable interface module
[00411918] core libvlc error: interface "dbus,none" initialization failed
[00498d90] dummy interface: using the dummy interface module...
[b4106780] x264 encoder: using cpu capabilities: none!
[b4106780] x264 encoder: profile High, level 3.0
[b3f298c8] stream_out_transcode stream out: input interval 16666 (base 1)
[b3f298c8] stream_out_transcode stream out: output interval 16666 (base 1)
[b4106780] x264 encoder: using SAR=1/1
[b4106780] x264 encoder: using cpu capabilities: none!
[b4106780] x264 encoder: profile High, level 3.1
[flv @ 0xb3f291d0] pts (1136999) < dts (1137308) in stream 0
[b3f06850] avcodec mux error: could not write frame (pts: 1136999257, dts: 1137308764) (pkt pts: 1136999, dts: 1137308)

pertm84
Posts: 13
Joined: Sat Oct 20, 2018 10:59 am
Location: Norway

Re: Streaming the RPi-camera feed

Wed Oct 24, 2018 12:50 pm

I have had success with streaming using Motion. It can be embedded on your website using an img tag.
The guide I followed https://www.bouvet.no/bouvet-deler/utbr ... ry-pi-zero

Just turn of Motion detection if you dont need it..

EDIT - Remember to set static ip for your pi.

Gary Littlemore
Posts: 313
Joined: Thu Oct 11, 2012 11:52 am
Location: Cheshire, UK

Re: Streaming the RPi-camera feed

Sun Oct 28, 2018 8:46 pm

Have you seen this project? You’re able to use the stream.

viewtopic.php?f=43&t=63276
3b+, 2b, b+, b, Zero & Zero-W

Return to “Camera board”