File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change @@ -147,6 +147,41 @@ def test_get_args_complex_filter():
147
147
]
148
148
149
149
150
+ def _get_complex_filter_asplit_example ():
151
+ split = (ffmpeg
152
+ .input (TEST_INPUT_FILE1 )
153
+ .vflip ()
154
+ .asplit ()
155
+ )
156
+ split0 = split [0 ]
157
+ split1 = split [1 ]
158
+
159
+ return (ffmpeg
160
+ .concat (
161
+ split0 .filter_ ("atrim" , start = 10 , end = 20 ),
162
+ split1 .filter_ ("atrim" , start = 30 , end = 40 ),
163
+ )
164
+ .output (TEST_OUTPUT_FILE1 )
165
+ .overwrite_output ()
166
+ )
167
+
168
+
169
+ def test_filter_asplit ():
170
+ out = _get_complex_filter_asplit_example ()
171
+ args = out .get_args ()
172
+ assert args == [
173
+ '-i' ,
174
+ TEST_INPUT_FILE1 ,
175
+ '-filter_complex' ,
176
+ '[0]vflip[s0];[s0]asplit=2[s1][s2];[s1]atrim=end=20:start=10[s3];[s2]atrim=end=40:start=30[s4];[s3]'
177
+ '[s4]concat=n=2[s5]' ,
178
+ '-map' ,
179
+ '[s5]' ,
180
+ TEST_OUTPUT_FILE1 ,
181
+ '-y'
182
+ ]
183
+
184
+
150
185
def test_filter_normal_arg_escape ():
151
186
"""Test string escaping of normal filter args (e.g. ``font`` param of ``drawtext`` filter)."""
152
187
def _get_drawtext_font_repr (font ):
You can’t perform that action at this time.
0 commit comments