tag:blogger.com,1999:blog-8126413226926105495.post90922046844250878..comments2024-03-15T04:36:37.072+03:00Comments on Streaming with nginx-rtmp-module: GStreamer and Raspberry PiRoman Arutyunyanhttp://www.blogger.com/profile/00172269067283670037noreply@blogger.comBlogger23125tag:blogger.com,1999:blog-8126413226926105495.post-79893103695296067362016-01-12T02:12:07.098+03:002016-01-12T02:12:07.098+03:00Any ideas on this.. I only get "Pipeline is p...Any ideas on this.. I only get "Pipeline is prerolling..." with this.rkantoshttps://www.blogger.com/profile/13252508280812806068noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-35854716492568161492016-01-10T23:51:20.378+03:002016-01-10T23:51:20.378+03:00This comment has been removed by the author.rkantoshttps://www.blogger.com/profile/13252508280812806068noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-49067939560668134112014-05-28T21:22:32.785+04:002014-05-28T21:22:32.785+04:00Hi Roman,
I compiled the nginx module and is up a...Hi Roman,<br /><br />I compiled the nginx module and is up and running, but i'm not able to reproduce the video through a web client using jwplayer. Do you have any idea or an nginx config file to take as reference?<br /><br />This is my nginx configuration file, I've tried to static_exec the gstreamer pipeline and pushing from other process but neither work.<br /><br />#user nobody;<br />worker_processes 1;<br /><br />#error_log logs/error.log;<br />#error_log logs/error.log notice;<br />#error_log logs/error.log info;<br /><br />#pid logs/nginx.pid;<br /><br /><br />events {<br /> worker_connections 1024;<br />}<br /><br /><br />http {<br /> include mime.types;<br /> default_type application/octet-stream;<br /><br /> #log_format main '$remote_addr - $remote_user [$time_local] "$request" '<br /> # '$status $body_bytes_sent "$http_referer" '<br /> # '"$http_user_agent" "$http_x_forwarded_for"';<br /><br /> #access_log logs/access.log main;<br /><br /> sendfile on;<br /> #tcp_nopush on;<br /><br /> #keepalive_timeout 0;<br /> keepalive_timeout 65;<br /> #gzip on;<br /><br /> server {<br /> listen 8080;<br /> server_name localhost;<br /><br /> #charset koi8-r;<br /><br /> #access_log logs/host.access.log main;<br /><br /> location / {<br /> root html;<br /> index index.html index.htm;<br /> }<br /><br /> #error_page 404 /404.html;<br /><br /> # redirect server error pages to the static page /50x.html<br /> #<br /> error_page 500 502 503 504 /50x.html;<br /> location = /50x.html {<br /> root html;<br /> }<br /><br /> # proxy the PHP scripts to Apache listening on 127.0.0.1:80<br /> #<br /> #location ~ \.php$ {<br /> # proxy_pass http://127.0.0.1;<br /> #}<br /><br /> # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000<br /> #<br /> #location ~ \.php$ {<br /> # root html;<br /> # fastcgi_pass 127.0.0.1:9000;<br /> # fastcgi_index index.php;<br /> # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;<br /> # include fastcgi_params;<br /> #}<br /><br /> # deny access to .htaccess files, if Apache's document root<br /> # concurs with nginx's one<br /> #<br /> #location ~ /\.ht {<br /> # deny all;<br /> #}<br /> }<br /><br /><br /> # another virtual host using mix of IP-, name-, and port-based configuration<br /> #<br /> #server {<br /> # listen 8000;<br /> # listen somename:8080;<br /> # server_name somename alias another.alias;<br /><br /> # location / {<br /> # root html;<br /> # index index.html index.htm;<br /> # }<br /> #}<br /><br /><br /> # HTTPS server<br /> #<br /> #server {<br /> # listen 443;<br /> # server_name localhost;<br /><br /> # ssl on;<br /> # ssl_certificate cert.pem;<br /> # ssl_certificate_key cert.key;<br /><br /> # ssl_session_timeout 5m;<br /><br /> # ssl_protocols SSLv2 SSLv3 TLSv1;<br /> # ssl_ciphers HIGH:!aNULL:!MD5;<br /> # ssl_prefer_server_ciphers on;<br /><br /> # location / {<br /> # root html;<br /> # index index.html index.htm;<br /> # }<br /> #}<br /><br />}<br /><br />rtmp{<br /> server{<br /> listen 1987;<br /> chunk_size 4096;<br /><br /> application rpi{<br /> live on;<br /> record off;<br /> allow publish 127.0.0.1;<br /> deny publish all;<br /> #exec_static gst-launch-1.0 -v -e v4l2src ! "video/x-raw,width=640,height=480,framerate=15/1" ! omxh264enc target-bitrate=1000000 control-rate=variable ! video/x-h264,profile=high ! h264parse ! queue ! flvmux name=mux alsasrc ! audioresample ! audio/x-raw,rate=48000,channels=1 ! queue ! voaacenc bitrate=32000 ! queue ! mux. mux. ! rtmpsink location="rtmp://localhost:1987/rpi/flv:mystream";<br /> }<br /> }<br />}Juan Carlos Castañeda Martínezhttps://www.blogger.com/profile/03601087593489347974noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-26310688066133904442014-04-03T16:11:44.123+04:002014-04-03T16:11:44.123+04:00This comment has been removed by the author.muusanethttps://www.blogger.com/profile/15104154507196248129noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-79697742269076120292013-10-29T16:40:00.278+04:002013-10-29T16:40:00.278+04:00I got gstreamer to dump the strem ti nginx-rtmp. I...I got gstreamer to dump the strem ti nginx-rtmp. I can see in top that both nginx and gstreamer are consuming cpu so its doing something but I cannot get video on my iPhone or webpage.. almost there!?!<br /><br />raspivid -t 999999 -h 720 -w 1080 -fps 25 -hf -b 2000000 -o - | gst-launch-1.0 -v fdsrc ! h264parse ! flvmux ! rtmpsink location=\"rtmp://localhost/rtmp/live live=1\"Anonymoushttps://www.blogger.com/profile/17448039022702636059noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-40440537265272338252013-10-29T16:17:13.343+04:002013-10-29T16:17:13.343+04:00It is supposed to look like this raspivid -n -t 10...It is supposed to look like this raspivid -n -t 1000000 -vf -b 2000000 -fps 25 -o - | gst-launch-1.0 fdsrc fd=0 ! omxh264enc target-bitrate=1000000 control-rate=variable ! video/x-h264,profile=high ! h264parse ! rtmpsink location=\"rtmp://localhost/rtmp/live live=1\" - The error erroneus pipleine meanst that the rtmp sink is getting an unsupported stream... I am not sure what the problem is.Anonymoushttps://www.blogger.com/profile/17448039022702636059noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-55360561973326406762013-10-18T22:26:02.109+04:002013-10-18T22:26:02.109+04:00Hello guys. What is the command to stream rtmp onl...Hello guys. What is the command to stream rtmp only the raspi cam? Without audio. I tried this command :<br />raspivid -n -t 1000000 -vf -b 2000000 -fps 25 -o - | gst-launch-1.0 fdsrc fd=0 ! omxh264enc target-bitrate=1000000 control-rate=variable ! video/x-h264,profile=high ! h264parse ! queue ! flvmux name=mux alsasrc device=hw:1 ! audioresample ! audio/x-raw,rate=48000 ! queue ! voaacenc bitrate=32000 ! queue ! mux. mux. ! rtmpsink location=\"rtmp://example.com/myapp/mystream live=1\"<br /><br />but i get this:<br /><br />WARNING: erroneous pipeline: could not link queue0 to audioresample0<br />Florin`s Bloghttps://www.blogger.com/profile/17386334526144806106noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-84023343932192776302013-09-27T04:10:50.124+04:002013-09-27T04:10:50.124+04:00I fugured it out. For new gstreamer you need to ad...I fugured it out. For new gstreamer you need to add aacparse after codec, because flvmux consume ONLY raw AACfreemanhttps://www.blogger.com/profile/04366838612584245367noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-66264452911455209912013-09-26T18:18:56.552+04:002013-09-26T18:18:56.552+04:00Hello. I trying to use this, and video encoder wor...Hello. I trying to use this, and video encoder works ok, but i still getting error in audo, something like:<br /><br />Setting pipeline to PAUSED ...<br />Pipeline is live and does not need PREROLL ...<br />Setting pipeline to PLAYING ...<br />New clock: GstAudioSrcClock<br />Redistribute latency...<br />ERROR: from element /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0: Internal data flow error.<br />Additional debug info:<br />gstbasesrc.c(2812): gst_base_src_loop (): /GstPipeline:pipeline0/GstAlsaSrc:alsasrc0:<br />streaming task paused, reason not-negotiated (-4)<br />Execution ended after 658804940 ns.<br />Setting pipeline to PAUSED ...<br />Setting pipeline to READY ...<br />Setting pipeline to NULL ...<br />libv4l2: warning v4l2 mmap buffers still mapped on close()<br />Freeing pipeline ...<br /><br />What can it be? Thanksfreemanhttps://www.blogger.com/profile/04366838612584245367noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-78507105318524946372013-09-05T22:48:25.482+04:002013-09-05T22:48:25.482+04:00Hi Roman, when i try to run the test.h264 video di...Hi Roman, when i try to run the test.h264 video distributed with wheezy using gst-launch-1.0 playbin uri=file://...test.h264, it errors out with <br /><br />omxh264dec0: internal data stream error.<br />Additional debug info:<br />gstomxvideodec.c (2183): gst_omx_video_dec_loop(): /GstPlayBin:playbin0/GstURIDecodeBin:uridecodebin0/GstDecodeBin:decodebin0/GstOMXH264De - omxh264dec: omh264dec - omxh264dec0:<br />stream stopped, reason not-negotiated<br />ERROR: pipeline doesnt want to preroll.<br /><br />Any help is greatly appreciated.<br /><br />I have tried bot to compile gst from source and download the prebuilt plugin but no dice :(Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-7019793893511190502013-08-22T11:05:15.446+04:002013-08-22T11:05:15.446+04:00i m trying to stream video from my raspeberry to v...i m trying to stream video from my raspeberry to vlc player. I have the following pipeline.<br /> gst-launch-1.0 v4l2src ! omxh264enc ! video/x-h264,profile=high ! h264parse ! queue ! mpegtsmux ! tcpserversink host=134.202.84.72 port=1234 <br /><br />Vlc palayer is buffering the video but is unable to play it. Vlc player continuosly displays the following message <br /><br />packetizer_h264 warning: waiting for SPS/PPS<br /><br />I have tried to save the video using <br /><br />gst-launch-1.0 v4l2src ! omxh264enc ! multipartmux ! filesink location=webcam.ts<br /><br />and then copied it to my pc and it played perfectly fine but when it comes to streaming the vlc player is unable to play it please help Ahmedhttps://www.blogger.com/profile/12546919950365801458noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-1123169073531766562013-07-22T16:56:17.522+04:002013-07-22T16:56:17.522+04:00Looks like I found problem but still not the solut...Looks like I found problem but still not the solution. gst-launch does not recognize the manually compiled gst-omx files. how can I make sure all compiled files from gst-omx move to the right directories to be accepted by gst-launch?<br />felixhttps://www.blogger.com/profile/14804404407569020842noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-88435093271414415212013-07-21T00:17:59.801+04:002013-07-21T00:17:59.801+04:00i've downloaded gst-omx with git clone git://a...i've downloaded gst-omx with git clone git://anongit.freedesktop.org/gstreamer/gst-omx.<br />is your patch included in this version?felixhttps://www.blogger.com/profile/14804404407569020842noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-6628570263499449412013-07-20T12:57:29.655+04:002013-07-20T12:57:29.655+04:00Hi Roman,
this is the output.
0:00:00.357480931...Hi Roman,<br />this is the output. <br /><br />0:00:00.357480931 2408 0x1690580 ERROR omx gstomx.c:2773:plugin_init: Invalid type name 'GstOMXTheoraDec' for element 'omxtheoradec'<br />0:00:00.359019853 2408 0x1690580 ERROR omx gstomx.c:2773:plugin_init: Invalid type name 'GstOMXVP8Dec' for element 'omxvp8dec'<br />Setting pipeline to PAUSED ...<br />0:00:00.464287532 2408 0x1690580 ERROR omxvideoenc gstomxvideoenc.c:307:gst_omx_video_enc_open: Failed to set bitrate parameters: Version mismatch (0x8000100f)<br />ERROR: Pipeline doesn't want to pause.<br />ERROR: from element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: Could not initialise supporting library.<br />Additional debug info:<br />gstvideoencoder.c(1418): gst_video_encoder_change_state (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:<br />Failed to open encoder<br />Setting pipeline to NULL ...<br />Freeing pipeline ...<br />felixhttps://www.blogger.com/profile/14804404407569020842noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-28132305581757520312013-07-16T09:47:24.105+04:002013-07-16T09:47:24.105+04:00add --gst-debug for more infoadd --gst-debug for more infoRoman Arutyunyanhttps://www.blogger.com/profile/00172269067283670037noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-41270717380978105032013-07-16T04:05:51.329+04:002013-07-16T04:05:51.329+04:00does not work. installed new raspbian image and a...does not work. installed new raspbian image and all gstreamer related stuff again. still same error.<br />without "target-bitrate=1000000 control-rate=variable " it works fine.<br />this my commandline <br />gst-launch-1.0 rtmpsrc location=rtmp://myserver.com/folder/path ! flvdemux ! h264parse! omxh264dec ! videoconvert ! omxh264enc target-bitrate=1000000 control-rate=variable ! video/x-h264,profile=high ! mpegtsmux ! udpsink host=192.168.3.187 port=1234<br /><br />same error as before:<br /><br />felixhttps://www.blogger.com/profile/14804404407569020842noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-25935848052355132462013-07-15T16:07:38.864+04:002013-07-15T16:07:38.864+04:00You should set both target-bitrate and control-rat...You should set both target-bitrate and control-rate.Roman Arutyunyanhttps://www.blogger.com/profile/00172269067283670037noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-41077616348363745532013-07-15T14:21:11.292+04:002013-07-15T14:21:11.292+04:00I could compile everything without errors now, but...I could compile everything without errors now, but if i set target-bitrate=1000000 I get:<br />"ERROR: from element /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0: Could not initialise supporting library.<br />Additional debug info:<br />gstvideoencoder.c(1418): gst_video_encoder_change_state (): /GstPipeline:pipeline0/GstOMXH264Enc-omxh264enc:omxh264enc-omxh264enc0:<br />Failed to open encoder"<br /><br />If I don't use bitrate parameter it works fine with some default bitrate.<br />After following the instructions for gstreamer installation I use the steps below:<br /><br />git clone git://anongit.freedesktop.org/gstreamer/gst-omx<br />cd gst-omx<br />./autogen.sh<br />./configure --with-omx-target=rpi<br />ln /opt/vc/include/IL/OMX_Broadcom.h omx/OMX_Broadcom.h -s<br />sudo make<br />sudo make install<br /><br />Is there anything I missed?<br /><br /><br />felixhttps://www.blogger.com/profile/14804404407569020842noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-34928649271178691082013-07-13T08:25:59.154+04:002013-07-13T08:25:59.154+04:00I installed gstreamer-1.0 (everything but gst-omx)...I installed gstreamer-1.0 (everything but gst-omx) from here<br />http://theiopage.blogspot.ru/2013/04/enabling-hardware-h264-encoding-with.htmlRoman Arutyunyanhttps://www.blogger.com/profile/00172269067283670037noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-28452287739891857152013-07-13T01:40:22.591+04:002013-07-13T01:40:22.591+04:00I'm always getting error message during config...I'm always getting error message during configuration of gst-omx. any workaround?<br />gstreamer 1.0 is installed.<br />#gst-omx $ gst-launch-1.0 --version<br />gst-launch-1.0 version 1.0.7<br />GStreamer 1.0.7<br /><br />error message after ./autogen.sh<br />....<br />checking for GIO... yes<br />checking for GST... no<br />configure: No package 'gstreamer-1.0' found<br />configure: error: no gstreamer-1.0 >= 1.0.0 (GStreamer) found<br /><br /><br />felixhttps://www.blogger.com/profile/14804404407569020842noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-11620466652684579272013-07-09T19:10:22.614+04:002013-07-09T19:10:22.614+04:00Something like this ...
raspivid -n -t 1000000 -v...Something like this ...<br /><br />raspivid -n -t 1000000 -vf -b 2000000 -fps 25 -o - | gst-launch-1.0 fdsrc fd=0 ! ... rest-of-parameters-by-Roman ...Anonymoushttps://www.blogger.com/profile/13854822979925971526noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-4734602403762355192013-07-04T13:16:58.195+04:002013-07-04T13:16:58.195+04:00I'm not sure about piping from raspivid. Pleas...I'm not sure about piping from raspivid. Please try and report. I don't have Raspberry Pi Camera module so I had no chance to try raspivid.Roman Arutyunyanhttps://www.blogger.com/profile/00172269067283670037noreply@blogger.comtag:blogger.com,1999:blog-8126413226926105495.post-7904811070666458942013-07-04T12:40:06.614+04:002013-07-04T12:40:06.614+04:00That is fantastic. I will try gstreamer now. Do I ...That is fantastic. I will try gstreamer now. Do I just pipe raspivid into that gst-launch command? It will run from the command line right? Anonymoushttps://www.blogger.com/profile/17448039022702636059noreply@blogger.com