RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

Record the screen push stream on the Android 12 device. After the stream is pulled, there is only audio but no video

Open iqiluwxy opened this issue 2 years ago • 6 comments

Hello, excuse me, I have a problem. I use the display RTMP function to record the screen, push the stream on the Android 12 device, and after the stream is pulled, there is only audio but no video. I don't know what this is.

iqiluwxy avatar Aug 10 '22 03:08 iqiluwxy

Hello,

If you are using Display mode, did you tried using forceRender method like in the example? https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/blob/master/app/src/main/java/com/pedro/rtpstreamer/displayexample/DisplayService.kt#L71 This issue maybe is related to this: https://github.com/pedroSG94/rtmp-rtsp-stream-client-java/issues/63 Try to stream in a screen that refresh continuosly like open YouTube and reproduce a video

pedroSG94 avatar Aug 10 '22 20:08 pedroSG94

Yes, I tried to use your example demo. The program ran to my Android device and started screen recording and streaming. After about 30 seconds, the screen began to appear, but the screen was colorful. Let me show you the picture. 1ec60e28dd9c339acaf15dae12141ca

iqiluwxy avatar Aug 11 '22 02:08 iqiluwxy

My Android device is an Android box with an Rk3588 chip

iqiluwxy avatar Aug 11 '22 02:08 iqiluwxy

I don't know if my device output resolution is too high, because it is 4K

iqiluwxy avatar Aug 11 '22 02:08 iqiluwxy

I don't know if my device output resolution is too high, because it is 4K

iqiluwxy avatar Aug 11 '22 02:08 iqiluwxy

Hello, Sorry for late response. I can see that the stream result is totally green normally caused because encoding or decoding is not working fine (I think related with a problem with the chroma of YUV image).

I recommend you try this:

  • Use a different player to discard VLC problems.
  • Try to use other resolutions to discard encoder problems with a resoluion. 360x240, 1280x720 and 1920x1080 could be a choice.
  • Try to force software video encoder using this line:
rtspCamera1.setForce(CodecUtil.Force.SOFTWARE, CodecUtil.Force.FIRST_COMPATIBLE_FOUND);
  • If anything works. Show me logcat of this code to know info about your encoders:
for (String s: CodecUtil.showAllCodecsInfo()) {
      Log.e("Pedro", s);
}

I'm not sure about it because I don't understand chinese but in the image I think that you are using 640x480 so I don't understand your question about 4k resolution.

pedroSG94 avatar Aug 13 '22 20:08 pedroSG94