# GStreamer on Meta Quest 3 with Unreal

**URL:** https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866
**Category:** Application Development
**Tags:** android
**Created:** [January 24, 2024, 12:57am UTC](https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866 "2024-01-24T00:57:56Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![bsyzek](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/bsyzek/32/323_2.png) [@bsyzek](https://discourse.gstreamer.org/u/bsyzek)
#### Post date: [January 24, 2024, 12:57am UTC](https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866/1 "2024-01-24T00:57:56Z")

</div>

Hello - I’m trying to use GStreamer inside of an Unreal app that is being deployed to a Meta Quest 3 headset. I am working off of this existing [Unreal-GStreamer plugin](https://github.com/wongfei/ue4-gstreamer) which works well for Unreal apps deployed on Windows.

I have successfully built the GStreamer Android tutorials in Android Studio, and have loaded those APKs onto the Quest headset to verify that they work (they do). I have also been able to build my Unreal app with the static GStreamer libraries to the point where I can verify that gst\_init is working on the headset when the app is loaded.

However, when the app tries to build a pipeline using gst\_parse\_launch with the config string “videotestsrc pattern=snow ! video/x-raw,width=(int)512,height=(int)512,format=(string)RGBA,framerate=(fraction)30/1 ! appsink name=sink” I am getting the error that gst\_parse\_launch failed and that it can’t find element videotestsrc.

Does this error mean that it can’t find the shared library file libgstreamer\_android.so? Other than this shared library file, do any other GStreamer files needed to be copied to the headset alongside the APK? Forgive my lack of Android knowledge, but I’m unclear on why gst\_parse\_launch can’t find the videotestsrc element. I have copied libgstreamer\_android.so onto the headset and it was built with all of the gstreamer plugins included using the GSTREAMER\_PLUGINS section of the in the Android.mk file.

Any advice on what specific gstreamer files are needed to be deployed alongside the APK (built with Unreal) would be much appreciated!

---

<div class="post-metadata">

### Author: ![philn](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/philn/32/13_2.png) [@philn](https://discourse.gstreamer.org/u/philn)
#### Post date: [January 29, 2024, 4:34pm UTC](https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866/2 "2024-01-29T16:34:09Z")

</div>

In your app do you call `GStreamer.init(context);` after loading `gstreamer_android`?

See also this [sample player app](https://gitlab.freedesktop.org/gstreamer/gstreamer/-/tree/main/subprojects/gst-examples/playback/player/android/app/src/main/java/org/freedesktop/gstreamer/Player.java)

---

<div class="post-metadata">

### Author: ![philn](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/philn/32/13_2.png) [@philn](https://discourse.gstreamer.org/u/philn)
#### Post date: [January 29, 2024, 4:40pm UTC](https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866/3 "2024-01-29T16:40:22Z")

</div>

`videotestsrc` is reported as not found possibly because the GStreamer library wasn’t initialized beforehand. If it was and you still get the error, check the logs by setting the env var `GST_DEBUG=5` that might provide some clues.

I haven’t worked on Android recently, not sure I can help further 🙂

---

<div class="post-metadata">

### Author: ![bsyzek](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/bsyzek/32/323_2.png) [@bsyzek](https://discourse.gstreamer.org/u/bsyzek)
#### Post date: [January 30, 2024, 7:48pm UTC](https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866/4 "2024-01-30T19:48:46Z")

</div>

Thanks for the reply @philn

With Unreal, it looks like all of the Java code is automatically generated by the build system, so while I don’t know if GStreamer.init(context) is called in Java, I am able to #include gst.h and use gst\_init(&argc, &argv) in my C++ code and when I call gst\_is\_initialized() I get true.

I’ve actually made some progress and no longer get ‘videotestsrc not found’ and I believe that was due to Unreal’s build system not copying libgstreamer\_android.so into the APK.

Now, however, I’m getting some lower level memory errors that I believe are due to libgstreamer\_android.so depending on libc++\_shared.so instead of static libc++ (which is what Unreal wants), so I’m working on rebuilding libgstreamer\_android.so with libc++ static instead of shared.

We’ll see how that goes! Just changing APP\_STL to c++\_static in Application.mk doesn’t seem to be working for me, so I’d love the help if anyone has any advice.

Thanks!

---

<div class="post-metadata">

### Author: ![Vanja](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/vanja/32/434_2.png) [@Vanja](https://discourse.gstreamer.org/u/Vanja)
#### Post date: [March 15, 2024, 12:54pm UTC](https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866/5 "2024-03-15T12:54:44Z")

</div>

Hi bsyzek,

Did you get it any progress on the topic?

Cause, I am looking for a similar solution to stream Unreal Engine content with alpha channel to an Oculus Quest3 app. So the Quests passthrough is not sent back and forth over the quest link

---

<div class="post-metadata">

### Author: ![hi\_im\_reed](https://discourse.gstreamer.org/user_avatar/discourse.gstreamer.org/hi_im_reed/32/503_2.png) [@hi\_im\_reed](https://discourse.gstreamer.org/u/hi_im_reed)
#### Post date: [May 10, 2024, 9:50pm UTC](https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866/6 "2024-05-10T21:50:45Z")

</div>

Hey man, I ran into the same problems lmao and found this post. Have you made progress? Would you like to team up? Ya know, with our powers combined…

---

<div class="post-metadata">

### Author: ![efernandez](https://discourse.gstreamer.org/letter_avatar_proxy/v4/letter/e/7c8e57/32.png) [@efernandez](https://discourse.gstreamer.org/u/efernandez)
#### Post date: [September 6, 2024, 2:48pm UTC](https://discourse.gstreamer.org/t/gstreamer-on-meta-quest-3-with-unreal/866/7 "2024-09-06T14:48:55Z")

</div>

Hi

We have developed a Unity application running a GStreamer plugin under the hood. [Here](https://developer.ridgerun.com/wiki/index.php/NVIDIA_GTC_2024_360_VR_Demo/Low_Latency_Streaming) you can find more information.

Feel free to contact us at [support@ridgerun.com](mailto:support@ridgerun.com) if you want to know more.
