Can we render YUV frames from ffmpeg streaming output(AV_PIX_FMT_YUV420P) directly in Android screen without converting to RGB format?
Asked
Active
Viewed 1,492 times
0
-
Is this question the same as http://stackoverflow.com/questions/26336024/rendering-yuv-format-in-android ? – fadden Oct 16 '14 at 17:36
-
@fadden Yes,when i tried rendering YUV directly in screen,i am getting the video display for a second and the application stops,can you help me how to get rid of this.. – vgokul129 Oct 17 '14 at 05:57
1 Answers
2
I've had some experience with Google WebRTC open source project recently.
It provide a fully packaged video call example, also contains an Android demo.
What the demo doing is displaying decoded video frames, which is I420(YUV420P) pixel format.
Take a look at the source code: https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/video_render/android/video_render_opengles20.cc

9dan
- 4,222
- 2
- 29
- 44
-
The above link is useful.Thanks,I am looking some tutorial for the same with OPENGLES1,can you help with it.. – vgokul129 Oct 17 '14 at 11:29
-
In Google WebRTC demo, for those without ES 2.0, libyuv based YUV -> RGB conversion is used. Which provide many optimization including NEON SIMD version. I also agree with this approach because if ES 2.0 is not available it'd be better rely on CPU rather than GPU. – 9dan Oct 18 '14 at 18:29
-
https://code.google.com/p/webrtc/source/browse/trunk/src/modules/video_render/main/source/android/video_render_opengles20.cc?r=1988 – Matt Wolfe Jun 10 '15 at 18:03