Adds a converter for web video and changes behavior of the normal video converter
All checks were successful
KnarCraft/FFmpegConvert/pipeline/head This commit looks good

The normal video converter now includes all streams
The web video converter selects the first of each stream
Changes some method names
Moves the convert command to the abstract converter
This commit is contained in:
2020-05-12 19:56:01 +02:00
parent a516cdcdff
commit f2b2de514e
8 changed files with 94 additions and 49 deletions

View File

@ -5,7 +5,6 @@ import net.knarcraft.ffmpegconverter.streams.StreamObject;
import net.knarcraft.ffmpegconverter.utility.FFMpegHelper;
import java.io.File;
import java.io.IOException;
import java.util.List;
/**
@ -35,7 +34,7 @@ public class AudioConverter extends AbstractConverter {
//Gets the first audio stream from the file and adds it to the output file
AudioStream audioStream = getFirstAudioSteam(streams);
FFMpegHelper.addAudioStreams(command, audioStream, false);
FFMpegHelper.addAudioStream(command, audioStream, false);
return command.toArray(new String[0]);
}
@ -44,9 +43,4 @@ public class AudioConverter extends AbstractConverter {
public String[] getValidFormats() {
return audioFormats;
}
@Override
public void convert(File file) throws IOException {
processFile(file.getParentFile(), file);
}
}