1

テストとして、フレームレートが 1 fps のビデオを作成したいと思います。この vlc のように作成すると、まだ 25 fps で再生されます。誰かアイデアがありますか?

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;
4

1 に答える 1