use of org.fagu.fmv.ffmpeg.metadatas.VideoStream in project fmv by f-agu.
the class FFHelperTestCase method testOo_Rotate180.
/**
* @throws Exception
*/
@Test
public void testOo_Rotate180() throws Exception {
final MovieMetadatas movieMetadatas = mock(MovieMetadatas.class);
VideoStream videoStream = mock(VideoStream.class);
doReturn(videoStream).when(movieMetadatas).getVideoStream();
doReturn(Rotation.R_180).when(videoStream).rotate();
movieMetadatasSupplier = fileName -> movieMetadatas;
File inFile = new File("in.mp4");
File outFile = new File("out.mp4");
FFHelper.oo(inFile, outFile);
if (AutoRotate.isAutoRotateObsolete()) {
assertCmd("-hide_banner -i in.mp4 -filter:a \"aresample=sample_rate=44100\" -filter:v \"scale=w='if(gt(dar,930/500),930,trunc(oh*dar/2)*2)':h='if(gt(dar,930/500),trunc(ow/dar/2)*2,500)',format=yuv420p\" -movflags +faststart -f mp4 -codec:v libx264 -preset medium -profile:v baseline -level 3.0 -crf 22 -pix_fmt yuv420p -codec:a aac -ac 2 -b:a 128000 -y -metadata:s:v:0 \"rotate=0\" out.mp4");
} else {
assertCmd("-hide_banner -i in.mp4 -filter:a \"aresample=sample_rate=44100\" -filter:v \"transpose=dir=clock,transpose=dir=clock,scale=w='if(gt(dar,930/500),930,trunc(oh*dar/2)*2)':h='if(gt(dar,930/500),trunc(ow/dar/2)*2,500)',format=yuv420p\" -movflags +faststart -f mp4 -codec:v libx264 -preset medium -profile:v baseline -level 3.0 -crf 22 -pix_fmt yuv420p -codec:a aac -ac 2 -b:a 128000 -y -metadata:s:v:0 \"rotate=0\" out.mp4");
}
}
Aggregations