Added Support for custom ffmpeg Command Line Arguments when Rendering a Video | https://trello.com/c/69CNoWuA/

This commit is contained in:
CrushedPixel
2015-07-01 13:28:41 +02:00
parent c34ec09e6b
commit a189868390
5 changed files with 63 additions and 26 deletions

View File

@@ -59,12 +59,18 @@ public class VideoWriter {
File folder = ReplayFileIO.getRenderFolder();
String fileName = FILE_FORMAT.format(Calendar.getInstance().getTime());
final String args = options.getExportCommandArgs()
.replace("%WIDTH%", String.valueOf(options.getWidth()))
.replace("%HEIGHT%", String.valueOf(options.getHeight()))
.replace("%FPS%", String.valueOf(options.getFps()))
.replace("%FILENAME%", fileName)
.replace("%BITRATE%", options.getBitrate());
final String args;
if(options.getCommandLineArguments() != null) {
args = options.getCommandLineArguments();
} else {
args = options.getExportCommandArgs()
.replace("%WIDTH%", String.valueOf(options.getWidth()))
.replace("%HEIGHT%", String.valueOf(options.getHeight()))
.replace("%FPS%", String.valueOf(options.getFps()))
.replace("%FILENAME%", fileName)
.replace("%BITRATE%", options.getBitrate());
}
List<String> command = new ArrayList<String>();
command.add(options.getExportCommand());