-1

I am streaming from android camera to server using FFmpegFrameRecorder and I need to get current upload bitrate. Is there an easy way to get it, or I should write my implementation?

geNia
  • 985
  • 9
  • 20

1 Answers1

0

Got this to work. I added a callback to FrameRecorder and then I use this code to count it:

            total_size += video_pkt.size();
            upload_bitrate = (double) (video_pkt.pts() >= 0 && total_size >= 0 ? total_size * 8 / (video_pkt.pts() / 1000.0) : -1);
            bitrateCallback.onFrameWrited(upload_bitrate);
geNia
  • 985
  • 9
  • 20