Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemia committed Jan 26, 2025
1 parent a506c0a commit 36ae9a8
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
"ffmpeg",
"-i",
"input.mp4",
"-filter_complex",
"[0:a]volume=volume=0.0[s0]",
"-map",
"[s0]",
"output.mp4"
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[
"ffmpeg",
"-i",
"input.mp4",
"-filter_complex",
"[0:a]volume=volume=0.0[s0]",
"-map",
"[s0]",
"output.mp4"
]
10 changes: 10 additions & 0 deletions src/ffmpeg/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,3 +192,13 @@ def test_customize_vfilter(snapshot: SnapshotAssertion) -> None:
)

assert snapshot(extension_class=JSONSnapshotExtension) == gltransition.output(filename="output.mp4").compile()


def test_filter_with_zero(snapshot: SnapshotAssertion) -> None:
stream = input("input.mp4").audio.volume(volume=0.0)

assert stream.output(filename="output.mp4").compile() == snapshot(extension_class=JSONSnapshotExtension)

stream = input("input.mp4").audio.volume(volume="0.0")

assert stream.output(filename="output.mp4").compile() == snapshot(extension_class=JSONSnapshotExtension)

0 comments on commit 36ae9a8

Please sign in to comment.