Skip to content

Commit

Permalink
update (#149)
Browse files Browse the repository at this point in the history
  • Loading branch information
lucemia authored Jan 11, 2024
1 parent 39bc699 commit 7bd5b10
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
[
"ffmpeg",
"-i",
"in1.mp4",
"-i",
"in2.mp4",
"-i",
"in1.mp4",
"-filter_complex",
"[0:v]hflip[s0];[1:a]areverse[s1];[1:v]reverse[s2];[s0][s3][s4][s3]concat=v=1:a=1[s5#0][s5#1];[s1]aphaser[s3];[s2]hue=h=:s=0:H=[s4];[s5#1]volume=volume=0.8[s6]",
"[0:a]areverse[s1];[0:v]reverse[s0];[1:v]hflip[s2];[s0]hue=h=:s=0:H=[s3];[s1]aphaser[s4];[s2][1:a][s3][s4]concat=v=1:a=1[s5#0][s5#1];[s5#1]volume=volume=0.8[s6]",
"-map",
"[s5#0]",
"-map",
Expand Down
2 changes: 1 addition & 1 deletion src/ffmpeg/tests/__snapshots__/test_base/test_compile.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"-i",
"input.mp4",
"-filter_complex",
"[0]hflip[s1];[1]trim=start_frame=10:end_frame=20[s2];[1]trim=start_frame=30:end_frame=40[s0];[s2][s0]concat[s3];[s3][s1]overlay[s4];[s4]drawbox=x=50:y=50:width=120:height=120:color=red:thickness=5[s5]",
"[0]hflip[s2];[1]trim=start_frame=10:end_frame=20[s1];[1]trim=start_frame=30:end_frame=40[s0];[s1][s0]concat[s3];[s3][s2]overlay[s4];[s4]drawbox=x=50:y=50:width=120:height=120:color=red:thickness=5[s5]",
"-map",
"[s5]",
"out.mp4"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@
"ffmpeg",
"-y",
"-i",
"audio-left.wav",
"-i",
"audio-right.wav",
"-i",
"input-video.mp4",
"-i",
"audio-left.wav",
"-filter_complex",
"[0]atrim=start=10[s1];[2]atrim=start=5[s0];[s0]asetpts=expr=PTS-STARTPTS[s3];[s1]asetpts=expr=PTS-STARTPTS[s2];[s3][s2]join=inputs=2:channel_layout=stereo:map=[s4]",
"[0]atrim=start=5[s0];[1]atrim=start=10[s1];[s0]asetpts=expr=PTS-STARTPTS[s3];[s1]asetpts=expr=PTS-STARTPTS[s2];[s3][s2]join=inputs=2:channel_layout=stereo:map=[s4]",
"-map",
"[s4]",
"-map",
"[1:v]",
"[2:v]",
"-shortest",
"-vcodec",
"copy",
Expand Down
4 changes: 2 additions & 2 deletions src/ffmpeg/tests/test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,11 +112,11 @@ def test_audio_video_pipeline(snapshot: SnapshotAssertion) -> None:
in1 = input("in1.mp4")
in2 = input("in2.mp4")
v1 = in1.video.hflip()
in1.audio
a1 = in1.audio
# FIXME: reverse's h,H options should be optional
v2 = in2.video.reverse().hue(s="0", h="", H="")
a2 = in2.audio.areverse().aphaser()
joined = concat(v1, a2, v2, a2, v=1, a=1)
joined = concat(v1, a1, v2, a2, v=1, a=1)
v3 = joined.video(0)
a3 = joined.audio(0).volume(volume="0.8")
assert snapshot(extension_class=JSONSnapshotExtension) == output(v3, a3, filename="out.mp4").compile()
Expand Down

0 comments on commit 7bd5b10

Please sign in to comment.