How to set videoflip video-direction? (instead of method= in pipeline)

Using “videoflip method=…” got broken in GStreamer 1.22.0 and was only
fixed in 1.20.3, leaving it broken until some time in the future for Debian 12 Bookworm users, including Raspberry Pi OS.

I was using “!videoflip method= …” with gst_parse_launch in my app

When and where and how can the video-direction be set? (when gstreamer is initialized, when the pipeline is created, or when video starts?)

The GstVideoDirection documentation isn’t very informative

I tested that the following command works

gst-launch-1.0 v4l2src device=/dev/video12 ! video/x-raw,format=NV12,width=1920,height=1080 ! videoscale ! video/x-raw,width=640,height=480 ! videoflip video-direction=180 ! autovideosink

You can view the latest parameters via gst-inspect-1.0 videoflip