Decoding H264 PES with PTS

282 views Asked by At

I have a problem with libav. I am using a demuxer (not libav) and I am sure that it is working well. So, problem starts after demuxing.

To decode H264 25 fps video, I am supplying PES PTS values to AVPacket PTS value. Libav then decodes AVPacket into AVFrame and calculates an increasing PTS. Everything seems normal, even trace log, but output video is stuttering constantly. I tried to use both pts and best_effort_timestamp.

I think something is wrong with PTS/DTS values. If values are correct, then problem may related to decoder setup. How can I solve this?

1

There are 1 answers

0
refunse On BEST ANSWER

Problem solved.

PTS values were valid all along. After decoding, I was converting pixel format with swscale. Instead, used avfilter and problem solved.