use of org.fagu.fmv.utils.time.Time in project fmv by f-agu.
the class FFHelperTestCase method testMixAudio.
/**
* @throws Exception
*/
@Test
public void testMixAudio() throws Exception {
movieMetadatasSupplier = fileName -> {
MockMovieMetadatas builder = MockMovieMetadatas.builder();
if ("left.mp4".equals(fileName)) {
builder.audio();
builder.video();
return builder.build();
}
if ("w.mp3".equals(fileName)) {
builder.audio();
return builder.build();
}
throw new RuntimeException(fileName);
};
FFHelper.mixAudio(new File("left.mp4"), new File("w.mp3"), new File("out.mp4"), new Time(0, 0, 13.5));
assertCmd("-i left.mp4 -ss 00:00:13.500 -i w.mp3 -filter_complex \"[1][0] amix=duration=shortest:inputs=2 [ami_a]\" -map [ami_a] -map 0:v -codec:v copy -y out.mp4");
}
Aggregations