Adds a new type of anime converter and stuff
Some checks failed
KnarCraft/FFmpegConvert/pipeline/head There was a failure building this commit
Some checks failed
KnarCraft/FFmpegConvert/pipeline/head There was a failure building this commit
Adds a new type of anime converter that retains all streams, but converts the video to hevc, and re-orders the streams Adds support for several types of encoding hardware acceleration that are automatically disabled if not available on the system. Adds automatic hardware decoding acceleration. Automatically removes empty files if ffmpeg fails.
This commit is contained in:
@ -5,6 +5,7 @@ import net.knarcraft.ffmpegconverter.container.StreamProbeResult;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.ConverterModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.DebugModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.ModuleExecutor;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.hardwarecoding.HardwareDecodeModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.mapping.BurnSubtitleModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.mapping.NthAudioStreamModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.mapping.SelectSingleStreamModule;
|
||||
@ -43,8 +44,8 @@ public class WebVideoConverter extends AbstractConverter {
|
||||
}
|
||||
|
||||
@Override
|
||||
public String[] generateConversionCommand(@NotNull String executable, @NotNull StreamProbeResult probeResult,
|
||||
@NotNull String outFile) {
|
||||
public FFMpegCommand generateConversionCommand(@NotNull String executable, @NotNull StreamProbeResult probeResult,
|
||||
@NotNull String outFile) {
|
||||
FFMpegCommand command = FFMpegHelper.getFFMpegWebVideoCommand(executable, probeResult.parsedFiles());
|
||||
List<ConverterModule> modules = new ArrayList<>();
|
||||
|
||||
@ -66,11 +67,11 @@ public class WebVideoConverter extends AbstractConverter {
|
||||
modules.add(new SelectSingleStreamModule(videoStream));
|
||||
}
|
||||
modules.add(new NthAudioStreamModule(probeResult.getAudioStreams(), 0));
|
||||
|
||||
modules.add(new HardwareDecodeModule());
|
||||
modules.add(new SetOutputFileModule(outFile));
|
||||
|
||||
new ModuleExecutor(command, modules).execute();
|
||||
return command.getResult();
|
||||
return command;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user