Adjust FPS and GOP parameters

GOP indicates the interval frames of I-frames which have larger sizes
than P-frames have. And therefore the larger GOP setting comes with less
bandwidth overhead. For instance, GOP=60 and FPS=15 means every 4 seconds
comes with an I-frame which is better for pictures with less movements.

Signed-off-by: Leo Ma <begeekmyfriend@gmail.com>
camera2
Leo Ma 9 years ago
parent 95902f5ccf
commit 624b84b94a

@ -26,8 +26,8 @@ public class SrsEncoder {
public static int vbitrate = 500 * 1000; // 500kbps public static int vbitrate = 500 * 1000; // 500kbps
public static final int VENC_WIDTH = 384; // Note: the stride of resolution must be set as 16x for hard encoding with some chip like MTK public static final int VENC_WIDTH = 384; // Note: the stride of resolution must be set as 16x for hard encoding with some chip like MTK
public static final int VENC_HEIGHT = 640; // Since Y component is quadruple size as U and V component, the stride must be set as 32x public static final int VENC_HEIGHT = 640; // Since Y component is quadruple size as U and V component, the stride must be set as 32x
public static final int VFPS = 25; public static final int VFPS = 15;
public static final int VGOP = 10; public static final int VGOP = 60;
public static int VFORMAT = ImageFormat.YV12; public static int VFORMAT = ImageFormat.YV12;
public static final int ASAMPLERATE = 44100; public static final int ASAMPLERATE = 44100;
public static final int ACHANNEL = AudioFormat.CHANNEL_IN_STEREO; public static final int ACHANNEL = AudioFormat.CHANNEL_IN_STEREO;
@ -523,4 +523,4 @@ public class SrsEncoder {
Log.i(TAG, String.format("vencoder %s choose color format 0x%x(%d)", vmci.getName(), matchedColorFormat, matchedColorFormat)); Log.i(TAG, String.format("vencoder %s choose color format 0x%x(%d)", vmci.getName(), matchedColorFormat, matchedColorFormat));
return matchedColorFormat; return matchedColorFormat;
} }
} }

Loading…
Cancel
Save