From: Svjatoslav Agejenko Date: Wed, 29 Apr 2015 05:23:08 +0000 (+0300) Subject: vp9 codec was slow and produced no keyframes. Trying vp8 instead. X-Git-Tag: meviz-1.0~26 X-Git-Url: http://www2.svjatoslav.eu/gitweb/?a=commitdiff_plain;h=4b74c2be1dd6104f3a4dd50d29ece78857ada3fa;p=meviz.git vp9 codec was slow and produced no keyframes. Trying vp8 instead. --- diff --git a/src/main/java/eu/svjatoslav/meviz/encoder/converters/AvconvVideo.java b/src/main/java/eu/svjatoslav/meviz/encoder/converters/AvconvVideo.java index beb634e..ea4d1d3 100644 --- a/src/main/java/eu/svjatoslav/meviz/encoder/converters/AvconvVideo.java +++ b/src/main/java/eu/svjatoslav/meviz/encoder/converters/AvconvVideo.java @@ -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,