burnins fix bit rate for dnxhd mxf

passing metadata to burnins
This commit is contained in:
Jakub Jezek 2022-01-14 15:56:36 +01:00
parent 9d9f9514c1
commit 438d6df439
No known key found for this signature in database
GPG key ID: D8548FBF690B100A

View file

@ -157,6 +157,16 @@ def _dnxhd_codec_args(stream_data, source_ffmpeg_cmd):
if pix_fmt:
output.extend(["-pix_fmt", pix_fmt])
# Use arguments from source if are available source arguments
if source_ffmpeg_cmd:
copy_args = (
"-b:v", "-vb",
)
args = source_ffmpeg_cmd.split(" ")
for idx, arg in enumerate(args):
if arg in copy_args:
output.extend([arg, args[idx + 1]])
output.extend(["-g", "1"])
return output
@ -716,6 +726,15 @@ def burnins_from_data(
ffmpeg_args.extend(
get_codec_args(burnin.ffprobe_data, source_ffmpeg_cmd)
)
# Use arguments from source if are available source arguments
if source_ffmpeg_cmd:
copy_args = (
"-metadata",
)
args = source_ffmpeg_cmd.split(" ")
for idx, arg in enumerate(args):
if arg in copy_args:
ffmpeg_args.extend([arg, args[idx + 1]])
# Use group one (same as `-intra` argument, which is deprecated)
ffmpeg_args_str = " ".join(ffmpeg_args)