简体   繁体   English

Gstreamer splitmuxsrc无法播放splitmuxsink制作的MP4文件

[英]Gstreamer splitmuxsrc does not play splitmuxsink-made MP4 files

Good afternoon, 下午好,

I'm saving RTSP stream as MP4 segments. 我将RTSP流另存为MP4段。

"gst-launch-1.0 -e rtspsrc location=rtsp://192.168.0.108/profile2/media.smp ! splitmuxsink location=storage/%04d.mp4 max-size-time=10000000000 "

And would like to play the videos I've saved earlier in the GTK window, but trying first to play from CLI with: "gst-launch-1.0 splitmuxsrc location=storage/*.mp4 ! decodebin ! videoconvert ! videoscale ! autovideosink" and get 并且想播放我先前在GTK窗口中保存的视频,但首先尝试从CLI播放: "gst-launch-1.0 splitmuxsrc location=storage/*.mp4 ! decodebin ! videoconvert ! videoscale ! autovideosink"和得到

__
New clock: GstSystemClock
Got EOS from element "pipeline0".
Execution ended after 0:00:00.000074602

also try the "gst-launch-1.0 playbin uri="splitmux://*.mp4" from documentation of gst and get the same error. 还可以尝试"gst-launch-1.0 playbin uri="splitmux://*.mp4"文档中的"gst-launch-1.0 playbin uri="splitmux://*.mp4" ,并得到相同的错误。

from PyCharm debugger got this: __ 来自PyCharm调试器的代码是__

gst_base_src_start_complete:<filesrc0> pad not activated yet
basesrc gstbasesrc.c:2396:gst_base_src_update_length:<filesrc0> processing at or past EOS
gst_type_find_element_loop:<typefindelement0> error: Stream contains no data.

If I understand right there is a problem that headers are not recorded, that's why I've tried CLI method and still I got the same error when nothing shows and playback starts right after the first segment. 如果我理解正确,那么就有一个问题,就是没有记录标题,这就是为什么我尝试了CLI方法的原因,但是在第一段之后什么都没有显示并且开始播放时,我仍然遇到相同的错误。

can you help me if there are any ideas? 有什么想法可以帮我吗?

Try h264parse config-interval=-1 (If your stream is H.264 format) before the splitmuxsink . splitmuxsink之前尝试h264parse config-interval=-1 (如果您的流是H.264格式)。 That should write decoder specific data before each key frame. 那应该在每个关键帧之前写入解码器特定的数据。 Since RTSP only sends this info out of band this info is missing from the stream unless You tell h264parse to explicitly insert them. 由于RTSP仅将此信息发送到带外,因此除非您告诉h264parse明确插入它们,否则该信息将从流中丢失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM