1080i 캡처를 위해 x264를 구성하려고합니다. 아래의 설정 중 대부분은 다른 예입니다. 그러나 함께 컴파일되면 작동하지 않습니다. ffmpeg API는 오류를보고하지 않지만 avcodec_encode_video()
은 항상 0을 반환합니다.H264 (1080i)의 AVCodecContext 설정
숫자 중 일부가 이상합니다. 예 : gop_size
. 250이 너무 높지 않습니까?
이벤트 최종 답을 제공 할 수 없지만이 주제에 대한 의견이 있으시면 언제든지 문의 해주십시오.
pCodecContext->codec_type = AVMEDIA_TYPE_VIDEO;
pCodecContext->codec_id = CODEC_ID_H264;
pCodecContext->coder_type = FF_CODER_TYPE_AC;
pCodecContext->flags |= CODEC_FLAG_LOOP_FILTER | CODEC_FLAG_INTERLACED_ME | CODEC_FLAG_INTERLACED_DCT;
pCodecContext->me_cmp |= 1;
pCodecContext->partitions |= X264_PART_I8X8 | X264_PART_I4X4 | X264_PART_P8X8 | X264_PART_B8X8;
pCodecContext->me_method = ME_UMH;
pCodecContext->me_subpel_quality = 8;
pCodecContext->me_range = 16;
pCodecContext->bit_rate = 10 * 1024 * 1024; // 10 Mbps??
pCodecContext->width = 1920;
pCodecContext->height = 1080;
pCodecContext->time_base.num = 1; // 25 fps
pCodecContext->time_base.den = 25; // 25 fps
pCodecContext->gop_size = 250; // 250
pCodecContext->keyint_min = 25;
pCodecContext->scenechange_threshold = 40;
pCodecContext->i_quant_factor = 0.71f;
pCodecContext->b_frame_strategy = 1;
pCodecContext->qcompress = 0.6f;
pCodecContext->qmin = 10;
pCodecContext->qmax = 51;
pCodecContext->max_qdiff = 4;
pCodecContext->max_b_frames = 3;
pCodecContext->refs = 4;
pCodecContext->directpred = 3;
pCodecContext->trellis = 1;
pCodecContext->flags2 |= CODEC_FLAG2_WPRED | CODEC_FLAG2_MIXED_REFS | CODEC_FLAG2_8X8DCT | CODEC_FLAG2_FASTPSKIP; // wpred+mixed_refs+dct8x8+fastpskip
pCodecContext->weighted_p_pred = 2; // not implemented with interlaced ??
pCodecContext->crf = 22;
pCodecContext->pix_fmt = PIX_FMT_YUV420P;
pCodecContext->thread_count = 0;
안녕하세요 alex이 링크를 참조하십시오 http://stackoverflow.com/questions/9288334/how-to-solve-bad-instruction-vadd-i16-q0-q0-q0-when-attempting-to-check-gcc -fo –