Reduce latency by 1 frame
To packetize the H.264 raw stream, av_parser_parse2() (called by av_read_frame()) knows that it has received a full frame only after it has received some data for the next frame. As a consequence, the client always waited until the next frame before sending the current frame to the decoder! On the device side, we know packets boundaries. To reduce latency, make the device always transmit the "frame meta" to packetize the stream manually (it was already implemented to send PTS, but only enabled on recording). On the client side, replace av_read_frame() by manual packetizing and parsing. <https://stackoverflow.com/questions/50682518/replacing-av-read-frame-to-reduce-delay> <https://trac.ffmpeg.org/ticket/3354>
This commit is contained in:
@@ -34,7 +34,6 @@ struct server_params {
|
||||
uint16_t local_port;
|
||||
uint16_t max_size;
|
||||
uint32_t bit_rate;
|
||||
bool send_frame_meta;
|
||||
bool control;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user