I am currently trying to apply lossless H264 settings for FFMPEG in c. However, I am unsure as to what the settings need to be to ensure lossless encoding and I have found little documentation in this area.
My current settings are:
codecContex->coder_type = 1;
codecContex->flags|=CODEC_FLAG_LOOP_FILTER;
codecContex->flags2|=CODEC_FLAG2_BPYRAMID-CODEC_FLAG2_WPRED-CODEC_FLAG2_8X8DCT;
codecContex->profile=FF_PROFILE_H264_BASELINE;
codecContex->scenechange_threshold = 40;
codecContex->gop_size=40;
codecContex->max_b_frames=0;
codecContex->max_qdiff=4;
codecContex->me_method=10;
codecContex->me_range=16;
codecContex->me_cmp|= 1;
codecContex->me_subpel_quality = 5;
codecContex->qmin=0;
codecContex->qmax=0;
codecContex->qcompress=0.6f;
codecContex->keyint_min=25;
codecContex->trellis=0;
codecContex->level=13;
codecContex->refs = 16;
codecContex->weighted_p_pred = 2;
codecContex->b_frame_strategy= 1;
codecContex->color_range = libffmpeg::AVCOL_RANGE_JPEG;
codecContex->coder_type = FF_CODER_TYPE_AC;
codecContex->crf = 0;
Any ideas as to what they should be to ensure lossless encoding? Thanks in advance.