Gstreamer rtsp server and recording at the save time on the imx8m

cancel
Showing results for 
Search instead for 
Did you mean: 

Gstreamer rtsp server and recording at the save time on the imx8m

75 Views
Contributor II

Hi All,

I want to use gstreamer to capture video from camera and save it to file,At the same time push the video stream to Internet as rtsp server, can you give me a example? because I don't find a example like these

on the "i.MX_Linux_User's_Guide.pdf".

thank you!

0 Kudos
3 Replies

68 Views
NXP TechSupport
NXP TechSupport

You can use "tee" option for gstreamer for it to split the stream into branches. So than you can record to a file one branch of incoming stream and send to the internet another one.

0 Kudos

58 Views
Contributor II

Hi,

Thank you for your reply.

I use these try:

./gst-variable-rtsp-server -p 554 -u "v4l2src device=/dev/video0 ! video/x-raw,width=1920,height=1080,framerate=(fraction)60/1 ! vpuenc_h264 bitrate=2000 ! tee name=t ! queue ! rtph264pay name=pay0 pt=96 t. ! filesink location=./test-743-02.mp4"

but it can't do well.

if i use gst-variable-rtsp-server as rtsp server only that is ok. i use gst-launch-1.0  to recording video to file that is ok. but i don't know how to combine these, can you give me a example.

thank you very much!

0 Kudos

19 Views
NXP TechSupport
NXP TechSupport

After you assigned a name "t" you can use it for both branches of the flow.
Here is an example of "tee" sintax:

gst-launch filesrc location=src.file ! tee name=tp tp. ! queue ! filesink location=dst1.file tp. ! queue ! filesink location=dst2.file

0 Kudos