pedroSG94 / RootEncoder

RootEncoder for Android (rtmp-rtsp-stream-client-java) is a stream encoder to push video/audio to media servers using protocols RTMP, RTSP, SRT and UDP with all code written in Java/Kotlin
Apache License 2.0
2.54k stars 772 forks source link

Send watermark using RtmpClient #1271

Closed sheng930920 closed 1 year ago

sheng930920 commented 1 year ago

Hello,

Is it possible to include a watermark when streaming with RtmpClient? I want to add a watermark to the void onReceive(byte[] videoBuffer, int length) method of the H264 data returned by the DJI drone for streaming

Thank you!

pedroSG94 commented 1 year ago

Hello,

RtmpClient don't support it. RtmpClient is only rtmp protocol. If you want add a filter like watermark you will need use OpenGlView. The idea is decode frames to render surface provided by OpenGlView replacing Camera API but this require create a class. You can check this example that i did for dji: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/issues/817#issuecomment-1125451169 Maybe you need to update the code to the current library version or downgrade the library to a version of that date