How to convert two different input formats to one output format. Without restarting the script

Good day.

There is a module ADV7280AM which, automatically detect and convert standard
composite analog baseband video signals compatible with worldwide National Television System Committee (NTSC), phase alternating line (PAL), and sequential color with memory (SECAM) standards.

We can start image capture with a simple script.

gst-launch-1.0 v4l2src device=/dev/videoX ! xvimagesink sync=false 

The problem lies in different resolution (number of lines) for PAL and NTSC standard.
If the input of ADV7280AM was named video signal standard.
For example, when running the script was captured a single signal in PAL standard, but in the process the standard of the signal has changed and at the input of ADV7280 signal NTSC.
Then due to the fact that in NTSC is less number of lines, the image begins to twitch.
Accordingly, we have to restart the script.

We want to solve this problem without restarting gst-launch-1.0.

For example, so:
PAL transmits more lines than NTSC.
For PAL - we need a filter that recognizes the number of strings on the input, cut them to NTSC and pass them to xvimagesink.
For NTSC - this filter will pass the signal without changes to xvimagesink.
Then the image should not be corrupted.

Is there such a ready-made gstreamer element?
If not is it possible to make one?

Sorry, I’m a newbie and don’t fully understand the structure of gstreamer yet.

Thanks.

Hi,

The ADV7280AM can be setup to autodetect and process the input standard selecting corresponding width and height. Is the ADV7280 configure to autodetect the standard?

You could check this using v4l2-ctl -d /dev/videoX --get-standard or reading the Video Selection 2 register 0x02.

Also, an option you can try is GStreamer Daemon (GstD) to dinamically interact with a GStreamer element. Add a capsfilter element and with GstD you can modify the element properties such as the caps to change the height.