RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

MediaProjection&&rtmp

Open topjx opened this issue 7 months ago • 8 comments

I was originally considering using MediaProjection (Android) to obtain screen stream data and then using sockets for real-time screen casting, but due to decoding issues on the receiving end, the effect was very poor. Can I use this library to replace my socket part? Simply put, I will still use MediaProjection to obtain screen stream data and then use this lib to implement RTMP streaming? Thank you.

topjx avatar Jun 21 '25 08:06 topjx

I have checked some information and it is possible. Currently, I am wondering if I can directly use this lib

topjx avatar Jun 21 '25 13:06 topjx

Attempt to invoke virtual method 'void android.media.projection.MediaProjection.registerCallback(android.media.projection.MediaProjection$Callback, android.os.Handler)' on a null object reference

Something went wrong, I don't know why, I can't solve it

topjx avatar Jun 22 '25 09:06 topjx

How to view the user documentation? For my current needs, I can only look at the source code, but I know too little about this technology, so looking at the source code is painful for me

topjx avatar Jun 22 '25 12:06 topjx

I should use RtmpStream instead of RtmpDisplay ?? docs/library/com.pedro.library.rtmp/-rtmp-stream/index.html

topjx avatar Jun 22 '25 13:06 topjx

Hello,

Both class can be used. Currently RtmpStream is recommended

pedroSG94 avatar Jun 23 '25 06:06 pedroSG94

Hello,

Both class can be used. Currently RtmpStream is recommended

Thank you very much

topjx avatar Jun 23 '25 13:06 topjx

Hello,

Both class can be used. Currently RtmpStream is recommended

Does RTMPStream or other class include MediaProjection related functionality? I don't need to separately obtain screen data (MediaProjection)

topjx avatar Jun 23 '25 14:06 topjx

Hello,

Using RtmpStream class, if you want use MediaProjection you can set it with ScreenSource class. You have an example code in screen example inside app module.

pedroSG94 avatar Jun 23 '25 14:06 pedroSG94