Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/writeffmpeg.c
| Show First 20 Lines • Show All 597 Lines • ▼ Show 20 Lines | else { | ||||
| */ | */ | ||||
| const double DENUM_MAX = (codec_id == AV_CODEC_ID_MPEG4) ? (1UL << 16) - 1 : (1UL << 31) - 1; | const double DENUM_MAX = (codec_id == AV_CODEC_ID_MPEG4) ? (1UL << 16) - 1 : (1UL << 31) - 1; | ||||
| const double num = (DENUM_MAX / (double)rd->frs_sec) * rd->frs_sec_base; | const double num = (DENUM_MAX / (double)rd->frs_sec) * rd->frs_sec_base; | ||||
| c->time_base.den = (int)DENUM_MAX; | c->time_base.den = (int)DENUM_MAX; | ||||
| c->time_base.num = (int)num; | c->time_base.num = (int)num; | ||||
| } | } | ||||
| st->time_base = c->time_base; | |||||
| c->gop_size = context->ffmpeg_gop_size; | c->gop_size = context->ffmpeg_gop_size; | ||||
| c->max_b_frames = context->ffmpeg_max_b_frames; | c->max_b_frames = context->ffmpeg_max_b_frames; | ||||
| if (context->ffmpeg_type == FFMPEG_WEBM && context->ffmpeg_crf == 0) { | if (context->ffmpeg_type == FFMPEG_WEBM && context->ffmpeg_crf == 0) { | ||||
| ffmpeg_dict_set_int(&opts, "lossless", 1); | ffmpeg_dict_set_int(&opts, "lossless", 1); | ||||
| } | } | ||||
| else if (context->ffmpeg_crf >= 0) { | else if (context->ffmpeg_crf >= 0) { | ||||
| ffmpeg_dict_set_int(&opts, "crf", context->ffmpeg_crf); | ffmpeg_dict_set_int(&opts, "crf", context->ffmpeg_crf); | ||||
| ▲ Show 20 Lines • Show All 1,288 Lines • Show Last 20 Lines | |||||