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

How to add text while streaming and encoding video #1623

Open
Technology-For-Life opened this issue Oct 25, 2024 · 5 comments
Open

How to add text while streaming and encoding video #1623

Technology-For-Life opened this issue Oct 25, 2024 · 5 comments

Comments

@Technology-For-Life
Copy link

Dear PedroSG94
Please let me know is there any way to add text to the live stream and encode the video?
Thanks

@pedroSG94
Copy link
Owner

Hello,

You have code example in the app example.
You can add text using an Android view:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/utils/FilterMenu.kt#L99
Or text directly:
https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/utils/FilterMenu.kt#L308

You can test it using the app example, rotation example and use the menu button

@Technology-For-Life
Copy link
Author

image

Thanks
I did it
However when i add multi text with different positions it only shows the last text, please tell me how can i do it
Also can i add datetime to video streaming

@pedroSG94
Copy link
Owner

pedroSG94 commented Oct 25, 2024

hello,

That is because you replace the last text filter. You can set multiple filters using addFilter method:
https://github.com/pedroSG94/RootEncoder/blob/master/library/src/main/java/com/pedro/library/view/GlInterface.java#L83

@Technology-For-Life
Copy link
Author

Hi,
Please tell me how i can call the addFilter method ?
Thanks

@pedroSG94
Copy link
Owner

Exactly the same way you are using setFilter method you can call addFilter.

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