我正在尝试编写一个简单的管道,以在固定的持续时间内将本地存储中的MP4文件拆分为多个块。我尝试使用几个不同的选项,但似乎都不起作用。
顺便说一句,由于一些许可问题,我们很难不使用ffmpeg库,所以我现在拥有的插件是
gst-plugins-base-1.8.3
gst-plugins-good-1.8.3
and some bad plugins libs (h264parse, mpegtsmux, hlssink)
你能帮我用gstreamer解决这个问题吗?
我试过的几个样品
gst-launch-1.0 filesrc location=/tmp/sample/BigBuckBunny_175k.mp4 ! h264parse ! splitmuxsink location=/tmp/sample/segments/segment%05d.mp4 max-size-time=10000000000
gst-launch-1.0 filesrc location=/tmp/sample/BigBuckBunny_175k.mp4 ! splitmuxsink location=/tmp/sample/segments/segment%05d.mp4 max-size-time=10000000000
gst-launch-1.0 filesrc location=/tmp/sample/BigBuckBunny_175k.mp4 ! decodebin ! videoconvert ! x264enc ! splitmuxsink location=/tmp/sample/segments/segment%05d.mp4 max-size-time=10000000000