'how to get the delay of ffmpeg?

I'm using ffmpeg to do some work on a network like this:

RtmpServer1 -- FfmpegServer -- RtmpServer2

I put a 6mins.mp4 on RtmpServer1(10.10.1.1) and play it on RtmpServer2(10.10.2.2) by this instruction:

ffmpeg -i rtmp://10.10.1.1:1935/play/6mins.mp4 -vcodec copy -c:v libx264 -f flv  rtmp://10.10.2.2:1935/live

I would like to know is there a way to test the length of the time ffmpeg use to decode, compress and encode?(the duration from ffmpeg server get the data to the ffmpeg server send it out)

I tried tcpdump to listen on the both two eth ports(one for get and one for send) of ffmpeg server. But I can't match RTMP packets by pairs("pairs" means the packets containing the same data, one "got" packet matches one "sent" packet). I'd also like to know if there's a way to match the RTMP packets by their content(data).



Solution 1:[1]

I tried to use tcpdump on both of the input and output eths and get when the rtmp streamings starts and ends. It is helpful in some way.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jennie Tsai