Set output timescale to input timescale (#39946)

pull/39948/head
uvjustin 2020-09-12 02:07:45 +08:00 committed by GitHub
parent 062ac5f27d
commit 9b29d09d45
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -25,7 +25,10 @@ def create_stream_buffer(stream_output, video_stream, audio_stream, sequence):
segment,
mode="w",
format=stream_output.format,
container_options=container_options,
container_options={
"video_track_timescale": str(int(1 / video_stream.time_base)),
**container_options,
},
)
vstream = output.add_stream(template=video_stream)
# Check if audio is requested