This post was updated on .
Hello People,
i am a new user of gstreamer and my goal is to stream webcam video from my Raspberry 3 to my windows tablet. Both the Raspberry 3 and the Windows tablet are running Hamachi LogmeIn service, so that I can have a private network between them ad the same constant IPs on both devices. To my Raspberry there is a Mobius camera connected and using the command : v4l2-ctl --list-devices I get as output : Mobius (usb-3f980000.usb-1.2): /dev/video0 so I assume that my webcam is properly connected and recognized by Raspberry. The command I give to RPI3 is: sudo gst-launch-1.0 v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! x264enc ! h264parse ! rtph264pay ! udpsink host=IP_of_Raspberry port=5000 and this is the output i get to the terminal: Setting pipeline to Paused... Pipeline is live and does not need PREROLL... Setting pipeline to PLAYING... New clock: GetSystemClock Redistribute latency.... The command I give to windows tablet is: C:\gstreamer\1.0\x86\bin\gst-launch-1.0.exe udpsrc port=5000 ! application/s-rtp,payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false and this is the output I get to MSDOS terminal: Setting pipeline to PAUSED... Pipeline is live and does not need PREROLL... Setting pipeline to PLAYING... New clock: GetSystemClock using these commands I cannot get any video streaming.. I have spent hours and hours of searching and try-and-error techniques but still no solution. Please could someone guide me through this problem ? I feel i am almost close to the solution but i just missing something... I would really appreciate your help. Thanks and Regards |
A couple of things:
You want to stream it to the Windows tablet, so you should send the data to the Windows host ip instead of the RPI3 host Furthermore, you should copy the exact caps from the sender to the receiver. Start gst-launch-1.0 with -v to see the caps and put them on the udpsrc element in the receiver pipeline (e.g. udpsrc port=5000 caps="application/x-rtp,...."). |
This post was updated on .
Thanks for the reply..
I am not sure exactly what are the caps by i followed your results and i corrected the IP and i also included the -v argument. So now I give to my RPI3 the command: sudo gst-launch-1.0 -v v4l2src device=/dev/video0 ! video/x-raw,width=640,height=480 ! x264enc ! h264parse ! rtph264pay ! udpsink host=IP_of_windows_tablet port=5000 and I get as output: Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... Setting pipeline to PLAYING ... New clock: GstSystemClock /GstPipeline:pipeline0/GstV4l2Src:v4l2src0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:src: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstX264Enc:x264enc0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1" /GstPipeline:pipeline0/GstCapsFilter:capsfilter0.GstPad:sink: caps = "video/x-raw\,\ format\=\(string\)I420\,\ width\=\(int\)640\,\ height\=\(int\)480\,\ pixel-aspect-ratio\=\(fraction\)1/1\,\ interlace-mode\=\(string\)progressive\,\ framerate\=\(fraction\)30/1" On the windows tablet i give the command: C:\gstreamer\1.0\x86\bin\gst-launch-1.0.exe udpsrc port=5000 ! application/s-rtp,payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false and i get as output: C:\WINDOWS\system32>C:\gstreamer\1.0\x86\bin\gst-launch-1.0.exe -v udpsrc port=5000 ! application/x-rtp,payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false Setting pipeline to PAUSED ... Pipeline is live and does not need PREROLL ... /GstPipeline:pipeline0/GstFPSDisplaySink:fpsdisplaysink0/GstAutoVideoSink:fps-display-video_sink/GstD3DVideoSink:fps-display-video_sink-actual-sink-d3dvideo: sync = false Setting pipeline to PLAYING ... New clock: GstSystemClock The problem still exists.. I get no video streaming...So what should I do next ?? Thanks and Regards |
On the sender side you should see caps which read something along the lines of:
You should set these caps on the udpsrc element. Make sure you receive any data at all by manually probing port 5000 UDP on the windows device using an appropriate tool. You can also set the GST_DEBUG environment variable to 3 (e.g. GST_DEBUG=3) to get a better idea of what is happening in your pipelines. |
Dear Sir
i tried to check if there is actually a successful connection between the sender (rpi3) and receiver (windows tablet). So i run the same commands like in my previous post both for the rpi3 and tablet. Then i used the port query tool on my windows tablet and i gave as ip to search the ip of the rpi3. You can see in the attached image that there is no connection between them. so why is that? p.s. windows firewall and windows defender are both inactive... |
Free forum by Nabble | Edit this page |