From ee492f2537e6f72a59ecf2f576b9b1de745a0906 Mon Sep 17 00:00:00 2001 From: WyattBlue Date: Mon, 16 Sep 2024 05:13:26 -0400 Subject: [PATCH] Add `-dn` option --- auto_editor/__main__.py | 5 +++++ auto_editor/output.py | 4 ++-- auto_editor/utils/types.py | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/auto_editor/__main__.py b/auto_editor/__main__.py index 83f0697e3..2b79132c8 100755 --- a/auto_editor/__main__.py +++ b/auto_editor/__main__.py @@ -254,6 +254,11 @@ def main_options(parser: ArgumentParser) -> ArgumentParser: flag=True, help="Disable the inclusion of subtitle streams in the output file", ) + parser.add_argument( + "-dn", + flag=True, + help="Disable the inclusion of data streams in the output file", + ) parser.add_argument( "--extras", metavar="CMD", diff --git a/auto_editor/output.py b/auto_editor/output.py index 56d5f92b6..a5efb47c9 100644 --- a/auto_editor/output.py +++ b/auto_editor/output.py @@ -237,8 +237,8 @@ def mux_quality_media( if s_tracks > 0: cmd.extend(["-map", "0:t?"]) # Add input attachments to output. - # This was causing a crash for 'example.mp4 multi-track.mov' - # cmd.extend(["-map", "0:d?"]) + if not args.dn: + cmd.extend(["-map", "0:d?"]) cmd.append(output_path) ffmpeg.run_check_errors(cmd, log, path=output_path) diff --git a/auto_editor/utils/types.py b/auto_editor/utils/types.py index a933b72d2..0c2a6f4b8 100644 --- a/auto_editor/utils/types.py +++ b/auto_editor/utils/types.py @@ -224,6 +224,7 @@ class Args: scale: float = 1.0 extras: str | None = None sn: bool = False + dn: bool = False no_seek: bool = False cut_out: list[tuple[str, str]] = field(default_factory=list) add_in: list[tuple[str, str]] = field(default_factory=list)