Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenGL Filter support #52

Open
themaxsmith opened this issue Oct 20, 2022 · 3 comments
Open

OpenGL Filter support #52

themaxsmith opened this issue Oct 20, 2022 · 3 comments

Comments

@themaxsmith
Copy link

Do you plan on exposing GL so you can use OpenGL to apply filters to the streaming video? Most similar libraries on Andriod (https://github.com/pedroSG94/rtmp-rtsp-stream-client-java) and HashinKit on iOS provide this feature or someway to filter/provide a way to modify the broadcast image. I specifically want this feature to be able to add an overlay image via a shader similar to this https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/4b85bce8475deb97380dad3bbe51aca6d24087ea/encoder/src/main/java/com/pedro/encoder/input/gl/render/filters/object/ImageObjectFilterRender.java

As a side note, I think this library has a lot of potentials and think it is heading in the right direction

@ThibaultBee
Copy link
Owner

ThibaultBee commented Oct 20, 2022

Hi,

I am going to be straight: I don't plan to expose OpenGL filters.
StreamPack is designed to focus on performance and video quality (like setting encoder profile and level, I plan to use bidirectionnal frame). So I had to made some compromises for this like having a rather close implementation to the way Android camera API (aka camera2) has been designed. This compromises make OpenGL filters hard to implement.
The main drawback of this implementation is that camera preview is independant from the video stream, that means that the same filter can't be applied for both easily.

I guess you are looking to have an image overlay. Does it matter if it is not displayed on the camera preview? (if the camera is your source).

Moreover, my TODO list is enoooormouuuusss and my time is really limited!

If you have more questions, I will be happy to talk 👍

Glad to hear that you like this library :)

@themaxsmith
Copy link
Author

Yeah, it does not need to be displayed on the camera preview just the SRT TS feed. I have experience with OpenGL and SRT streaming (Mostly on the CPP & iOS side). I can look into it if I have more free time. I might consider spending time on adding it to this library if SRT becomes more mainstream vs RTMP. I think it could be possible via encoderSurface. The problem like always is time and the Android user base / lower revenue per user makes it harder for me to justify the time vs iOS.

@ThibaultBee
Copy link
Owner

Hi,
It would be great if you could have time for this but I totally understand that you have other priorities :)
Thanks anyway for the idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants