Android development for OBS

Moran

New Member
Hello guys,

We are software engineering students, and are doing our final project.
We chose the subject to be OBS for android.
First we wanted to ask, has anyone already done it? and is there access to the source code?
And is it possible to compile the cross platform code to android?

We are in the early stages of gathering information for the research - about how OBS works.
We already compiled on windows and have started to debug, but it is very complicated and hard to understand.
If there are any UML diagrams (e.g. class, state), it would be very helpful
And any advice will be appreciated..

Thanks,
Moran and Gili
 

Jim

Jim
Developer
No one has attempted to port it yet to my knowledge, though some have expressed the desire. It can't currently compile on android, but sure, it's possible to port the core libraries (but not the UI), and I personally don't particularly mind as long as it doesn't negatively impact the current work we're doing or our development workflow. I can't be guaranteed that I can have time to personally help with things in terms of code, you need to be able to hold your own to prevent it from impacting my own workflow if possible. I'm always around to talk however.

To port to different operating systems/architectures, there's fair amount of things you'll have to do:

1.) Currently it's a little bit dependent on the x86 architecture. There's some architecture-specific intrinsics in the code that need to be #ifdef'ed for this sort of thing. Most of the 3D math in libobs/graphics uses x86 SSE intrinsics, for example. There's also some image conversion code that uses SSE in libobs/media-io. You'll have to #ifdef that with android equivalent or general architecture-independent C code.

2.) For graphics, we use a custom abstraction, and it currently requires OpenGL 3.2 equivalent of shader support. If you can't access normal OpenGL on android, you'll probably have to make an OpenGL ES graphics library, which isn't too big of a deal as long as it's compatible with our graphics subsystem design (which it should be). OpenGL ES is fairly similar to regular OpenGL and you should be able to do that without too much issue. If OpenGL ES use similar shaders to OpenGL you could probably use the same shader conversion code that regular OpenGL uses. I haven't used OpenGL ES yet so I don't know too much about it other than what little I've skimmed through. We have to use a custom graphics subsystem to maximize capture performance so it's a bit of an annoyance to have to deal with it.

3.) There's some platform-specific stuff (primarily in libobs/util) that you'd have to adapt for android.

4.) You'll have to write some capture modules for capturing the android screen, camera, and mics.

5.) The UI probably won't be something you can port. I'd assume you'd have to make an android-specific UI for it.

API documentation is currently very lacking, though I'm planning on making some very thorough documentation as soon as I have time using Sphinx most likely. Before doing that I've been going over some API design quirks that I'd like to resolve first, which keep leading me on side-adventures in to other features that need to be finished (such as transitions and the current audio subsystem overhaul that are being worked on). I'm always around if you have questions - fastest way to get in touch is IRC.

The core by itself is probably not too big of a deal to port, and though the graphics might be a little bit annoying it's probably not too different from regular OpenGL so I'd expect that to be no big deal as well. Ideally you'll also want audio/video capture, and then to use it you'll need some sort of front-end. So no matter what you still have quite a bit to do.
 

dodgepong

Administrator
Forum Admin
I never quite understand what people mean when they say they want OBS for Android. Is there screen capture functionality on Android that could be leveraged to stream your actions on screen in any applications, including games and drawing programs? Can you capture audio to stream it out? Or do you just want to stream the input from the camera? Is anyone at all concerned about the high performance requirements necessary for video encoding and compositing?

It just seems weird to me. I feel like if I were streaming, I would want something more flexible and powerful than a mobile device, and if I wanted to stream the device itself, I'd rather get a capture card. Maybe it's just me being a curmudgeon.
 

Midnitte

New Member
I never quite understand what people mean when they say they want OBS for Android. Is there screen capture functionality on Android that could be leveraged to stream your actions on screen in any applications, including games and drawing programs? Can you capture audio to stream it out? Or do you just want to stream the input from the camera? Is anyone at all concerned about the high performance requirements necessary for video encoding and compositing?

It just seems weird to me. I feel like if I were streaming, I would want something more flexible and powerful than a mobile device, and if I wanted to stream the device itself, I'd rather get a capture card. Maybe it's just me being a curmudgeon.
Both Youtube Gaming and the Play Games app do all of these. ;)
 

Ken Elkind

