Injecting metadata from file MISP

danielopes92 daniel.lopes at uavision.com
Mon Apr 13 18:25:56 UTC 2020


Hello Sirs,
I'am looking for a solution that streams H264 MPEG2-TS video over UDP-RTP
with KLV metadata. I'am using the gstreamer and until now i'am already able
to read frames from camera, compress them into H264 MPEG2-TS and send them
via RTP-UDP to a client. Now i would like to generate a KLV package with my
own platform attitude data and join it to my MPEG2-TS packages. These
packages will be received by the client that will see the video and decoded
metadata at the same time. I'am developing this in python using also the
opencv. Any help? This is my code:

...SOME CODE...

gst_str = ('v4l2src device=/dev/video{} ! '
               'video/x-raw, width=(int){}, height=(int){} ! '
               'videoconvert ! appsink').format(dev, width, height)
cap = cv2.VideoCapture(gst_str, cv2.CAP_GSTREAMER)

gst_str_rtp = "appsrc ! videoconvert ! x264enc tune=zerolatency bitrate=1000
speed-preset=superfast ! mpegtsmux ! rtpmp2tpay ! udpsink
host=192.168.99.133 port=15004"

out = cv2.VideoWriter(gst_str_rtp, 0, 30, (1920, 1080), True)

while True:
        _, img = cap.read() # grab the next image frame from camera
        out.write(img)





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


More information about the gstreamer-devel mailing list