В качестве теста я хотел бы создать видео с частотой кадров 1 кадр/с. Когда я создаю его таким образом, vlc по-прежнему воспроизводит его со скоростью 25 кадров в секунду. у кого-нибудь есть идея?
AVFormatContext* formatContext;
avformat_alloc_output_context2(&formatContext, NULL, NULL, "test.h264");
AVOutputFormat* outputFormat = formatContext->oformat;
AVStream* videoStream = av_new_stream(formatContext, 0);
AVCodecContext* ctx = videoStream->codec;
ctx->codec_type = AVMEDIA_TYPE_VIDEO;
ctx->codec_id = CODEC_ID_H264;
ctx->bit_rate = 500*1000;
ctx->bit_rate_tolerance = 0;
ctx->width = w;
ctx->height = h;
ctx->pix_fmt = AV_PIX_FMT_YUV420P;
ctx->time_base.den = 1;//25;
ctx->time_base.num = 1;