Discussion:
Picam gst-rtsp to vlc
henryco
2016-10-15 14:43:10 UTC
Permalink
i'm trying to receive a gst-rtsp stream from a raspberry Pi camera on vlc.

On Pi

raspivid -t 0 -w 800 -h 600 -fps 10 -b 4000000 -vf -n -o - | gst-launch-1.0
-v fdsrc ! h264parse ! gdppay ! tcpserversink host=127.0.0.1 port=5000

followed by

test-launch "( tcpclientsrc host=127.0.0.1 port=5000 ! gdpdepay ! rtph264pay
name=pay0 pt=96 )"
gives message:
stream ready at rtsp: 127.0.0.1:8554 test

but on client PC, vlc is not able to show the video and thgere are no error
messages

on the other hand with this more simple example
. test-readme

, vlc does show the simple video image
can someone help please ? is there somewhere a working (up to date) example
with (GStreamer) gst-rtsp, and pi camera streaming



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Picam-gst-rtsp-to-vlc-tp4680063.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Tonu Jaansoo
2016-10-15 15:00:47 UTC
Permalink
Hi!

This works( without rtsp though):

sudo modprobe bcm2835-v4l2
./src/http-launch 8080 \( v4l2src device=/dev/video0 ! "video/x-h264, framerate=15/1, width=1280, height=720" ! queue ! h264parse ! mp4mux fragment-duration=10 faststart=true name=stream \)

In vlc open "http://192.168.1.6:8080 <http://192.168.1.6:8080/>”

Tonu
Post by henryco
i'm trying to receive a gst-rtsp stream from a raspberry Pi camera on vlc.
On Pi
raspivid -t 0 -w 800 -h 600 -fps 10 -b 4000000 -vf -n -o - | gst-launch-1.0
-v fdsrc ! h264parse ! gdppay ! tcpserversink host=127.0.0.1 port=5000
followed by
test-launch "( tcpclientsrc host=127.0.0.1 port=5000 ! gdpdepay ! rtph264pay
name=pay0 pt=96 )"
stream ready at rtsp: 127.0.0.1:8554 test
but on client PC, vlc is not able to show the video and thgere are no error
messages
on the other hand with this more simple example
. test-readme
, vlc does show the simple video image
can someone help please ? is there somewhere a working (up to date) example
with (GStreamer) gst-rtsp, and pi camera streaming
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Picam-gst-rtsp-to-vlc-tp4680063.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
henryco
2016-10-15 15:21:29 UTC
Permalink
thanks but eventually the stream should be received bu zoneminder (i first
test with vlc because simpler) so i really need a rtsp stream, moreover this
is for a webcam, not The Picam right ?

so i really need raspivid ==> gst-rtsp ==> vlc (or zoneminder)



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Picam-gst-rtsp-to-vlc-tp4680063p4680065.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Tonu Jaansoo
2016-10-15 15:32:18 UTC
Permalink
Module bcm2835-v4l2 creates v4l source for picam. No need to mess with raspivid.

Tonu.
Post by henryco
thanks but eventually the stream should be received bu zoneminder (i first
test with vlc because simpler) so i really need a rtsp stream, moreover this
is for a webcam, not The Picam right ?
so i really need raspivid ==> gst-rtsp ==> vlc (or zoneminder)
--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Picam-gst-rtsp-to-vlc-tp4680063p4680065.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
henryco
2016-10-15 19:34:03 UTC
Permalink
I tried it, and ... it works ! thank you ... i can hardly believe it after
spending hours trying all sort of tutos on the web...
i use it inside test-readme and zoneminder receives the stream ...

Then I noticed that i have one second latency at ~ 5 fps and latency reduces
importantly with higher fps : so probably a buffering effect. i'm wondering
if i could modify the pipeline to do better with rtsp at low fps or if it's
zoneminder which is fully responsible for the latency.
I know that with gstreamer pipeline alone i had negligible latencies in the
past but it was not with the RTSP protocol ...

the line with the pipeline in the test-readme.c code is:

gst_rtsp_media_factory_set_launch (factory,
"( rpicamsrc bitrate=10000000 !
video/x-h264,width=800,height=600,framerate=60/1,profile=high ! h264parse !
rtph264pay name=pay0 pt=96 )");

thank you again




--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Picam-gst-rtsp-to-vlc-tp4680063p4680068.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
henryco
2016-10-17 19:31:43 UTC
Permalink
hello,

really no feedback on the possibility to reduce latency (reduce buffer ?) in
the pipeline of my previous post ?

thank you in advance

Fred



--
View this message in context: http://gstreamer-devel.966125.n4.nabble.com/Picam-gst-rtsp-to-vlc-tp4680063p4680089.html
Sent from the GStreamer-devel mailing list archive at Nabble.com.
Tim Müller
2016-10-15 15:18:22 UTC
Permalink
On Sat, 2016-10-15 at 07:43 -0700, henryco wrote:

Hi,
Post by henryco
i'm trying to receive a gst-rtsp stream from a raspberry Pi camera on vlc.
On Pi
raspivid -t 0 -w 800 -h 600 -fps 10 -b 4000000 -vf -n -o - | gst-
launch-1.0
-v fdsrc ! h264parse ! gdppay ! tcpserversink host=127.0.0.1
port=5000
followed by
test-launch "( tcpclientsrc host=127.0.0.1 port=5000 ! gdpdepay ! rtph264pay
name=pay0 pt=96 )"
stream ready at rtsp: 127.0.0.1:8554 test
but on client PC, vlc is not able to show the video and thgere are no
error messages 
I would recommend Jan's rpicamsrc element which does roughly the same
as raspivid, but you can use it directly in a GStreamer pipeline. That
way you can just use it in test-launch directly. It has the added
benefit of setting proper timestamps on the buffers.

You can find it here: https://github.com/thaytan/gst-rpicamsrc

Cheers
-Tim
--
Tim Müller, Centricular Ltd - http://www.centricular.com
Loading...