FS-10335: [mod_av] Colors in recorded MP4 appear dull #resolve

This commit is contained in:
Anthony Minessale 2017-05-22 19:58:32 -05:00
parent 222780795d
commit 49468d480f
2 changed files with 7 additions and 0 deletions

View File

@ -935,6 +935,10 @@ FF_ENABLE_DEPRECATION_WARNINGS
av_opt_set(context->encoder_ctx->priv_data, "profile", "baseline", 0); av_opt_set(context->encoder_ctx->priv_data, "profile", "baseline", 0);
av_opt_set_int(context->encoder_ctx->priv_data, "slice-max-size", SLICE_SIZE, 0); av_opt_set_int(context->encoder_ctx->priv_data, "slice-max-size", SLICE_SIZE, 0);
context->encoder_ctx->colorspace = AVCOL_SPC_RGB;
context->encoder_ctx->color_range = AVCOL_RANGE_JPEG;
/* /*
av_opt_set_int(context->encoder_ctx->priv_data, "sc_threshold", 40, 0); av_opt_set_int(context->encoder_ctx->priv_data, "sc_threshold", 40, 0);
av_opt_set_int(context->encoder_ctx->priv_data, "b_strategy", 1, 0); av_opt_set_int(context->encoder_ctx->priv_data, "b_strategy", 1, 0);

View File

@ -520,6 +520,9 @@ static switch_status_t add_stream(MediaStream *mst, AVFormatContext *fc, AVCodec
av_set_options_string(c, "quality=realtime", "=", ":"); av_set_options_string(c, "quality=realtime", "=", ":");
} }
c->colorspace = AVCOL_SPC_RGB;
c->color_range = AVCOL_RANGE_JPEG;
if (mm) { if (mm) {
if (mm->vb) { if (mm->vb) {
c->bit_rate = mm->vb * 1024; c->bit_rate = mm->vb * 1024;