From 4b74c2be1dd6104f3a4dd50d29ece78857ada3fa Mon Sep 17 00:00:00 2001 From: Svjatoslav Agejenko Date: Wed, 29 Apr 2015 08:23:08 +0300 Subject: [PATCH] vp9 codec was slow and produced no keyframes. Trying vp8 instead. --- .../svjatoslav/meviz/encoder/converters/AvconvVideo.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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, -- 2.20.1