AlphaPlayer icon indicating copy to clipboard operation
AlphaPlayer copied to clipboard

Android6、7系统上播放mp4时被拉扯的问题

Open Leeeyou opened this issue 3 years ago • 1 comments

这个视频的宽高是1500*1624,拉扯问题如下图所示: oppo R9s手机 6.0.1系统

同一个视频的宽高是1500*1334,就没有拉扯的问题。 当然这两个视频除了尺寸问题,更多差别信息如下图所示: 统一视频两种尺寸

视频的透明通道在右侧,所以用了如下代码来调换透明通道的渲染

#extension GL_OES_EGL_image_external : require
precision mediump float;
varying vec2 vTextureCoord;
uniform samplerExternalOES sTexture;

void main() {
  vec4 color = texture2D(sTexture, vec2(vTextureCoord.x - 0.5, vTextureCoord.y));
  vec4 color2Map = vec4(1.0, 1.0, 1.0, 1.0);
  color2Map = texture2D(sTexture, vec2(vTextureCoord.x, vTextureCoord.y));
  gl_FragColor = vec4(color.r, color.g, color.b, color2Map.g);
}

对于图形图像渲染以及open gl这块不是很懂,在Android 9、10系统上渲染同一个视频时又是正常的。自己也找了一些资料,大概说是渲染时编解码器的问题,但是不知道具体怎么解。大家有遇到类似的问题吗?

Leeeyou avatar Oct 14 '21 07:10 Leeeyou

再oppo r9s Android6.0 出现一样的问题

iStride17 avatar Nov 30 '21 04:11 iStride17