Hi,<div><br></div><div>I have started working on some code based on the decoding_encoding.c sample file to encode the test pattern as h.264 video.</div><div><br></div><div>The settings I am using on my AVCodecContext is as follows:</div>
<div><div>c->width = 352;</div><div>c->height = 288;</div><div>c->time_base.num = 1;</div><div>c->time_base.den = 25;</div><div>c->pix_fmt = PIX_FMT_YUV420P;</div><div><br></div><div>c->gop_size = 1;</div>
<div><br></div><div>if(codec_id == CODEC_ID_H264)</div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><div>av_opt_set(c->priv_data, "preset", "slow", 0);</div></div>
<div>
<br></div></blockquote>I am having a number of issues:<div>1) Even when I set the AVFrame->pts to AVS_NOPTS_VALUE, I still get "non-strictly-monotonic PTS" warning messages. How should I be setting the PTS value?</div>
<div>2) For the first 13 frames my call to avcodec_encode_video returns a size of 0, should this be happening?</div><div>3) The output file that gets written does not seem to have a duration(using ffprobe or VLC to check)</div>
<div><br></div><div>So far to figure out how things work I have been searching through the ffmpeg & x264 source, is there any up-to-date examples of doing h264 video encoding (no audio) anywhere?</div><div><br></div>
<div>
Regards,</div><div>Zac Shenker</div><div><div><br></div></div>