Streaming from Raspberry cam to Mist server

253 views
Skip to first unread message

Lucas vdKroon

unread,
Apr 4, 2015, 5:03:43 PM4/4/15
to mists...@googlegroups.com
Hi all,

I'm trying the MistServer's RPi image on a Raspberry B+
I was wondering if it would be possible to stream from RPi camera (via raspivid + cvlc) to MistServer via RTMP on the same board (camera-server), I've already tried with:

raspivid -o - -t 9999999 -w 1280 -h 720 --hflip | cvlc -vvv stream:///dev/stdin --sout '#rtp{sdp=rtsp://:1935/rtmp}' :demux=h264 while adding a stream to MistServer as push://127.0.0.1:1935 but it does not work.

Any ideas to point me in the right direction?

Thanks,

Lucas

Jaron Vietor

unread,
Apr 4, 2015, 10:13:15 PM4/4/15
to mists...@googlegroups.com
Hello Lucas,

Yes, this is possible.

It looks like you're confusing RTSP and RTMP here. I'm not sure exactly how you'd use VLC to stream out over RTMP, but the following ffmpeg command should work for you:

raspivid -o - -t 9999999 -w 1280 -h 720 --hflip | ffmpeg -i - vcodec copy -f flv rtmp://localhost/live/STREAMNAME

Replace "STREAMNAME" with the name of the stream you configured, and it should work.
Additionally, in the "source" setting, do not specify a port. "push://127.0.0.1:1935" will not work, but "push://127.0.0.1" will. You can also use "push://localhost" - both values should work, but the latter also allows pushing over IPv6 instead of only IPv4. Or, if you don't care about security in this case, a simple "push://" will allow pushes from anywhere.

Hope that helped! Let me know if you run into any problems.

Regards,
Jaron Viëtor
CTO, DDVTech




--
You received this message because you are subscribed to the Google Groups "Mistserver.org" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mistserver+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Lucas vdKroon

unread,
Apr 5, 2015, 2:34:57 AM4/5/15
to mists...@googlegroups.com
Helo Jaron,

Thank you for the quick reply.

I've tried what you suggested and although raspivid + ffmpeg seams to be streaming, I get the error: "Buffer has declined incoming track 2" on MistServer Controller.

Any ideas?

Thanks!

Message has been deleted

Lucas vdKroon

unread,
Apr 5, 2015, 3:07:10 AM4/5/15
to mists...@googlegroups.com
Don't mind, it's working now. While I was waiting for youre reponse, I built a MistServer instance on my VPS remotely, and I'm streaming to it from a RPi this way:

raspivid -o - -t 0 -w 1280 -h 720 --hflip | ffmpeg -i - -vcodec copy -f flv rtmp://ip.of.the.server:1935/live/rpi

I can see the stream on desktop/mobile although the stream appears as Unavailable in the Stream list?

Thanks!

Lucas vdKroon

unread,
Apr 5, 2015, 3:26:16 AM4/5/15
to mists...@googlegroups.com
Thanks Jaron, it's working now.

While I was waiting for youre reponse, I built a MistServer instance on my VPS remotely, and I'm streaming to it from a RPi this way:

raspivid -o - -t 0 -w 1280 -h 720 --hflip | ffmpeg -i - -vcodec copy -f flv rtmp://ip.of.the.server:1935/live/rpi

I can see the stream on desktop/mobile although the stream appears as Unavailable in the Stream list?

Thanks!


El domingo, 5 de abril de 2015, 4:13:15 (UTC+2), Jaron Viëtor escribió:

Jaron Vietor

unread,
Apr 5, 2015, 10:15:48 AM4/5/15
to mists...@googlegroups.com
Hello Lucas,

No problem! Glad to hear it's working.

By the way, the error message you saw / are seeing is just the server declining the metadata track of the RTMP stream, it's harmless.
(The open source edition only supports audio and video tracks for live streams.)

Regards,
Jaron

Lucas vdKroon

unread,
Apr 5, 2015, 2:43:30 PM4/5/15
to mists...@googlegroups.com
Ok Jaron,

Thank you!

I managed to get it working on localhost too, but although it is working perfectly, stream still shows as 'unavailable' at all times. It's not that I care much about that, just wondering why!?

Thank you,
Lucas

Jaron Vietor

unread,
Apr 5, 2015, 2:52:21 PM4/5/15
to mists...@googlegroups.com
Hello Lucas,

If I recall correctly, the RasPi build we provide is rather outdated, and this was a bug in the older version.
I'll see if we can update it to the latest release sometime soon... They are still built mostly by hand (unlike the other downloadable packages), which makes the process rather cumbersome.

Regards,
Jaron


Lucas vdKroon

unread,
Apr 5, 2015, 3:10:11 PM4/5/15
to mists...@googlegroups.com
Hello Jaron,

This time I compiled from git repo, not longer using the RPi image provided.

Thanks!
Lucas
Reply all
Reply to author
Forward
0 new messages