Errors while gstreamer initialization in android jni project

Hello!

I am trying to use gstreamer on android to obtaing frames from videos on demand. I set up my project following the tutorials, but when I run my app I get lots of warnings and errors from gstreamer mediacodec, kind of:

0:00:00.050855041 0xb400006fb811f0a0 ../ext/adaptivedemux2/gstadaptivedemuxelement.c:41:adaptivedemux2_base_element_init Failed to load libsoup library
16:35:14.517  W  0:00:00.053559208 0xb400006fb811f0a0 ../ext/adaptivedemux2/gstadaptivedemuxelement.c:41:adaptivedemux2_base_element_init Failed to load libsoup library
16:35:14.518  W  0:00:00.054405375 0xb400006fb811f0a0 ../ext/adaptivedemux2/gstadaptivedemuxelement.c:41:adaptivedemux2_base_element_init Failed to load libsoup library
16:35:14.751  E  0:00:00.287678166 0xb400006fb811f0a0 ../sys/androidmedia/gstamc.c:551:accepted_color_formats Unknown color format 0x14, ignoring
16:35:14.751  E  0:00:00.288346875 0xb400006fb811f0a0 ../sys/androidmedia/gstamc.c:551:accepted_color_formats Unknown color format 0x27, ignoring
...

Here is the pastbin with all others logs.

In main activity I make a call:

...
init {
        System.loadLibrary("gstreamer_android")
    }

override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContent {
            MytestappTheme {
                // A surface container using the 'background' color from the theme
                Surface(
                    modifier = Modifier.fillMaxSize(),
                    color = MaterialTheme.colorScheme.background
                ) {
                    MyAppContent(::onButtonClicked)
                }
            }
        }

        // init gstreamer
        try {
            GStreamer.init(this)
        } catch (e: Exception) {
            e.printStackTrace()
            Log.e("Gstreamer","Couldn't init gstreamer")
            finish()
            return
        }
    }
...

Errors appear in logs at this stage. But the app continues working, and when it tries to make pipeline and open mp4 file it gives the following errors:

expected specified color aspects (2:0:0:0)
16:53:16.088  W  0:00:42.574790228 0xb400006fc8086240 ../gst-libs/gst/video/video-info.c:762:gst_video_info_to_caps invalid matrix 3 for RGB format, using RGB
16:53:16.089  E  0:00:42.575359937 0xb400006fc8086240 ../sys/androidmedia/gstamcvideodec.c:1985:gst_amc_video_dec_set_format:<amcvideodec-c2goldfishh264decoder0> Codec only supports GL output but downstream does not
16:53:16.089  W  0:00:42.575614353 0xb400006fc8086240 ../gst-libs/gst/video/gstvideodecoder.c:934:gst_video_decoder_setcaps:<amcvideodec-c2goldfishh264decoder0> Subclass refused caps
16:53:16.089  W  0:00:42.575699270 0xb400006fc8086240 ../gst/playback/gstdecodebin2.c:2555:connect_pad:<decodebin0> Couldn't set amcvideodec-c2goldfishh264decoder0 to PAUSED

I have made a minimal example that shows the full picture of how i set up the whole project. Maybe I configure or initialize smth incorrectly.

Any help is appreciated.

I had the same error with 1.22.10.

Before that I had 1.20.6 and my code worked.

now I have 1.23.90 running.

However, I had to make some changes and it was not so easy to get it to work.

For example, I had to update my ndk version to 23+ and use a new openssh version.

I solved the issue.

Errors like
...Unknown color format 0x14, ignoring
are normal system logs of gstreamer as it tries different initializations underneath.

Regarding the issue
... Codec only supports GL output but downstream does not
my pipeline was incorrect as it couldn’t get decoded frames from GL memory. The correct pipeline for me was:

filesrc location=/your/file/location ! qtdemux ! h264parse ! decodebin ! gldownload ! videoconvert ! appsink name=sink