Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix #338 support nooption for input and output #427

Merged
merged 1 commit into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"-accurate_seek",
"-display_rotation",
"1.0",
"-nodisplay_vflip",
"-i",
"input.mp4",
"output.mp4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
"-c",
"copy",
"-shortest",
"-noforce_fps",
"-ar",
"44100",
"output.mp4"
Expand Down
7 changes: 4 additions & 3 deletions src/ffmpeg/dag/nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,8 @@ def get_args(self, context: DAGContext = None) -> list[str]:
if isinstance(value, bool):
if value is True:
commands += [f"-{key}"]
# NOTE: the -nooption is not supported
elif value is False:
commands += [f"-no{key}"]
else:
commands += [f"-{key}", str(value)]
commands += ["-i", self.filename]
Expand Down Expand Up @@ -398,7 +399,8 @@ def get_args(self, context: DAGContext = None) -> list[str]:
if isinstance(value, bool):
if value is True:
commands += [f"-{key}"]
# NOTE: the -nooption is not supported
elif value is False:
commands += [f"-no{key}"]
else:
commands += [f"-{key}", str(value)]
commands += [self.filename]
Expand Down Expand Up @@ -453,7 +455,6 @@ def get_args(self, context: DAGContext = None) -> list[str]:
commands += [f"-{key}"]
elif value is False:
commands += [f"-no{key}"]
# NOTE: the -no{key} format since not really for global options
else:
commands += [f"-{key}", str(value)]
return commands
Expand Down
Loading