Skip to content

Use RGBA8888 or RGB565 surface to render video

Crossle Song edited this page Feb 10, 2014 · 4 revisions

Vitamio support RGBA_8888 or RGB_565 surface to render video, use RGBA_8888 as default.

  1. Use Vitamio VideoView

Vitamio VideoView use RGBA_8888 as default to render video, nothing to do. if you wanna use RGB_565 render video, you can use setVideoChroma(MediaPlayer.VIDEOCHROMA_RGB565). e.g.

VideoView mVideoView = (VideoView) findViewById(R.id.surface_view);
mVideoView.setVideoChroma(MediaPlayer.VIDEOCHROMA_RGB565);
mVideoView.setVideoPath(path);
  1. Use your own VideoView

You must add getHolder().setFormat(PixelFormat.RGBA_8888) to your own VideoView.