Quantcast

Record UDP stream

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Record UDP stream

Mattekr
Hi, I'm a gstreamer newbie.

I would like to see and record a UDP stream from my camera.

I use for see

C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -e -v udpsrc port=5000 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false

and this for record

C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -e -v udpsrc port=5000 ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! decodebin ! x264enc ! mp4mux ! filesink location=C:\\Users\\Progettazione\\Desktop\\file.mp4

All the attempts I made to record and see in one command did not work

For example, I get the error:

WARNING: erroneous pipeline: could not link fpsdisplaysink0 to filesink0

How can I do? Thanks in advance.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Record UDP stream

noscgag
You need to split the stream in two with the tee and queue elements.

Here's an example of a working video pipeline that displays and records simultaneously:

gst-launch-1.0 rtspsrc location=rtsp://127.0.0.1:8554/front latency=0 ! tee name=t t. ! queue ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false t. ! queue ! rtph264depay ! h264parse ! mpegtsmux ! filesink location="ts.mpg"

You will need to modify it to work with RTP, but that is straightforward. Note that you don't have to re-encode with x264enc unless you want to, but you do need to parse it and wrap it in a muxer.


From: Mattekr <[hidden email]>
To: [hidden email]
Sent: Friday, May 19, 2017 9:04 AM
Subject: Record UDP stream

Hi, I'm a gstreamer newbie.

I would like to see and record a UDP stream from my camera.

I use for see

C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -e -v udpsrc port=5000 !
application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264
! fpsdisplaysink sync=false text-overlay=false

and this for record

C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -e -v udpsrc port=5000 !
application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264
! decodebin ! x264enc ! mp4mux ! filesink
location=C:\\Users\\Progettazione\\Desktop\\file.mp4

All the attempts I made to record and see in one command did not work

For example, I get the error:

WARNING: erroneous pipeline: could not link fpsdisplaysink0 to filesink0

How can I do? Thanks in advance.




--
Sent from the GStreamer-devel mailing list archive at Nabble.com.
_______________________________________________
gstreamer-devel mailing list



_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Record UDP stream

Mattekr
Thank you, I solved with your advice.

Here is the command if it could be useful to someone

C:\gstreamer\1.0\x86_64\bin\gst-launch-1.0.exe -e -v udpsrc port=5000 ! tee name=t t. ! queue ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! fpsdisplaysink sync=false text-overlay=false t. ! queue ! application/x-rtp, payload=96 ! rtpjitterbuffer ! rtph264depay ! avdec_h264 ! decodebin ! x264enc ! mp4mux ! filesink location=C:\\test\\file.mp4
Loading...