rafauu
rafauu

Reputation: 101

Q: Gstreamer mp4mux issue with encodebin and concat pipeline

I've been trying out this fancy encodebin gstreamer element lately. Simple examples work pretty well but I have some issues with more complex pipelines. I'm using gst-launch-1.0 version 1.18.4 on msys. My workflow is as follows:

Firstly I create some mp4 file from scratch using encodebin (it chooses best encoder, in my case it uses nvidia gpu):

gst-launch-1.0.exe videotestsrc num-buffers=100 ! encodebin profile="video/quicktime,variant=iso:video/x-h264,tune=zerolatency,profile=baseline" ! filesink location="input.mp4"

This part works well, it uses hardware encoding, everything is fine here.

Then I want to append some realtime stream to this file preserving time and so on. Pipeline I created for that purpose:

GST_DEBUG=3 gst-launch-1.0.exe concat name=c ! m.video_0 mp4mux name=m ! filesink location=out.mp4 filesrc location=input.mp4 ! parsebin ! h264parse ! c. videotestsrc num-buffers=100 ! encodebin profile="video/x-h264,tune=zerolatency,profile=baseline" ! c.

Apparently it does not work for me, I get:

/GstPipeline:pipeline0/GstVideoTestSrc:videotestsrc0: Internal data stream error.

streaming stopped, reason not-negotiated (-4)

Interestingly if we switch from mp4mux to mpegtsmux it works well:

gst-launch-1.0.exe concat name=c ! mpegtsmux ! filesink location=out.mp4 filesrc location=input.mp4 ! parsebin ! h264parse ! c. videotestsrc num-buffers=100 ! encodebin profile="video/x-h264,tune=zerolatency,profile=baseline" ! c.

So I've started wondering, is it something with mp4mux pads? Anyone has an idea why it does not work with mp4mux?

Upvotes: 1

Views: 1060

Answers (0)

Related Questions