我在 odroid xu4 上安装了 C920 logitec usb 网络摄像头,并安装了 linux ubuntu。我想以 h264 格式录制最高质量的视频。
所以每秒 30 帧和 1920x1080 视频大小。同时发送流 h264 格式但质量较低。
我可以以相同的质量录制和流式传输,但质量不同。现在有没有人如何修复管道,以便我可以以较低的质量流式传输?工作(相同的分辨率):
gst-launch-1.0 v4l2src device=/dev/video0 ! tee name=t \
! queue ! video/x-h264,framerate=30/1,width=1920,height=1080 ! h264parse ! mp4mux ! filesink location=/media/webcam.mp4 -v -e t. \
! queue ! h264parse ! rtph264pay ! udpsink host=113.141.0.1 port=4321
不工作:(发送尺寸 800x600):
gst-launch-1.0 v4l2src device=/dev/video0 ! tee name=t \
! queue ! video/x-h264,framerate=30/1,width=1920,height=1080 ! h264parse ! mp4mux ! filesink location=/media/webcam.mp4 -v -e t. \
! queue ! video/x-h264,framerate=30/1,width=800,height=600 ! h264parse ! rtph264pay ! udpsink host=113.141.0.1 port=4321
这是我尝试不同分辨率时遇到的错误:
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Internal data flow error.
Additional debug info:
gstbasesrc.c(2865): gst_base_src_loop (): /GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
streaming task paused, reason not-negotiated (-4)
/GstPipeline:pipeline0/GstMP4Mux:mp4mux0.GstPad:src: caps = video/quicktime, variant=(string)iso
EOS on shutdown enabled -- waiting for EOS after Error
Waiting for EOS...
/GstPipeline:pipeline0/GstFileSink:filesink0.GstPad:sink: caps = video/quicktime, variant=(string)iso
ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse1: No valid frames found before end of stream
Additional debug info:
gstbaseparse.c(1153): gst_base_parse_sink_event_default (): /GstPipeline:pipeline0/GstH264Parse:h264parse1
ERROR: from element /GstPipeline:pipeline0/GstH264Parse:h264parse0: No valid frames found before end of stream
Additional debug info:
gstbaseparse.c(1153): gst_base_parse_sink_event_default (): /GstPipeline:pipeline0/GstH264Parse:h264parse0