Page 1 of 1

Rpi Camera + Gstreamer + nginx = problem [ SOLVED ]

Posted: Wed Jul 30, 2014 6:20 pm
by Forzaferrarileo
Hi , I'm trying to setup an rtmp streaming using Gstreamer 1.0 and nginx + the rtmp module .

The first test i did were with videotestsrc , and v4l2src ( usb webcam ) , encoded through gpu h264 encoder , and all was working.

videotestsrc pipeline( the same as usb webcam's pipeline)

Code: Select all

gst-launch-1.0 -v  videotestsrc ! "video/x-raw",width=640,height=480,framerate=15/1  ! omxh264enc ! h264parse ! flvmux name=mux ! rtmpsink location='rtmp://localhost/rtmp/live live=1'
Image






next , i decided to use the camera module , using raspivid

Raspivid pipeline
raspivid -t 0 -w 854 -h 480 -fps 30 -o -n | gst-launch-1.0 -v fdsrc ! h264parse ! flvmux ! rtmpsink location='rtmp://localhost/rtmp/live live=1'
And here start the problem. I have no video streaming , and trying to save a recording with filesink , results in a bad recording ( weight of the file should be ok , but if you open it , it's like an empty recording )

Do you have any idea of this ?
thanks in advance

Note1 : My camera board is a rpi noir
Note2 : Raspivid , Raspistill and V4l2 driver work
Note3 : I tried many pipeline found in the forum and on other blog .Still not working


Edit : Raspivid seems to miss the timestamp , so to fix it I had to add

Code: Select all

do-timestamp=true
in gstreamer pipeline .

using strobemediaplayback and nginx-rtmp I'm having ~200-500ms streaming ( 720p , 30fps , 3Mbit ) which is very good for a webpage streaming

Re: Rpi Camera + Gstreamer + nginx = problem [ SOLVED ]

Posted: Thu Jul 31, 2014 9:47 am
by triplemdw
Could you please give details on how to establish your "Rpi Camera + Gstreamer + nginx" setup?

Re: Rpi Camera + Gstreamer + nginx = problem [ SOLVED ]

Posted: Thu Aug 07, 2014 2:11 pm
by triplemdw
For anyone seeking the answer to my question, Forzaferrarileo gave it to me:
There's a good tutorial here for the nginx setup : http://pkula.blogspot.co.uk/2013/06/liv ... ry-pi.html
and the rest is only the gstreamer pipeline in my thread