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
 

Lain

Forum Admin
Lain
Forum Moderator
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
Community Helper
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
Community Helper
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.
 

Lain

Forum Admin
Lain
Forum Moderator
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
 

JimDijkstra86NL

New Member
Both Youtube Gaming and the Play Games app do all of these. ;)
In short: Is recording and streaming possible on a mobile device while gaming?, yes it is since 2015-2018 depending on the kind of game you play.

Why?
Since the time of hardware gaining cores and dual CPU's next to the GPU's on SoC's(System on Chip) Mobile devices become more and more optimized for multitasking.
Besides the option to be lean and not so power hungry when for example a device only utilizes the 2 up to 8 less power hungry cores and the increase of (V)RAM(after all in Mobile devices RAM is used for CPU and GPU) up to 64GB on development platforms.
(After all the biggest development platform I have come across has a whopping 2 SoC's -up to 32 /2×16...10+6\ cores on CPU end- sharing up to 128GB of RAM, allowing to run 1 or even 2 separate instances and monitors with Android or any other OS)..and/or 8K resolution.(obviously not yet supported by most apps)

Mobile devices are very good in multi-tasking.
In fact more efficient and (less and less over time) more capable of doing 2 up to 48 tasks at a time.
Thus less likely to being bogged down by multitasking like gaming, recording and streaming.... ofcourse assuming you use a (very) high end device.
I choose for example to buy 1 new Mobile device/phone every 8-12 years.
But choose the most high end one.
For example my most recent device is not just a Galaxy Note 8, no I chose the Emperor Edition with slightly better performance and 256GB also slightly faster storage.
Purchased within 2 years of release making it cheap.
I combined that with the at that time fastest SD Card which is faster then the device's SD Cardreader...A LOT faster since it has PCI trough a extra row of pins. (Why?, because it has higher IOPS making it faster especially with tiny system files)
Then I run as much as Android will let me from that SD card creating a total higher bandwith BUS for storage reads and writes.

My next device?, will have that extra row of pins for my current SD Card.
And thus allows me by then to wait for the then fastest SD Card to become a LOT cheaper.
 

JimDijkstra86NL

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
Any news on a Android version of OBS?
 
Top