Search in sources :

Example 1 with PipeMediaInput

use of org.fagu.fmv.ffmpeg.ioe.PipeMediaInput in project fmv by f-agu.

the class StreamTestCase method testInputToFile.

@Test
@Ignore
public void testInputToFile() throws Exception {
    File outFile = new File("d:\\tmp\\out.ts");
    FFMPEGExecutorBuilder builder = FFMPEGExecutorBuilder.create();
    builder.addMediaInput(new PipeMediaInput()).add("-analyzeduration", Integer.toString(Integer.MAX_VALUE)).add("-probesize", Integer.toString(Integer.MAX_VALUE)).pixelFormat(PixelFormat.YUV420P);
    builder.filter(Rotate.create(Rotation.R_90));
    builder.addMediaOutputFile(outFile).bitStream(Type.VIDEO, BitStreamFilter.H264_MP4TOANNEXB).overwrite();
    FFExecutor<Object> executor = builder.build();
    System.out.println(executor.getCommandLine());
    executor.input(() -> ResourceUtils.open("mp4.mp4"));
    executor.execute();
}
Also used : FFMPEGExecutorBuilder(org.fagu.fmv.ffmpeg.executor.FFMPEGExecutorBuilder) PipeMediaInput(org.fagu.fmv.ffmpeg.ioe.PipeMediaInput) File(java.io.File) Ignore(org.junit.Ignore) Test(org.junit.Test)

Aggregations

File (java.io.File)1 FFMPEGExecutorBuilder (org.fagu.fmv.ffmpeg.executor.FFMPEGExecutorBuilder)1 PipeMediaInput (org.fagu.fmv.ffmpeg.ioe.PipeMediaInput)1 Ignore (org.junit.Ignore)1 Test (org.junit.Test)1