0
테스트로서 나는 1 프레임의 프레임 속도를 갖는 비디오를 만들고 싶습니다. 이처럼 vlc를 만들면 여전히 25fps로 재생됩니다. 아무도 아이디어가 있니?vlc는 잘못된 프레임 속도로 libavcodec로 생성 된 비디오를 지불합니다.
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;
이 파일의 프레임 속도를 보여 -i는 FFmpeg 무엇을해야합니까? 어때? – rogerdpack