GNOME Bugzilla – Bug 645152
encodebin fails when "x-ac3" stream inside "video/mpegts" container
Last modified: 2012-01-19 12:41:23 UTC
Hi, So I have the following code: var cont_format = Caps.from_string ("video/mpegts," + "systemstream=True," + "packetsize=188"); var video_format = Caps.from_string ("video/mpeg,mpegversion=(int)2," + "systemstream=(boolean)false," + "framerate=25/1"); var audio_format = Caps.from_string ("audio/x-ac3"); var enc_container_profile = new EncodingContainerProfile("container", null, cont_format, null); var enc_video_profile = new EncodingVideoProfile (video_format, null, video_restriction, 1); var enc_audio_profile = new EncodingAudioProfile (audio_format, null, null, 1); enc_container_profile.add_profile (enc_video_profile); enc_container_profile.add_profile (enc_audio_profile); but when I try to play the pipeline I get... GStreamer-CRITICAL **: gst_element_get_compatible_pad: assertion `GST_PAD_PEER (pad) == NULL' failed it does work nicely when audio_format = Caps.from_string ("audio/mpeg"); why aren't the pads compatible? how to fix this?
Please provide a backtrace of where that assertion is raised. I'm pretty sure I removed usage of gst_element_get_compatible_pad in encodebin.
+ Trace 226374
Do not use gst_element_get_compatible_pad(), it has side effects you don't seem to be controlling in Rygel. The parameters you gave work fine btw, you can try with the encoding examples in gst-plugins-base/tests/examples/encoding ./encoding -o file://... \ -v "video/mpeg,mpegversion=2,systemstream=False,framerate=25/1" \ -f "video/mpegts,systemstream=True,packetsize=188" -a "audio/x-ac3" \ <inputfile> => produces a valid file with mpeg2video and ac3 in mpeg-ts
In fact, use the code in encoding.c for the logic you should be implementing.
(In reply to comment #3) > Do not use gst_element_get_compatible_pad(), it has side effects you don't seem > to be controlling in Rygel. The docs neglect to mention that so its understandable why app developers would get confused. :) It doesn't discourage it's usage or specify in which situations does this function likely to fail or succeed. > The parameters you gave work fine btw, you can try with the encoding examples > in gst-plugins-base/tests/examples/encoding But that example *is* using gst_element_get_compatible_pad(), though it tries the request_pad when that fails.
Luis, this issue seems to be exactly what was reported yesterday by our debian users. You said on IRC that you might have an idea of what Edward is talking about. Did you got around to fixing this?
I meant to say the *error* is the same: GStreamer-CRITICAL **: gst_element_get_compatible_pad: assertion `GST_PAD_PEER (pad) == NULL' failed
What I meant is that I fixed the code that links the decodebin and encodebin elements. What Edward had suggested was to follow the same logic used in the encoding.c example, and that is what I did.
(In reply to comment #8) > What I meant is that I fixed the code that links the decodebin and encodebin > elements. > > What Edward had suggested was to follow the same logic used in the encoding.c > example, and that is what I did. Good! So the issue observed by debian guys was unrelated? Looks really bad on rygel if ALL transcoding breaks in the first release that uses encodebin. :(
Luis: This still valid with the changes you did and gstreamer 0.10.35?
Luis, ping.
This should be fixed. If that is what you are asking :)
I mean it is fixed
(In reply to comment #13) > I mean it is fixed Cool! Could you then please mark it as such with commit hashes/repo names?
I don't have enough priviledges to change the status. Weird :( Commit hashes: 3f2ecfe8 4c55853f 8def3163
Closing, was never transferred to GStreamer for some reason
(In reply to comment #16) > Closing, was never transferred to GStreamer for some reason er. And never needed to actually.