RootEncoder icon indicating copy to clipboard operation
RootEncoder copied to clipboard

OpenGl RTSP record vedio 20s, but only have 17s, loss 3s

Open HoanChen opened this issue 1 year ago • 7 comments

Describe the bug in branch feature/extra-video-source ,OpenGl RTSP record vedio 20s, but only have 17s, loss 3s

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen.

Screenshots If applicable, add screenshots to help explain your problem.

Smartphone (please complete the following information):

  • Library version [e.g. 2.2.7]
  • Device: [e.g. Pixel 6a]
  • OS: [e.g. Android13]
  • Media server [e.g. srs, version 5.0]
  • Class used [e.g. RtmpCamera1]

Additional context Add any other context about the problem here.

HoanChen avatar Sep 01 '24 02:09 HoanChen

Hello,

Are you using the listener to know the moment when the video record start? https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/rotation/CameraFragment.kt#L139

pedroSG94 avatar Sep 01 '24 16:09 pedroSG94

hello mogul

I used class that is OpenGlRtspActivity

---- Replied Message ---- | From | Pedro @.> | | Date | 09/02/2024 00:22 | | To | @.> | | Cc | @.>@.> | | Subject | Re: [pedroSG94/RootEncoder] OpenGl RTSP record vedio 20s, but only have 17s, loss 3s (Issue #1565) |

Hello,

Are you using the listener to know the moment that the video record start? https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/rotation/CameraFragment.kt#L139

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

HoanChen avatar Sep 02 '24 03:09 HoanChen

I don't understand you. Are you using the listener in startRecord method or not?

pedroSG94 avatar Sep 02 '24 11:09 pedroSG94

I used the feature

is it right?

what's your vx?

At 2024-09-02 19:19:53, "Pedro Sánchez" @.***> wrote:

I don't understand you. Are you using the listener in startRecord method or not?

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

HoanChen avatar Sep 02 '24 15:09 HoanChen

I still don't understand you.

You can check the moment the video really start recording but It is not immediately after call startRecord.

The video start when a keyframe is detected so you can check that moment using the listener in startRecord method like this:

        genericStream.startRecord(recordPath) { status ->
          if (status == RecordController.Status.RECORDING) {
            //The video start to record now
          }
        }

pedroSG94 avatar Sep 03 '24 10:09 pedroSG94

Hi , big mogul

where do i add the code

genericStream.startRecord(recordPath) { status ->if (status ==RecordController.Status.RECORDING) { //The video start to record now } }

Here?

I have another question: how to add watermark immediately when recording ?

At 2024-09-03 18:32:12, "Pedro Sánchez" @.***> wrote:

I still don't understand you.

You can check the moment the video really start recording. It is not immediately after call startRecord. The video start when a keyframe is detected. You can check that moment using the listener in startRecord method like this:

    genericStream.startRecord(recordPath) { status ->if (status ==RecordController.Status.RECORDING) {
        //The video start to record now
      }
    }

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

HoanChen avatar Sep 08 '24 13:09 HoanChen

Hello,

First of all. I can't see images if you uploaded it. Maybe because you send the response from the email.

About watermark, you have an example here: https://github.com/pedroSG94/RootEncoder/blob/master/app/src/main/java/com/pedro/streamer/utils/FilterMenu.kt#L212

pedroSG94 avatar Sep 09 '24 07:09 pedroSG94