Display and Record Gstreamer output?

Does anybody know how I can record and display the stream from Gstreamer using Gstreamer under Windows? My pipe now is:

gst-launch-1.0 -v udpsrc port=5000 caps=“application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264” ! rtph264depay ! avdec_h264 ! videoconvert ! autovideosink sync=f

I know you can use filesink and it you can even compress it using ffmpeg plus close off the file before shutdown of Gstreamer but apart from that I have no idea about Gstreamer.

I think VLC would do the trick. Haven’t done it with gsreamer, but I had success with mjpgstreamer. Here’s a link that could probably sort you out

vlc and you can load a gstreamer stream into the hud on mission planner also which is pretty cool

1 Like

This is a cool feature, but I did find the lag to be a bit more when I was viewing a stream through mp and recording in vlc (no output in vlc, just recording). But this was all with mjpgstreamer hopefully the lag won’t be as pronounce with GStreamer and you can do both :slight_smile:

I had zero lag when using a raspicam to stream I know that is likely why there was no lag though… it took a bit of trial and error before I got it successfully working and I was trying to browse back through my notes on how I set it up to see if I could aid in referencing some instructions to doing it. as getting the gstreamer stream working properly was the hardest part. I also know if you have just a camera set via usb you can run a httpd service/site that will allow you then point the hud to the http link its a neat idea but I do not see a real point of it. I am going to try and get tower running and see if I can do live video from raspicam into tower. have one rpi doing ndvi noir and another full color one doing an live video feed…

1 Like

Thanks for the link. When I open the sdp file with VLC, I see the first frame fine and thats when it stops - I dont see the stream as when I open it with gstreamer.

The sdp file im using is:

v=0
m=video 5000 RTP/AVP 96
c=IN IP4 127.0.0.1
a=rtpmap:96 H264/90000

What am I missing here?

From what I can see I will also need to adjust the raspivid / gstreamer pipe on the RPi to make this work, correct?

I have exactly the same issue : everything works fine with Gstreamer, but when I open the Stream with VLC using the SDP file I only get the first picture of the frame.
What can I do?
Thanks for your help
Guillaume

do you get the same error when you view the stream in mission planner?

i cant help much on this as I don’t have a raspi cam nor have i used gstreamer. I was using mjpgstreamer with a logitech webcam.

maybe @mosesgon can provide details on how he got it setup…

I won’t have time for a few days to sit down and Decipher what each of these means but here are notes home is home laptop config work is work laptop config I am pasting both so you can see what needs to be changed

HOME
raspivid -t 999999 -w 1024 -h 768 -fps 30 -b 2000000 -o - | gst-launch-1.0 -e -vvv fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 ! udpsink host=192.168.1.115 port=5000

WORK
raspivid -t 999999 -w 1024 -h 768 -fps 30 -b 2000000 -o - | gst-launch-1.0 -e -vvv fdsrc ! h264parse ! rtph264pay pt=96 config-interval=5 ! udpsink host=10.58.248.225 port=5000

On the Windows machine (find the IP with ipconfig):
gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false

gst-launch-1.0 udpsrc port=5000 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false

1 Like

You need to make sure you video card drivers are all up to date and everything is in working order on the viewing machine also need to make sure your network connection is capable

1 Like

Hello thanks for your post.
Indeed your command lines are working as well on my TX RPi3 and RX Windows PC to stream video with Gstream.

As I would also like to record the video stream, I would have thought VLC is more convenient as you have access to plenty of functionnalities including “Record to file”

For getting the stream onto VLC, I am using a .sdp file which content is exactly the one described
v=0
m=video 5000 RTP/AVP 96
c=IN IP4
a=rtpmap:96 H264/90000

It launches VLC showing the very first frame received, but the video is frozen to this single image. Image updates when I click on “stop+start” or “next” or “previous”

Strange…

A post was split to a new topic: EDGE video stream without QGC