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?
Asked
Active
Viewed 99 times
1 Answers
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