<div dir="ltr">I am using gstreamer for python to record videos. I am using "v4l2src" and "ximagesrc" as video source plugins. I am not setting the video resolution, so the output resolution is determined by the input resolution. At what point can I find out what that resolution is and what is the correct way of getting the resolution (width and height)? I have looked through the documentation and know it has something to do with pads or caps but have tried and not succeeded in finding the resolution unless I set it myself. Thanks for your help!<br><br>This is my pipeline setup code :<br>`<br>bin = gst.Bin()<div><br></div><div>filesink = gst.element_factory_make('filesink', 'filesink')</div><div>filesink.set_property('location', self.location)</div><div>bin.add(filesink)</div><div><br></div><div>videoqueue = gst.element_factory_make("queue", "videoqueue")</div><div>bin.add(videoqueue)</div><div><br></div><div>videocodec = gst.element_factory_make("theoraenc", "videocodec")</div><div>videocodec.set_property("bitrate", self.config.video_bitrate)</div><div>bin.add(videocodec)</div><div><br></div><div># Setup ghost pads</div><div>videopad = videoqueue.get_pad("sink")</div><div>video_ghostpad = gst.GhostPad("videosink", videopad)</div><div>bin.add_pad(video_ghostpad)</div><div><br></div><div># Link Elements</div><div>videoqueue.link(videocodec)</div><div>videocodec.link(muxer)</div><div><br></div><div># Link muxer to filesink</div><div>muxer.link(filesink)</div><div>`<br><br>Later I am linking my mixer plugin, with my video input plugin:<br>`<br><div>self.player = gst.Pipeline('player')</div><div>bus = self.player.get_bus()</div><div>bus.add_signal_watch()</div><div>bus.enable_sync_message_emission()</div><div>bus.connect('message', self.on_message)</div><div>bus.connect('sync-message::element', self.on_sync_message)</div><div><br></div><div>self.video_tee = gst.element_factory_make('tee', 'video_tee')</div><div>self.player.add(self.video_tee)</div><div><br></div><div>self.player.add(self.videomixer)</div><div>self.videomixer.link(self.video_tee)</div><div><br></div><div>self.player.add(input)</div><div>input.link(mixer)<br>`<br><br>There might be some code in the middle connecting them that I have not put here but I hope this will give you enough of an idea what I'm doing.</div></div></div>