How to build opencv with latest version of Gstreamer 1.18

that isn’t gstreamer, that’s ffmpeg

you need to build ffmpeg differently. see here, same error that says “recompile with -fPIC”, and same resolution: Error: ‘AVStream’ {aka ‘struct AVStream’} has no member named ‘codec’ - #8 by crackwitz