gstreamer-1.8.3 v4l2src到组播

时间:2018-04-23 16:35:27

标签: gstreamer gstreamer-1.0

我使用gstreamer-1.2.4将流从v4l2src发送到多播并将其写入共享内存。管道是:

v4l2src device=${device} do-timestamp=true blocksize=400000 typefind=true \
    ! "video/x-h264, width=(int)${width}, height=(int)${height}, framerate=(fraction)${framerate}, interlace-mode=(string)progressive, pixel-aspect-ratio=(fraction)1/1" \
    ! h264parse \
    ! "video/x-h264, alignment=(string)au, stream-format=(string)avc, parsed=(boolean)true" \
    ! tee name=video1tee \
        video1tee. ! queue \
                ! rtph264pay config-interval=1 \
                ! application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264, payload=(int)96 \
                ! queue \
                ! udpsink multicast-iface=${IFACE_OUT} host=${MULTICAST_OUT_IP_ADDR} port=${VIDEO_OUT_UDP_PORT} ttl-mc=10 auto-multicast=false sync=true async=false
        video1tee. ! queue leaky=downstream \
                ! shmsink socket-path=\"/tmp/camera_shmsink\" shm-size=20000000 wait-for-connection=false max-lateness=5000000000 sync=false async=false > ${logfile} 2>&1

现在,我将它更新为gstreamer-1.8.3,这个管道不起作用。然后我尝试查看这个多播流,我什么也得不到。硬件没有改变。 我也有警告:

v4l2src gstv4l2src.c:862:gst_v4l2src_create:<v4l2src0> lost frames detected: count = 18446744073709551615 - ts: 0:00:09.8444373543    
h264parse gsth264parse.c:1205:gst_h264_parse_handle_frame:<h264parse0> broken/invalid nal Type: 1 Slice, Size: 22638 will be dropped

然后我删除

! h264parse \
! "video/x-h264, alignment=(string)au, stream-format=(string)avc, parsed=(boolean)true" \

我得到一个绿色的屏幕。

观看视频的管道:

udpsrc do-timestamp=true buffer-size=30000000 address=227.1.1.11 auto-multicast=true port=51012 caps="application/x-rtp, media=(string)video, clock-rate=(int)90000, encoding-name=(string)H264" ! rtph264depay ! h264parse ! avdec_h264 output-corrupt=false ! autovideoconvert ! videocrop ! videoscale ! videobalance ! video/x-raw, format=(string)YV12, colorimetry=(string)bt601 ! autovideoconvert ! fpsdisplaysink

为什么它在旧版本中有效,但在新版本中不起作用?

0 个答案:

没有答案