Video streaming Gstreamer管道在记录mp4 EOS问题的输出时显示摄像机馈送

Video streaming Gstreamer管道在记录mp4 EOS问题的输出时显示摄像机馈送,video-streaming,gstreamer,mp4,Video Streaming,Gstreamer,Mp4,我正在使用以下管道从Jetson Nano的PSEye摄像头传输视频: gst-launch-1.0 -e v4l2src device=/dev/video0 ! "video/x-raw, width=640, height=480, framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nvv4l2vp8enc bitrate=1000000 ! queue ! rtpvp8pay ! udpsink host=10.50.2

我正在使用以下管道从Jetson Nano的PSEye摄像头传输视频:

gst-launch-1.0 -e v4l2src device=/dev/video0 ! "video/x-raw, width=640, height=480, framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nvv4l2vp8enc bitrate=1000000 ! queue ! rtpvp8pay ! udpsink host=10.50.26.5 port=5801
gst-launch-1.0 udpsrc port=5801 ! "application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=VP8" ! rtpvp8depay ! decodebin ! autovideosink
gst-launch-1.0 -e udpsrc port=5801 ! "application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=VP8" ! rtpvp8depay ! decodebin ! x264enc bitrate=1024 ! mp4mux ! filesink location=test.mp4
我当前正在使用以下管道通过网络在另一台计算机(Windows 10)上接收视频文件:

gst-launch-1.0 -e v4l2src device=/dev/video0 ! "video/x-raw, width=640, height=480, framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nvv4l2vp8enc bitrate=1000000 ! queue ! rtpvp8pay ! udpsink host=10.50.26.5 port=5801
gst-launch-1.0 udpsrc port=5801 ! "application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=VP8" ! rtpvp8depay ! decodebin ! autovideosink
gst-launch-1.0 -e udpsrc port=5801 ! "application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=VP8" ! rtpvp8depay ! decodebin ! x264enc bitrate=1024 ! mp4mux ! filesink location=test.mp4
我已成功地将视频录制到mp4,而不是使用此管道进行显示:

gst-launch-1.0 -e v4l2src device=/dev/video0 ! "video/x-raw, width=640, height=480, framerate=30/1" ! nvvidconv ! "video/x-raw(memory:NVMM)" ! nvv4l2vp8enc bitrate=1000000 ! queue ! rtpvp8pay ! udpsink host=10.50.26.5 port=5801
gst-launch-1.0 udpsrc port=5801 ! "application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=VP8" ! rtpvp8depay ! decodebin ! autovideosink
gst-launch-1.0 -e udpsrc port=5801 ! "application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=VP8" ! rtpvp8depay ! decodebin ! x264enc bitrate=1024 ! mp4mux ! filesink location=test.mp4
但是,当我添加一个同时显示视频的T形三通时,当我在命令提示符下按住Ctrl+C组合键以停止管道时,将显示以下消息并将冻结,直到再次按住Ctrl+C组合键为止:

Interrupt: Stopping pipeline ...
EOS on shutdown enabled -- Forcing EOS on the pipeline
如果在之后按Ctrl+C组合键,MP4文件将无法获取最后一帧,并将损坏。我正在使用此管道在录制MP4时显示视频,但MP4总是被损坏:

gst-launch-1.0 udpsrc port=5801 ! "application/x-rtp, clock-rate=(int)90000, media=(string)video, encoding-name=VP8" ! rtpvp8depay ! decodebin ! tee name = t ! queue ! x264enc bitrate=1024 ! mp4mux ! filesink location=test.mp4 t. ! queue ! autovideosink -e
我还尝试在autovideosink之后使用FileLink,将-e移动到gst-launch-1.0之后,以及上述管道的许多其他排列。我仍然在让MP4正确终止以避免损坏文件方面存在问题,但我已经成功地显示了视频


提前感谢您的回复。

遇到了完全相同的问题。我的解决方案是使用其他muxer而不是mp4mux。qtmux和avmux_mp4为我工作。

有完全相同的问题。我的解决方案是使用其他muxer而不是mp4mux。qtmux和avmux_mp4为我工作