Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Slate Review: Support to keep format on slate concatenation #3049

Merged
merged 1 commit into from
Apr 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 15 additions & 11 deletions openpype/plugins/publish/extract_review_slate.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,15 @@ def process(self, instance):
])

if use_legacy_code:
format_args = []
codec_args = repre["_profile"].get('codec', [])
output_args.extend(codec_args)
# preset's output data
output_args.extend(repre["_profile"].get('output', []))
else:
# Codecs are copied from source for whole input
codec_args = self._get_codec_args(repre)
format_args, codec_args = self._get_format_codec_args(repre)
output_args.extend(format_args)
output_args.extend(codec_args)

# make sure colors are correct
Expand Down Expand Up @@ -266,8 +268,14 @@ def process(self, instance):
"-safe", "0",
"-i", conc_text_path,
"-c", "copy",
output_path
]
# NOTE: Added because of OP Atom demuxers
# Add format arguments if there are any
# - keep format of output
if format_args:
concat_args.extend(format_args)
# Add final output path
concat_args.append(output_path)

# ffmpeg concat subprocess
self.log.debug(
Expand Down Expand Up @@ -338,7 +346,7 @@ def add_video_filter_args(self, args, inserting_arg):

return vf_back

def _get_codec_args(self, repre):
def _get_format_codec_args(self, repre):
"""Detect possible codec arguments from representation."""
codec_args = []

Expand All @@ -361,13 +369,9 @@ def _get_codec_args(self, repre):
return codec_args

source_ffmpeg_cmd = repre.get("ffmpeg_cmd")
codec_args.extend(
get_ffmpeg_format_args(ffprobe_data, source_ffmpeg_cmd)
)
codec_args.extend(
get_ffmpeg_codec_args(
ffprobe_data, source_ffmpeg_cmd, logger=self.log
)
format_args = get_ffmpeg_format_args(ffprobe_data, source_ffmpeg_cmd)
codec_args = get_ffmpeg_codec_args(
ffprobe_data, source_ffmpeg_cmd, logger=self.log
)

return codec_args
return format_args, codec_args