File tree Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Expand file tree Collapse file tree 2 files changed +14
-1
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,19 @@ def test_example(self) -> None:
202
202
assert audio .language == "eng"
203
203
assert audio .layout .name == "stereo"
204
204
205
+ def test_video_to_mp3 (self ) -> None :
206
+ out = self .main (["example.mp4" ], [], output = "example_ALTERED.mp3" )
207
+ with bv .open (out ) as container :
208
+ assert container .duration is not None
209
+ assert container .duration > 17300000 and container .duration < 2 << 24
210
+
211
+ assert len (container .streams ) == 1
212
+ audio = container .streams [0 ]
213
+ assert isinstance (audio , bv .AudioStream )
214
+ assert audio .codec .name in ("mp3" , "mp3float" )
215
+ assert audio .sample_rate == 48000
216
+ assert audio .layout .name == "stereo"
217
+
205
218
def test_to_mono (self ) -> None :
206
219
out = self .main (["example.mp4" ], ["-layout" , "mono" ], output = "example_mono.mp4" )
207
220
with bv .open (out ) as container :
Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ def make_media(tl: v3, output_path: str) -> None:
286
286
output = bv .open (output_path , "w" , container_options = options )
287
287
288
288
# Setup video
289
- if ctr .default_vid != "none" and tl .v :
289
+ if ctr .default_vid not in ( "none" , "png" ) and tl .v :
290
290
vframes = render_av (output , tl , args , log )
291
291
output_stream : bv .VideoStream | None
292
292
output_stream = next (vframes ) # type: ignore
You can’t perform that action at this time.
0 commit comments