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 overlay image or text in rtmp live camera #1001

Closed
PongPloy2016 opened this issue Dec 4, 2021 · 2 comments
Closed

How to overlay image or text in rtmp live camera #1001

PongPloy2016 opened this issue Dec 4, 2021 · 2 comments

Comments

@PongPloy2016
Copy link

PongPloy2016 commented Dec 4, 2021

How to use Overlay text and images live stream Flutter when Live Streaming in camera or icon appears stretched
in pic exmaple

example : https://medium.com/flutter/how-its-made-i-o-photo-booth-3b8355d35883 for example web

image

i want create for mobile app in example Here Please help
image

@pedroSG94
Copy link
Owner

pedroSG94 commented Dec 5, 2021

Hello,

To avoid text or icons stretched using TextObjectFilterRender or ImageObjectFilterRender. You must set scale depend of original text or icon size.
You can do it like in this issue:
#990 (comment)
In this case the originalWidth and originalHeight is the bitmap getWidth and getHeight methods.
For text I found that you can't get bitmap size of the text so I recommend you use Image filters only and produce the text bitmap manually with the methods used in text filter:
https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/master/encoder/src/main/java/com/pedro/encoder/utils/gl/TextStreamObject.java#L62

I will develop an easier way to do it but for now this is the way.

@PongPloy2016
Copy link
Author

ok bro thank you good. exmaple ^_^

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