Greetings,

I am using libFFmpeg to mux h264 and aac packets into an flv container and 
streaming that via rtmp.

I want to be able to detect when frames are being sent to the server or the 
size of the internal buffer, in order to detect the network lag and apply 
variable bit-rate. However, when I clock the time it takes for av_write_frame, 
it is much too fast for it to be syncronous (so we can't use this to detect 
network speed).

I already tried calling av_write_frame with a null parameter (to flush data) 
every frame, and also directly calling avio_flush but the bitrate is still too 
high. So, I am wondering if there is another buffer that I am missing (such as 
a socket-level buffer).

I also tried to print the AVIOContext->buf_end, buffer_size, and buf_ptr values 
but none of those are indicative of my network speed getting throttled (when I 
limit the bandwidth on my router, I would expect the buffer size to increase).

tl;dr - I would like to know how to properly detect packets being sent to the 
server, or the network speed lagging compared to my av_write_frame calls.

If it makes a difference, this is being run on an arm-v7a Android device.


Thanks!
Rohit
_______________________________________________
Libav-user mailing list
[email protected]
http://ffmpeg.org/mailman/listinfo/libav-user

Reply via email to