vp9 codec was slow and produced no keyframes. Trying vp8 instead.
authorSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Wed, 29 Apr 2015 05:23:08 +0000 (08:23 +0300)
committerSvjatoslav Agejenko <svjatoslav@svjatoslav.eu>
Wed, 29 Apr 2015 05:23:08 +0000 (08:23 +0300)
src/main/java/eu/svjatoslav/meviz/encoder/converters/AvconvVideo.java

index beb634e..ea4d1d3 100644 (file)
@@ -80,7 +80,7 @@ public class AvconvVideo extends AbstractConverter {
                String audioCodec = "libmp3lame";
 
                if (targetFormat.equals("webm")) {
-                       videoCodec = "vp9";
+                       videoCodec = "vp8";
                        audioCodec = "opus";
                        codecParams.append("-s 800x600 ");
                }
@@ -98,7 +98,12 @@ public class AvconvVideo extends AbstractConverter {
                        videoBitrate = 1000;
                        audioBitrate = 128;
                        videoCodec = "libxvid";
+
+                       // reduce resolution
                        codecParams.append("-s 640x480 ");
+
+                       // enforce maximum keyframe interval
+                       codecParams.append("-g 150 ");
                }
 
                codecParams.append(constructCodecParamsString(options, videoBitrate,