Hello<br><br>I am trying to encode video with x264 and mux using something similar to the example muxing.c.<br><br>To get to the settings of x264 easier, I am not using libavcodec to encode, but x264 directly. Libavcodec is used for audio and muxing with libavformat.<br>
<br>The problem I am having is setting the correct pts values. When I play the files the frames are not even shown in the correct order. I am not really sure how to set the pts correctly.<br><br>I can set the pts before frames go in to x264 for encoding, and I have tried using just a frame counter. I have tried to set the avpacket pts to the pic_out pts value from x264, but I think it's in the wrong form. I need to convert this number somehow.<br>
<br>Does someone have a link to a good explanation of pts times and dts times of h264? And how to set them correctly in libavformat?<br><br>Regards<br>Carl<br>