Skip to content

Commit 0be9dfd

Browse files
tikuma-lsuhschokiedsp
authored andcommitted
init_media_write_outputs() - check for providing both merge_audio_streams and extra_inputs (not currently supported)
1 parent c5af7cf commit 0be9dfd

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

src/ffmpegio/configure.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1883,8 +1883,13 @@ def init_media_write_outputs(
18831883
) = output_args
18841884

18851885
# if `merge_audio_streams` is non-`None`, append audio-merge filtergraph
1886-
a_ids = [i for i, info in enumerate(input_info) if info["media_type"] == "audio"]
1887-
do_merge = bool(merge_audio_streams) and len(a_ids) > 1
1886+
do_merge = bool(merge_audio_streams)
1887+
if do_merge:
1888+
try:
1889+
a_ids = [i for i, info in enumerate(input_info) if info["media_type"] == "audio"]
1890+
except KeyError as e:
1891+
raise NotImplementedError('audio merging mode is not currently implemented. Please use the `complex_filtergraph=ffmpegio.filtergraph.presets.merge_audio(...)` to assign a custom filtergraph.')
1892+
do_merge = len(a_ids) > 1
18881893
if do_merge:
18891894
if merge_audio_streams is True:
18901895
# if True, convert to stream indices of audio inputs

0 commit comments

Comments
 (0)