Home > Software engineering >  Ffmpeg decompression h. 264 data always delay when a frame
Ffmpeg decompression h. 264 data always delay when a frame

Time:09-19

I use x264 library code streaming video, code using the baseline, zerolatency, ultrafast mode, then to the end of the service, the client to use FFmpeg to decode the data, but I found A frame decoding delay always , such as the end of the service received A, B, C 3 frame data, when the decode A frame, and didn't get the data, when decoding frame B gets A frame of data,
Only for my video I P frame and the frame, not B frame, so I think there should be no delay when decoding! I find the information on the Internet, some people think that is the result of a multi-threaded frame decoding, but I adjust my AVCodecContext thread_type=0 , there is no effect, I'm on Windows development, decoding method is a reference of FFmpeg example,
Don't ffmpeg decoding h. 264 will delay a frame? Or you need to set what parameters of the decoder?

CodePudding user response:

When I was doing, the beginning of a frame as if also has a problem

CodePudding user response:

Don't ffmpeg decoding of h. 264 will be delay a frame? I Google and some said that multithreading decoding??????
O great god answer!!!!!!!!!!!

CodePudding user response:

I accept, udp delay five seconds, by default, change parameters after delay 1 s, you are very awesome this delay a frame

CodePudding user response:

A frame delay? Open a stopwatch server, the client flow did take a look after, and then try the ffplay also (not set time delay)
  • Related