Video 使用gstreamer将h264流包装到mp4中

Video 使用gstreamer将h264流包装到mp4中,video,h.264,mp4,gstreamer,Video,H.264,Mp4,Gstreamer,如何使用Gstreamer将纯h.264流包装到mp4中,以便在视频中查找特定位置?使用Gstreamer是因为它的许可证要求,所以请不要提供ffmpeg 好的,这给出了h264parse0中的错误:GStreamer遇到了一般流错误。和流停止,原因未协商。。gst-launch-1.0 filesrc location=stream.h264!视频/x-h264!h264parse!mp4mux!gstreamer 1.16中的filesink location=video.mp4这会给出“错

如何使用Gstreamer将纯h.264流包装到mp4中,以便在视频中查找特定位置?使用Gstreamer是因为它的许可证要求,所以请不要提供ffmpeg

好的,这给出了
h264parse0中的错误:GStreamer遇到了一般流错误。
流停止,原因未协商。
。gst-launch-1.0 filesrc location=stream.h264!视频/x-h264!h264parse!mp4mux!gstreamer 1.16中的filesink location=video.mp4这会给出“错误:来自元素/GstPipeline:pipeline0/GstMP4Mux:mp4mux0:无法多路传输流”。@user1145922请参阅前面的注释(以及现在更新的示例)。从h264parse和mp4mux的gst-inspect-1.0中,您可以看到pad模板是兼容的。如果它不适用于您,请在fiull log输出中发布一个要点。@ensonic我认为我遇到的问题是因为我使用的文件实际上不是.h264文件,尽管它被标记为.h264文件。它实际上是一个包含h264流的MPEG-2 TS。
gst-launch-1.0 filesrc location=stream.h264 ! video/x-h264 ! h264parse ! mp4mux ! filesink location=video.mp4