I am Recording the video in Landscape mode and showing the preview in portrait mode using Exoplayer while record the video continuously at the time change the orientation vice versa Once in while player preview showing a blank screen. I am using Exoplayer 2.9.6 as a dependency on Gradle and using android OS version 10.
E/BufferQueueProducer: [SurfaceTexture-0-22659-29] setMaxDequeuedBufferCount: requested buffer count 2 is less than minimum 3
E/Surface: IGraphicBufferProducer::setBufferCount(2) returned Invalid argument E/ACodec: native_window_set_buffer_count failed: Invalid argument (22)
E/ExoPlayerImplInternal: Internal runtime error. java.lang.IllegalArgumentException at android.media.MediaCodec.native_setSurface(Native Method) at android.media.MediaCodec.setOutputSurface(MediaCodec.java:2042) at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setOutputSurfaceV23(MediaCodecVideoRenderer.java:1014) at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.setSurface(MediaCodecVideoRenderer.java:422) at com.google.android.exoplayer2.video.MediaCodecVideoRenderer.handleMessage(MediaCodecVideoRenderer.java:387) at com.google.android.exoplayer2.ExoPlayerImplInternal.deliverMessage(ExoPlayerImplInternal.java:864) at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageToTarget(ExoPlayerImplInternal.java:835) at com.google.android.exoplayer2.ExoPlayerImplInternal.sendMessageInternal(ExoPlayerImplInternal.java:817) at com.google.android.exoplayer2.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:330) at android.os.Handler.dispatchMessage(Handler.java:103) at android.os.Looper.loop(Looper.java:237) at android.os.HandlerThread.run(HandlerThread.java:67)
Many Google apps use ExoPlayerView for streaming audios and videos. ExoPlayer is a media player library that provides a way to play audio and video with lots of customization in it. It is an alternative that is used to play videos and audios in Android along with MediaPlayer.
Why is my screen black in OBS Studio? Get the newest graphics card driver! 5 different solutions on how to fix the OBS black screen. Solution 1: Use “Fit to screen” to create the red outline. Solution 2: Use “Run with graphics processor”. Solution 3: Use the “Power saving” setting. Solution 4: Use “NVIDIA Control Panel”.
ExoPlayer’s standard audio and video components are built on Android’s MediaCodec API, which was released in Android 4.1 (API level 16). Because ExoPlayer is a library, you can easily take advantage of new features as they become available by updating your app.
There are a number of sample apps that demonstrate how to use ExoPlayer for audio and video playback: UAMP —The Universal Music Player uses ExoPlayer for local audio playback. ExoPlayer demo app —The official repository contains a demo app that showcases many advanced capabilities of the library.
Android 10 introduces new APIs to MediaCodecInfo for querying whether a codec is hardware accelerated, whether it’s software only, and whether it’s provided by the device manufacturer or the Android platform. ExoPlayer 2.11 surfaces this information in its own MediaCodecInfo class via new hardwareAccelerated, softwareOnly and vendor flags. These flags are accessible and (in most cases) set correctly even when running on older versions of Android.
Further reference:ExoPlayer 2.11 -Resolve Media Codec Problems
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With