Merge 8c54cbffcf10362e60a21f4cc990fc24c1707aa0 into df129c7ba30aaa9ffffb81a48f53aa7253b0b4e6

This commit is contained in:
beefjelly 2023-12-13 11:38:09 -05:00 committed by GitHub
commit 3f6192ed4c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -117,20 +117,22 @@ def _get_global_args(node):
def _get_output_args(node, stream_name_map):
if node.name != output.__name__:
raise ValueError('Unsupported output node: {}'.format(node))
args = []
if len(node.incoming_edges) == 0:
raise ValueError('Output node {} has no mapped streams'.format(node))
args = []
kwargs = copy.copy(node.kwargs)
for edge in node.incoming_edges:
# edge = node.incoming_edges[0]
stream_name = _format_input_stream_name(
stream_name_map, edge, is_final_arg=True
)
if stream_name != '0' or len(node.incoming_edges) > 1:
args += ['-map', stream_name]
is_metadata_stream = str(kwargs.get("map_metadata")) == str(stream_name)
if not is_metadata_stream:
args += ['-map', stream_name]
kwargs = copy.copy(node.kwargs)
filename = kwargs.pop('filename')
if 'format' in kwargs:
args += ['-f', kwargs.pop('format')]