20184

rendering YUV ffmpeg frames in Android native ndk

Question:

Can we render YUV frames from ffmpeg streaming output(AV_PIX_FMT_YUV420P) directly in Android screen without converting to RGB format?

Answer1:

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: <a href="https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/video_render/android/video_render_opengles20.cc" rel="nofollow">https://code.google.com/p/webrtc/source/browse/trunk/webrtc/modules/video_render/android/video_render_opengles20.cc</a>

Recommend

  • NotReadableError: Could not start source
  • Failed to set local answer sdp: Called in wrong state: kStable
  • How can use the webRTC Javascript API to access the outgoing audio RTP timestamp at the sender and t
  • GetUserMedia - facingMode not recognized despite adapter.js
  • Twitter Bootstrap Scrollspy highlighting last item only
  • OpenGL filled polygon color “bleeding”
  • OAuth2 flow for mobile app
  • Detect language of Word document
  • How to get Fully qualified domain name in unix
  • Distributed JMS based logging .. falling flat?
  • Sensibility of combined Maven/Ant+Ivy build management for dual platform Desktop/Android deployment?
  • Does Apportable support to build library binary (.a/.so)?
  • Java color detection
  • Jenkins: FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection
  • Silverlight DependencyProperty.SetCurrentValue Equivalent
  • Zurb Foundation _global.scss meta styles for js?
  • Switching to Release Build causes runtime error in Web Reference
  • How to install a .deb file on a jailbroken iphone programmatically?
  • Algorithm for a smudge tool?
  • Seeking advice on Jetty HttpClient Hang
  • Counter field in MS Access, how to generate?
  • How to redirect a user to a different server and include HTTP basic authentication credentials?
  • Join two tables and save into third-sql
  • Can I make an Android app that runs a web view in Chrome 39?
  • Javascript + PHP Encryption with pidCrypt
  • How to make Safari send if-modified-since header?
  • Websockets service method fails during R startup
  • Font Awesome Showing Box instead of Icons
  • Google cloud sdk not working when python points python3
  • Properly structure and highlight a GtkPopoverMenu using PyGObject
  • QuartzCore.framework for Mono Develop
  • How to include full .NET prerequisite for Wix Burn installer
  • Why can't I rebase on to an ancestor of source changesets if on a different branch?
  • using HTMLImports.whenReady not working in chrome
  • LevelDB C iterator
  • Linking SubReports Without LinkChild/LinkMaster
  • Is it possible to post an object from jquery to bottle.py?
  • Android Heatmap on canvas or ImageView
  • Python/Django TangoWithDjango Models and Databases
  • Why do underscore prefixed variables exist?