Recording and Streaming Simultaneously

killerrats koreysjunkmail at
Fri May 3 23:51:17 UTC 2019

Try this pipeline:
gst-launch-1.0  --gst-debug-level=3 -e -v v4l2src device=/dev/video0
do-timestamp=true ! tee name=tee ! capsfilter
caps="video/x-raw,width=1920,height=1080,framerate=30/1" ! videoflip
method=rotate-180 ! videoconvert ! videorate ! queue ! omxh264enc !
h264parse ! splitmuxsink mux=avimux location=test_video.h264%04d.avi
max-files=100 max-size-bytes=1000000 tee. ! capsfilter
caps="video/x-raw,width=640,height=480,framerate=30/1" ! queue ! omxh264enc
! queue ! h264parse ! mpegtsmux ! rtpmp2tpay ! udpsink host=

this has the -e which when you stop the pipeline it will put eos through the
file. also has h264parse to parse the h264 video and plus has the
do-timestamp to true for the v4l2src to set timestamps on the buffers coming
in. The splitmux will set the number of files and how much each file
contains. the location has your filename but has "%04d" which tells it 4
digits of numbers in the sequence to write to the current directory. the
splitmux has a set of avimux for the muxer and the sink is the filesink
default for that element. I hope the splitmuxsink element is on the machine
you are using. I also used a tee which might split up the signal, i'm hoping
that works.

Gstreamer 1.14.3
Sent from:

More information about the gstreamer-devel mailing list