From 5f206d32ff60148ab72b35d5823f56bdbb7f50bf Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Sun, 28 Nov 2021 19:36:06 +0100 Subject: Add --channel option to dcpomatic_create. --- src/tools/dcpomatic_create.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/tools') diff --git a/src/tools/dcpomatic_create.cc b/src/tools/dcpomatic_create.cc index 944ec3284..d78aef3df 100644 --- a/src/tools/dcpomatic_create.cc +++ b/src/tools/dcpomatic_create.cc @@ -137,6 +137,15 @@ main (int argc, char* argv[]) if (j->video) { j->video->set_frame_type (i.frame_type); } + if (j->audio && i.channel) { + for (auto stream: j->audio->streams()) { + AudioMapping mapping(stream->channels(), film->audio_channels()); + for (int channel = 0; channel < stream->channels(); ++channel) { + mapping.set(channel, *i.channel, 1.0f); + } + stream->set_mapping (mapping); + } + } } } -- cgit v1.2.3