New Member
I'm lookin' to have streams coming in continuously from around the world! Seems android or i-phones would be the way to go... 'specially since I now have an android!! My site is video'd with you tube & they say they'll have something soon??!!?? Googlabilify!!
 

CornerStone

New Member
@Moran and @Jim Please keep us updated on the progress of this or if you find a project already doing this. It will really be good to be able to do live streaming from Android devices. Even if it is only the Camera. We actually only need camera streaming for our project.
 
No one has attempted to port it yet to my knowledge, though some have expressed the desire. It can't currently compile on android, but sure, it's possible to port the core libraries (but not the UI), and I personally don't particularly mind as long as it doesn't negatively impact the current work we're doing or our development workflow. I can't be guaranteed that I can have time to personally help with things in terms of code, you need to be able to hold your own to prevent it from impacting my own workflow if possible. I'm always around to talk however.

To port to different operating systems/architectures, there's fair amount of things you'll have to do:

1.) Currently it's a little bit dependent on the x86 architecture. There's some architecture-specific intrinsics in the code that need to be #ifdef'ed for this sort of thing. Most of the 3D math in libobs/graphics uses x86 SSE intrinsics, for example. There's also some image conversion code that uses SSE in libobs/media-io. You'll have to #ifdef that with android equivalent or general architecture-independent C code.

2.) For graphics, we use a custom abstraction, and it currently requires OpenGL 3.2 equivalent of shader support. If you can't access normal OpenGL on android, you'll probably have to make an OpenGL ES graphics library, which isn't too big of a deal as long as it's compatible with our graphics subsystem design (which it should be). OpenGL ES is fairly similar to regular OpenGL and you should be able to do that without too much issue. If OpenGL ES use similar shaders to OpenGL you could probably use the same shader conversion code that regular OpenGL uses. I haven't used OpenGL ES yet so I don't know too much about it other than what little I've skimmed through. We have to use a custom graphics subsystem to maximize capture performance so it's a bit of an annoyance to have to deal with it.

3.) There's some platform-specific stuff (primarily in libobs/util) that you'd have to adapt for android.

4.) You'll have to write some capture modules for capturing the android screen, camera, and mics.

5.) The UI probably won't be something you can port. I'd assume you'd have to make an android-specific UI for it.

API documentation is currently very lacking, though I'm planning on making some very thorough documentation as soon as I have time using Sphinx most likely. Before doing that I've been going over some API design quirks that I'd like to resolve first, which keep leading me on side-adventures in to other features that need to be finished (such as transitions and the current audio subsystem overhaul that are being worked on). I'm always around if you have questions - fastest way to get in touch is IRC.

The core by itself is probably not too big of a deal to port, and though the graphics might be a little bit annoying it's probably not too different from regular OpenGL so I'd expect that to be no big deal as well. Ideally you'll also want audio/video capture, and then to use it you'll need some sort of front-end. So no matter what you still have quite a bit to do.

what do you mean by 'android-specific UI'. explain in detail
 

dodgepong

Administrator
Forum Admin
You can't just take the OBS Qt UI code and slap it on an Android. Android has its own system for making a UI that you would have to use.
 

BobDev

Member
You can't just take the OBS Qt UI code and slap it on an Android. Android has its own system for making a UI that you would have to use.
Yes you probably could http://doc.qt.io/qt-5/android-support.html
Of course some massive amount of work still would be required.

For example I would love to see obs on shield tv (Marshmellow), that would be awesome.

I wonder if they gave up or are they working on it, from last comment it seemed like they have no idea what they are doing (or was that person not part of the team).
 

zermok

New Member
I'm following up this discussion,
Why not something like MINI-OBS for Android?
an OBS with strict minimum board like one webcam layer and the screen to share. that's it!
Only that would be fantastic.
 

Jim

Jim
Developer
Massive thread necro. It's possible but I don't want program it and don't want to maintain it. I have too much work. And the chances of anyone else programming it are slim to none, so that's that I guess. One human being can only do so much before he breaks in half. I'd rather not break in half.
 

iamsajidjaved

New Member
Hi, I don't know your requirements but I'm using owncast on my own server for streaming. When I need to stream from desktop, I use OBS and for mobile I use LiveNow.

LiveNow is a free app that's supports RTMP, Youtube, Ticktok and Facebook etc. I have downloaded this app from playstore and working fine for me.

Thanks

Regards
@iamsajidjaved
 
Top