Adds surround to stereo

This commit is contained in:
Kristian Knarvik 2018-12-18 00:55:45 +01:00
parent cfba434243
commit dbb5bc7f94
3 changed files with 8 additions and 2 deletions

4
.idea/encodings.xml Normal file
View File

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding" addBOMForNewFiles="with NO BOM" />
</project>

View File

@ -3,7 +3,7 @@
<component name="JavaScriptSettings"> <component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" /> <option name="languageLevel" value="ES6" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="false" project-jdk-name="1.8.0_191" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

View File

@ -62,7 +62,7 @@ public class VideoConverter extends Converter {
} }
//TODO: Scale subtitles to video //TODO: Scale subtitles to video
command.add("-filter_complex"); command.add("-filter_complex");
command.add("[1:s]scale=width=1920:height=808,crop=w=1920:h=808:x=0:y=out_h[sub];[" + videoStreams.get(0) + ":v][sub]overlay"); command.add("[1:s]scale=width=1920:height=800,crop=w=1920:h=800:x=0:y=out_h[sub];[" + videoStreams.get(0) + ":v][sub]overlay");
command.add("-profile:v"); command.add("-profile:v");
command.add("baseline"); command.add("baseline");
} }
@ -77,6 +77,8 @@ public class VideoConverter extends Converter {
command.add("0:" + audioStreams.get(0)); command.add("0:" + audioStreams.get(0));
} }
} }
command.add("-af");
command.add("pan=stereo|FL < 1.0*FL + 0.707*FC + 0.707*BL|FR < 1.0*FR + 0.707*FC + 0.707*BR");
command.add(outFile); command.add(outFile);
return command.toArray(new String[0]); return command.toArray(new String[0]);