how to show, save and rtsp multi-video streaming with gstreamer

pengriguang 641468886 at qq.com
Fri Jun 1 07:42:11 UTC 2018


Hello everybody:
 I am doing video processing with gstreamer-imx(Yocto/gstreamer – Gateworks
) plugins on IMX6DL board, I have two video capture channels on the board,
one is OV5460 camera with MIPI interface, the other is usb camera.

The scenario can be described as follows:
1. display two capture video individually at the same time on lvds screen ,
one window display the mipi camera, the other window dispaly the usb camera,
when I click any one of the two windows, it can be  shown in full-screen; 
2. save capture data of the two cameras individually for every five minutes,
that is say, every five minutes, the Imx6 board will generate two new files,
one is for mipi camera, the other is for usb camera;
3. by using individualized sinks of gstreamer to transform video streams,
display the two camera individually with VLC tool on my PC, the protocol is
rtsp, when I click any one of the two windows, it can be  shown in
full-screen.

I look up the website: http://trac.gateworks.com/wiki/Yocto/gstreamer, and
do something as follows:
1. show local video of two channels by command 
    gst-launch-1.0 \
      imxv4l2videosrc device=/dev/video0 ! imxg2dvideosink window-width=640
window-height=480 window-x-coord=0 window-y-coord=0 \
      imxv4l2src device=/dev/video2 ! imxg2dvideosink window-width=640
window-height=480 window-x-coord=640 window-y-coord=0
2. show and save video data of one channel locally by command
    gst-launch-1.0 \ 
      imxv4l2videosrc device=/dev/video0 ! tee name= tee0 tee0. ! queue !
imxvpuenc_h264 bitrate=10000 ! filesink location=/tmp/file1.h264 \
      tee0. !  queue  ! imxg2dvideosink window-width=640 window-height=480
window-x-coord=0 window-y-coord=0 
3. don't know how to generate two files every minutes, I know that I need a
timer, the timer can do something each five minutes, but I don't know how to
operate the gstreamer, do I need close the pipeline of gstreamer, then open
it again?
4. to show the rstp video streaming on my PC, I look up the website:
http://trac.gateworks.com/wiki/Yocto/gstreamer/streaming , it use the
gst-variable-rtsp-server tool to act as rtsp server, like this
      gst-variable-rtsp-server -p 9001 -u \

          "imxv4l2videosrc device=/dev/video0 ! imxipuvideotransform !
imxvpuenc_h264 bitrate=1000 ! rtph264pay name=pay0 pt=96"
it can show one channel video streaming normally on my PC with VLC,  the
launch of rtsp 
 servidr is "imxv4l2videosrc device=/dev/video0 ! imxipuvideotransform !
imxvpuenc_h264 bitrate=1000 ! rtph264pay name=pay0 pt=96"
5. when I integrate with show, save to rtsp launch, then play the pipeline,
it doesn't save the file in my disk flash or show the video on screen. If I
connect the rtsp server from rtsp client of VLC in my PC, it will trigger
the launch of rtsp server to run.

who can give some advice about these problems, thank you very much!



--
Sent from: http://gstreamer-devel.966125.n4.nabble.com/


More information about the gstreamer-devel mailing list