Skip to content

ffmpegframerecorder.record() is taking long(sometimes 3-4s per frame) on android device #1693

@streamcam7

Description

@streamcam7

I have modified the RecordActivity on samples and i am able to do a full live stream (to a RTMP server). I see that record(frame) method, continually gets worse. I have tried timestamping the call time and initially it takes < 30 ms to begin with but gradually it hovers around excess of 400ms and stays at that for a while.

As i let the rtmp stream continue for longer, i end up getting time in excess of >3000 to 4000ms.

The problem i have is the frame drops i have to manage as Camera is spitting out avg of 30fps. FFmpegframerecorder.record() doesn't keep up with the production rate.

I am not sure if i am doing anything wrong ? Is it normal for record() to take that much time. I am not applying any filters to the frame. I am also managing the production and consumption rates with a fixed buffer, which is fine.

But how do i get around the excessive time record() is taking ? What am i missing ? I will try the preset option to ultrafast to see if it helps my case.

I am using Android R (11) image. Any Ideas or pointers regarding this will be helpful

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions