Copies audio and other streams for the MKV to H265 reduced converter
This commit is contained in:
parent
92b46bdc9e
commit
d46f12e690
@ -8,6 +8,7 @@ import net.knarcraft.ffmpegconverter.converter.module.ModuleExecutor;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.hardwarecoding.H265HardwareEncodingModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.hardwarecoding.HardwareDecodeModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.mapping.MapAllModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.output.CopyAudioModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.output.CopySubtitlesModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.output.FastStartModule;
|
||||
import net.knarcraft.ffmpegconverter.converter.module.output.SetOutputFileModule;
|
||||
@ -68,6 +69,7 @@ public class MkvH265ReducedConverter extends AbstractConverter {
|
||||
List<AudioStream> audioStreams = probeResult.getAudioStreams();
|
||||
if (!audioStreams.isEmpty()) {
|
||||
modules.add(new MapAllModule<>(audioStreams));
|
||||
modules.add(new CopyAudioModule());
|
||||
}
|
||||
|
||||
// Map subtitles if present
|
||||
@ -77,8 +79,11 @@ public class MkvH265ReducedConverter extends AbstractConverter {
|
||||
modules.add(new CopySubtitlesModule());
|
||||
}
|
||||
|
||||
modules.add(new SetOutputFileModule(outFile));
|
||||
// Map any fonts, cover images or similar
|
||||
modules.add(new MapAllModule<>(probeResult.getOtherStreams()));
|
||||
|
||||
// Set output file and execute
|
||||
modules.add(new SetOutputFileModule(outFile));
|
||||
new ModuleExecutor(command, modules).execute();
|
||||
return command;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user