Fix T68343: Rendered video plays at 600fps

Field time_base of video stream must be set for some containers,
otherwise avformat_write_header() will set it to default values.
Rendered file in such case won't be played at desired frame rate.

See init_muxer() in mux.c in ffpmeg sources.

Reviewed By: sergey

Differential Revision: https://developer.blender.org/D9213
This commit is contained in:
Richard Antalik 2020-10-19 07:17:13 +02:00
parent 94364be80a
commit b2e067d98c
Notes: blender-bot 2024-04-29 13:07:32 +02:00
Referenced by issue #87044, rendered video from VSE could not be played with VLC
Referenced by issue #81827, MacOS lines that should be thick are green instead
Referenced by issue #68343, unwanted conversion to 600fps
1 changed files with 2 additions and 0 deletions

View File

@ -603,6 +603,8 @@ static AVStream *alloc_video_stream(FFMpegContext *context,
c->time_base.num = (int)num;
}
st->time_base = c->time_base;
c->gop_size = context->ffmpeg_gop_size;
c->max_b_frames = context->ffmpeg_max_b_frames;