Comments (5)
I understand, but you didn't provide the native logs. You can use the logcat
view in Android Studio or using the terminal command - adb logcat
. Here you can find more information.
from expo.
Hello @deviserops!
I wanted to update you on the example you shared. I tested it with the latest version and I don't believe there is an issue with the link. However, while the player was able to download the file, it was unable to play it, which indicates there might be a problem with decoding the file. Could you please provide native logs from your app?
Here's a crash from my app:
Video codec error
androidx.media3.exoplayer.mediacodec.MediaCodecRenderer$DecoderInitializationException: Decoder init failed: c2.goldfish.h264.decoder, Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 4096, 50.0, ColorInfo(BT709, Limited range, SDR SMPTE 170M, false, 8bit Luma, 8bit Chroma)], [-1, -1])
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1114)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:551)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1560)
at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:1163)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:994)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:814)
at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:974)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1079)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:529)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalArgumentException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2176)
at android.media.MediaCodec.configure(MediaCodec.java:2092)
at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.initialize(AsynchronousMediaCodecAdapter.java:156)
at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter.access$100(AsynchronousMediaCodecAdapter.java:50)
at androidx.media3.exoplayer.mediacodec.AsynchronousMediaCodecAdapter$Factory.createAdapter(AsynchronousMediaCodecAdapter.java:103)
at androidx.media3.exoplayer.mediacodec.DefaultMediaCodecAdapterFactory.createAdapter(DefaultMediaCodecAdapterFactory.java:113)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.initCodec(MediaCodecRenderer.java:1195)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecWithFallback(MediaCodecRenderer.java:1103)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.maybeInitCodecOrBypass(MediaCodecRenderer.java:551)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.onInputFormatChanged(MediaCodecRenderer.java:1560)
at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.onInputFormatChanged(MediaCodecVideoRenderer.java:1163)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.readSourceOmittingSampleData(MediaCodecRenderer.java:994)
at androidx.media3.exoplayer.mediacodec.MediaCodecRenderer.render(MediaCodecRenderer.java:814)
at androidx.media3.exoplayer.video.MediaCodecVideoRenderer.render(MediaCodecVideoRenderer.java:974)
at androidx.media3.exoplayer.ExoPlayerImplInternal.doSomeWork(ExoPlayerImplInternal.java:1079)
at androidx.media3.exoplayer.ExoPlayerImplInternal.handleMessage(ExoPlayerImplInternal.java:529)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
from expo.
The app I am using is default fron expo example, it's here. Open Link
- Open Link
- Under uses click on
Open in Snack
Also in my Summery I provide a project which only contain single file of code which is same as in example.
I have also uploaded a video about this issue you can see here. Open Link
Let me know if you need any other info.
from expo.
HI @lukmccall
Log Details
Android emulator Logs
2024-05-10 16:48:46.772 989-1629 ColorUtils host.exp.exponent W expected specified color aspects (2:0:0:0)
2024-05-10 16:48:46.777 989-1627 MediaCodec host.exp.exponent I MediaCodec will operate in async mode
2024-05-10 16:48:46.778 989-1568 MediaCodecRenderer host.exp.exponent W Failed to initialize decoder: c2.goldfish.h264.decoder
java.lang.IllegalArgumentException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2176)
at android.media.MediaCodec.configure(MediaCodec.java:2092)
at ed.b.v(SourceFile:15)
at ed.b.p(SourceFile:1)
at ed.b$b.d(SourceFile:69)
at ed.j.a(SourceFile:59)
at ed.o.z0(SourceFile:76)
at ed.o.F0(SourceFile:113)
at ed.o.E0(SourceFile:143)
at ed.o.J0(SourceFile:38)
at me.h.J0(SourceFile:1)
at ed.o.R0(SourceFile:22)
at ed.o.f(SourceFile:31)
at mc.k1.o(SourceFile:97)
at mc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
2024-05-10 16:48:46.779 989-1568 MediaCodecVideoRenderer host.exp.exponent E Video codec error
ed.o$b: Decoder init failed: c2.goldfish.h264.decoder, Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 4096, 50.0], [-1, -1])
at ed.o.F0(SourceFile:149)
at ed.o.E0(SourceFile:143)
at ed.o.J0(SourceFile:38)
at me.h.J0(SourceFile:1)
at ed.o.R0(SourceFile:22)
at ed.o.f(SourceFile:31)
at mc.k1.o(SourceFile:97)
at mc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalArgumentException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2176)
at android.media.MediaCodec.configure(MediaCodec.java:2092)
at ed.b.v(SourceFile:15)
at ed.b.p(SourceFile:1)
at ed.b$b.d(SourceFile:69)
at ed.j.a(SourceFile:59)
at ed.o.z0(SourceFile:76)
at ed.o.F0(SourceFile:113)
at ed.o.E0(SourceFile:143)
at ed.o.J0(SourceFile:38)
at me.h.J0(SourceFile:1)
at ed.o.R0(SourceFile:22)
at ed.o.f(SourceFile:31)
at mc.k1.o(SourceFile:97)
at mc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
2024-05-10 16:48:46.779 989-1568 ExoPlayerImplInternal host.exp.exponent E Playback error
mc.q: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 4096, 50.0], [-1, -1]), format_supported=YES
at mc.k1.handleMessage(SourceFile:373)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: ed.o$b: Decoder init failed: c2.goldfish.h264.decoder, Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 4096, 50.0], [-1, -1])
at ed.o.F0(SourceFile:149)
at ed.o.E0(SourceFile:143)
at ed.o.J0(SourceFile:38)
at me.h.J0(SourceFile:1)
at ed.o.R0(SourceFile:22)
at ed.o.f(SourceFile:31)
at mc.k1.o(SourceFile:97)
at mc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: java.lang.IllegalArgumentException
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2176)
at android.media.MediaCodec.configure(MediaCodec.java:2092)
at ed.b.v(SourceFile:15)
at ed.b.p(SourceFile:1)
at ed.b$b.d(SourceFile:69)
at ed.j.a(SourceFile:59)
at ed.o.z0(SourceFile:76)
at ed.o.F0(SourceFile:113)
at ed.o.E0(SourceFile:143)
at ed.o.J0(SourceFile:38)
at me.h.J0(SourceFile:1)
at ed.o.R0(SourceFile:22)
at ed.o.f(SourceFile:31)
at mc.k1.o(SourceFile:97)
at mc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.os.HandlerThread.run(HandlerThread.java:67)
2024-05-10 16:48:46.781 989-1639 hw-BpHwBinder host.exp.exponent I onLastStrongRef automatically unlinking death recipients
2024-05-10 16:48:46.799 989-1273 BufferPoolAccessor2.0 host.exp.exponent D bufferpool2 0x758a3cdd4c78 : 0(0 size) total buffers - 0(0 size) used buffers - 146/159 (recycle/alloc) - 13/155 (fetch/transfer)
2024-05-10 16:48:46.799 989-1273 BufferPoolAccessor2.0 host.exp.exponent D evictor expired: 1, evicted: 1
2024-05-10 16:48:46.820 989-989 ExoPlayerImpl host.exp.exponent I Release 32cb3c1 [ExoPlayerLib/2.18.1] [emulator64_x86_64_arm64, sdk_gphone64_x86_64, Google, 31] [goog.exo.core, goog.exo.exoplayer, goog.exo.decoder, goog.exo.okhttp, goog.exo.datasource, goog.exo.hls, goog.exo.extractor]
2024-05-10 16:48:46.855 989-1045 EGL_emulation host.exp.exponent D app_time_stats: avg=12.47ms min=6.62ms max=34.53ms count=45
2024-05-10 16:48:46.971 374-374 SurfaceFlinger surfaceflinger E Attempt to set frame rate on an unrecognized IGraphicBufferProducer
2024-05-10 16:48:46.975 540-1993 MediaFocusControl system_server I abandonAudioFocus() from uid/pid 10151/989 clientId=android.media.AudioManager@8bac4baexpo.modules.av.AVManager@9f4634a
2024-05-10 16:48:47.379 989-1640 HostConnection host.exp.exponent D createUnique: call
2024-05-10 16:48:47.379 989-1640 HostConnection host.exp.exponent D HostConnection::get() New Host Connection established 0x7589ecaada10, tid 1640
2024-05-10 16:48:47.392 989-1640 HostConnection host.exp.exponent D HostComposition ext ANDROID_EMU_CHECKSUM_HELPER_v1 ANDROID_EMU_dma_v1 ANDROID_EMU_direct_mem ANDROID_EMU_host_composition_v1 ANDROID_EMU_host_composition_v2 ANDROID_EMU_YUV_Cache ANDROID_EMU_has_shared_slots_host_memory_allocator ANDROID_EMU_sync_buffer_data ANDROID_EMU_read_color_buffer_dma GL_OES_EGL_image_external_essl3 GL_OES_vertex_array_object GL_KHR_texture_compression_astc_ldr ANDROID_EMU_host_side_tracing ANDROID_EMU_gles_max_version_3_0
2024-05-10 16:48:47.392 989-1640 EGL_emulation host.exp.exponent D eglCreateContext: 0x7589ecab0110: maj 3 min 0 rcv 3
2024-05-10 16:48:47.393 989-1640 EGL_emulation host.exp.exponent D eglMakeCurrent: 0x7589ecab0110: ver 3 0 (tinfo 0x758c0d07f100) (first time)
2024-05-10 16:48:47.393 989-1640 EGL_emulation host.exp.exponent E eglQueryContext 32c0 EGL_BAD_ATTRIBUTE
2024-05-10 16:48:47.393 989-1640 EGL_emulation host.exp.exponent E tid 1640: eglQueryContext(2160): error 0x3004 (EGL_BAD_ATTRIBUTE)
2024-05-10 16:48:47.394 989-1595 SurfaceUtils host.exp.exponent D connecting to surface 0x758adca21d70, reason connectToSurface
2024-05-10 16:48:47.394 989-1595 MediaCodec host.exp.exponent I [c2.goldfish.h264.decoder] setting surface generation to 1012762
2024-05-10 16:48:47.394 989-1595 SurfaceUtils host.exp.exponent D disconnecting from surface 0x758adca21d70, reason connectToSurface(reconnect)
2024-05-10 16:48:47.394 989-1595 SurfaceUtils host.exp.exponent D connecting to surface 0x758adca21d70, reason connectToSurface(reconnect)
2024-05-10 16:48:47.394 989-1595 Codec2-Out...ufferQueue host.exp.exponent D remote graphic buffer migration 11/11
Physical device Logs (Nokia 6.1 Plus)
2024-05-10 17:05:31.690 11544-15392 MediaCodecRenderer host.exp.exponent W Failed to initialize decoder: OMX.qcom.video.decoder.avc
android.media.MediaCodec$CodecException: Error 0xfffffff4
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2083)
at android.media.MediaCodec.configure(MediaCodec.java:2011)
at bd.x$b.a(SourceFile:19)
at bd.j.a(SourceFile:69)
at bd.o.z0(SourceFile:76)
at bd.o.F0(SourceFile:113)
at bd.o.E0(SourceFile:143)
at bd.o.J0(SourceFile:38)
at je.h.J0(SourceFile:1)
at bd.o.R0(SourceFile:22)
at bd.o.f(SourceFile:31)
at jc.k1.o(SourceFile:97)
at jc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
2024-05-10 17:05:31.690 11544-15392 MediaCodecVideoRenderer host.exp.exponent E Video codec error
bd.o$b: Decoder init failed: OMX.qcom.video.decoder.avc, Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 4096, 50.0], [-1, -1])
at bd.o.F0(SourceFile:149)
at bd.o.E0(SourceFile:143)
at bd.o.J0(SourceFile:38)
at je.h.J0(SourceFile:1)
at bd.o.R0(SourceFile:22)
at bd.o.f(SourceFile:31)
at jc.k1.o(SourceFile:97)
at jc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.media.MediaCodec$CodecException: Error 0xfffffff4
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2083)
at android.media.MediaCodec.configure(MediaCodec.java:2011)
at bd.x$b.a(SourceFile:19)
at bd.j.a(SourceFile:69)
at bd.o.z0(SourceFile:76)
at bd.o.F0(SourceFile:113)
at bd.o.E0(SourceFile:143)
at bd.o.J0(SourceFile:38)
at je.h.J0(SourceFile:1)
at bd.o.R0(SourceFile:22)
at bd.o.f(SourceFile:31)
at jc.k1.o(SourceFile:97)
at jc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
2024-05-10 17:05:31.691 11544-15392 MediaCodecInfo host.exp.exponent D NoSupport [codec.profileLevel, avc1.640034, video/avc] [OMX.qcom.video.decoder.avc, video/avc] [DRG_sprout, Nokia 6.1 Plus, HMD Global, 29]
2024-05-10 17:05:31.691 11544-15392 MediaCodecInfo host.exp.exponent D NoSupport [sizeAndRate.support, 2160x4096x50.0] [c2.android.avc.decoder, video/avc] [DRG_sprout, Nokia 6.1 Plus, HMD Global, 29]
2024-05-10 17:05:31.691 11544-15392 ExoPlayerImplInternal host.exp.exponent E Playback error
jc.q: MediaCodecVideoRenderer error, index=0, format=Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 4096, 50.0], [-1, -1]), format_supported=NO_EXCEEDS_CAPABILITIES
at jc.k1.handleMessage(SourceFile:373)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: bd.o$b: Decoder init failed: OMX.qcom.video.decoder.avc, Format(1, null, null, video/avc, avc1.640034, -1, null, [2160, 4096, 50.0], [-1, -1])
at bd.o.F0(SourceFile:149)
at bd.o.E0(SourceFile:143)
at bd.o.J0(SourceFile:38)
at je.h.J0(SourceFile:1)
at bd.o.R0(SourceFile:22)
at bd.o.f(SourceFile:31)
at jc.k1.o(SourceFile:97)
at jc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
Caused by: android.media.MediaCodec$CodecException: Error 0xfffffff4
at android.media.MediaCodec.native_configure(Native Method)
at android.media.MediaCodec.configure(MediaCodec.java:2083)
at android.media.MediaCodec.configure(MediaCodec.java:2011)
at bd.x$b.a(SourceFile:19)
at bd.j.a(SourceFile:69)
at bd.o.z0(SourceFile:76)
at bd.o.F0(SourceFile:113)
at bd.o.E0(SourceFile:143)
at bd.o.J0(SourceFile:38)
at je.h.J0(SourceFile:1)
at bd.o.R0(SourceFile:22)
at bd.o.f(SourceFile:31)
at jc.k1.o(SourceFile:97)
at jc.k1.handleMessage(SourceFile:244)
at android.os.Handler.dispatchMessage(Handler.java:103)
at android.os.Looper.loop(Looper.java:214)
at android.os.HandlerThread.run(HandlerThread.java:67)
2024-05-10 17:05:31.693 11544-11544 ExoPlayerImpl host.exp.exponent I Release d2c4142 [ExoPlayerLib/2.18.1] [DRG_sprout, Nokia 6.1 Plus, HMD Global, 29]
from expo.
Thanks for providing more information!
The error message suggests that the encoding you are using is not supported by your device. The video you are trying to play is encoded with H.264 High profile, which is not among the list of standard supported formats for your device. Although some devices may support it, Android does not provide this support by default. Therefore, I would recommend converting the video to the H.264 Standard profile. This should resolve the issue and allow you to play the video on your device.
Here are some metadata from your file:
Metadata:
major_brand : mp42
minor_version : 0
compatible_brands: mp42mp41isomavc1
creation_time : 2020-03-16T17:52:07.000000Z
Duration: 00:00:42.16, start: 0.000000, bitrate: 8816 kb/s
Stream #0:0[0x1](und): Video: h264 (High) (avc1 / 0x31637661), yuv420p(tv, bt709, progressive), 2160x4096, 8811 kb/s, 50 fps, 50 tbr, 50 tbn
from expo.
Related Issues (20)
- IOS issue for **ImagePicker.launchCameraAsync** IOS version **17 and expo SDK 50**. HOT 2
- [Android][expo-web-browser][expo-auth-session] Web based auth session is closed when user returns to the app by clicking the app icon HOT 2
- expo speech not working in iOS silent mode (reopen) HOT 2
- Expo app not starting when upgrading to SDK 51 HOT 2
- Android app crashing right after launch, iOS working, `new NativeEventEmitter()` was called HOT 1
- Multiple `_layout.tsx` Re-renders (most-recent version) HOT 1
- [SDK 51][expo-image][web][Safari] tintColor fails with images
- Unable to run on iPad and iPod after updating to Expo 51
- Expo AV totally cannot record
- As a requirement of my application under development, I need to get a unique ID for each mobile device, how can I achieve this? HOT 2
- expo-calendar "Add Only" iOS permission HOT 1
- Expo Android app crashing right after launch, iOS working, new NativeEventEmitter() was called HOT 2
- Streaming audio recording HOT 1
- expo-camera `enableTorch` prop does nothing if set to true HOT 2
- Issue with Expo 51 and Android Release Build HOT 1
- `expo-video` listener events not triggered on the web (+ expo snacks fails to run `expo-video` on android)
- Getting error: "Error: GraphQL request failed." while running "eas login"
- Unresolved reference: BuildConfig on expo-notifications 28 HOT 2
- [expo-contacts] presentContactPickerAsync gives no result on backpress Android device HOT 1
- [expo-contacts] presentFormAsync conflicts with presentContactPickerAsync HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from expo.