I encountered an error when using react-native-video to play m3u8. What caused this?
m3u8 comes with a key, some can be played, some cannot be played
08-13 14:12:45.847 E/ACodec: [OMX.qcom.video.decoder.avc] storeMetaDataInBuffers failed w/ err -1010
08-13 14:12:45.878 E/ACodec: [OMX.qcom.video.decoder.avc] ERROR(0x80001019)
08-13 14:12:45.878 E/ACodec: signalError(omxError 0x80001019, internalError -2147483648)
08-13 14:12:45.884 E/MediaCodec: Codec reported err 0x80001019, actionCode 0, while in state 6
08-13 14:12:45.922 E/ExoPlayerImplInternal: Internal runtime error.
java.lang.IllegalStateException
at android.media.MediaCodec.native_dequeueOutputBuffer(Native Method)
Related
im using webrtc for calling, but it's crash in China rom device mostly but also some others(even samsung). here is the crash log:
2021-09-12 18:29:31.899 1218-14625/? E/OMX-VDEC-1080P: Omx_vdec::Comp Init Returning failure, errno 12
2021-09-12 18:29:31.899 1218-14625/? E/OMX-VDEC-1080P: eventfd_write failed for fd: -1, errno = 9, force stop async_thread
2021-09-12 18:29:31.899 1218-14625/? E/OMX-VDEC-1080P: Invalid input: -1
2021-09-12 18:29:31.913 1218-14625/? E/android.hardware.media.omx#1.0-service: Failed to allocate omx component 'OMX.qcom.video.decoder.vp8' err=InsufficientResources(0x80001000)
2021-09-12 18:29:31.916 3298-27657/com.civix.link E/ACodec: Unable to instantiate codec 'OMX.qcom.video.decoder.vp8' with err 0xfffffff4.
2021-09-12 18:29:31.916 3298-27657/com.civix.link E/ACodec: signalError(omxError 0xfffffff4, internalError -12)
2021-09-12 18:29:31.918 3298-27656/com.civix.link E/MediaCodec: Codec reported err 0xfffffff4, actionCode 0, while in state 1
2021-09-12 18:29:31.924 1195-32507/? E/ResourceManagerService: getLowestPriorityBiggestClient_l: lowest priority 0 vs caller priority 0
2021-09-12 18:29:31.925 3298-25911/com.civix.link W/MediaCodec-JNI: try to release MediaCodec from JMediaCodec::~JMediaCodec()...
2021-09-12 18:29:31.925 3298-25911/com.civix.link W/MediaCodec-JNI: done releasing MediaCodec from JMediaCodec::~JMediaCodec().
2021-09-12 18:29:31.925 3298-25911/com.civix.link W/System.err: android.media.MediaCodec$CodecException: Failed to initialize OMX.qcom.video.decoder.vp8, error 0xfffffff4
2021-09-12 18:29:31.925 3298-25911/com.civix.link W/System.err: at android.media.MediaCodec.native_setup(Native Method)
2021-09-12 18:29:31.925 3298-25911/com.civix.link W/System.err: at android.media.MediaCodec.<init>(MediaCodec.java:1912)
2021-09-12 18:29:31.925 3298-25911/com.civix.link W/System.err: at android.media.MediaCodec.createByCodecName(MediaCodec.java:1890)
2021-09-12 18:29:31.925 3298-25911/com.civix.link W/System.err: at org.webrtc.HardwareVideoDecoder.initDecodeInternal(HardwareVideoDecoder.java:173)
2021-09-12 18:29:31.925 3298-25911/com.civix.link W/System.err: at org.webrtc.HardwareVideoDecoder.initDecode(HardwareVideoDecoder.java:150)
2021-09-12 18:29:31.925 3298-25911/com.civix.link E/rtc: #
# Fatal error in: gen/sdk/android/generated_base_jni/jni/../../../../../../../../../usr/local/google/home/sakal/code/webrtc-aar-release/src/sdk/android/src/jni/jni_generator_helper.h, line 37
# last system error: 0
# Check failed: !env->ExceptionCheck()
#
I have some device work normally, but in some device(even Samsung) it crash after 1 minute -> 30 minutes running call.
About my webrtc, im using default all:
peerConnectionFactory = PeerConnectionFactory.builder()
.setOptions(options)
.setVideoEncoderFactory(new DefaultVideoEncoderFactory(MeetingClient.mRootEglBase.getEglBaseContext(), true, true))
.setVideoDecoderFactory(new DefaultVideoDecoderFactory(MeetingClient.mRootEglBase.getEglBaseContext()))
.createPeerConnectionFactory();
Can someone tech me how to solve this? Thanks
I am trying to configure a video encoder using MediaCodec for mime=video/avc, width=1920, height=1080.
Unfortunately the device complains with the following log:
12-20 13:11:49.410 5781-5817/ I/OMXClient: Treble IOmx obtained
12-20 13:11:49.423 5781-5817/ E/ACodec: [OMX.google.h264.encoder] configureCodec returning error -38
12-20 13:11:49.424 5781-5817/ E/ACodec: signalError(omxError 0x80001001, internalError -2147483648)
12-20 13:11:49.424 5781-5816/ E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 3
12-20 13:11:49.425 5781-5801/ E/MediaCodec: configure failed with err 0x80001001, resetting...
12-20 13:11:49.433 5781-5817/com.humaneyes.filesave I/OMXClient: Treble IOmx obtained
Some codecs are finicky and require special properties.
Failing to specify some of these can cause the MediaCodec configure()
call to throw an unhelpful exception.
Must define the following integer properties in the MediaFormat at a minimum:
MediaFormat.KEY_BIT_RATE
MediaFormat.KEY_FRAME_RATE
MediaFormat.KEY_I_FRAME_INTERVAL
MediaFormat.KEY_COLOR_FORMAT
For example:
MediaFormat mediaFormat = MediaFormat.createVideoFormat("video/avc", 1920, 1080);
mediaFormat.setInteger(MediaFormat.KEY_BIT_RATE, 2000000);
mediaFormat.setInteger(MediaFormat.KEY_FRAME_RATE, 30);
mediaFormat.setInteger(MediaFormat.KEY_COLOR_FORMAT, MediaCodecInfo.CodecCapabilities.COLOR_FormatYUV420Planar);
mediaFormat.setInteger(MediaFormat.KEY_I_FRAME_INTERVAL, 1);
My case is, I did to convert a video with a mediacodec lib, then I sent the converted file to another device. Before I sent to another device, that file could run normally. But when file is received, that file is corrupted but still can be played and show a dialog like "Can't properly play this file due to an unexpected error has occured".
This is an error log:
05-26 10:10:53.522 299-12376/? E/ACodec: [OMX.Intel.aac.decoder] ERROR(0x80001001)
05-26 10:10:53.522 299-12376/? E/ACodec: signalError(omxError 0x80001001, internalError -2147483648)
05-26 10:10:53.522 299-12376/? E/MediaCodec: Codec reported err 0x80001001, actionCode 0, while in state 6
05-26 10:10:53.522 299-12375/? E/NuPlayerDecoder: Failed to dequeue input buffer for OMX.Intel.aac.decoder (err=-38)
05-26 10:10:53.523 299-12365/? E/NuPlayer: received error(0xffffffda) from audio decoder, flushing(0), now shutting down
05-26 10:10:53.523 2608-14507/? E/MediaPlayer: error (1, -38)
05-26 10:10:53.523 2608-2608/? E/MediaPlayer: Error (1,-38)
05-26 10:10:53.523 2608-2608/? D/VideoView: Error: 1,-38
05-26 10:10:53.523 2608-2608/? D/MoviePlayerForL: Gallery MoviePlayer Receive error
05-26 10:10:53.523 299-12375/? E/NuPlayerDecoder: failed to flush OMX.Intel.aac.decoder (err=-38)
05-26 10:10:53.523 299-12365/? E/NuPlayer: received error(0xffffffda) from audio decoder, flushing(2), now shutting down
05-26 10:10:53.526 2608-29677/? E/MediaPlayer: error (1, -38)
05-26 10:10:53.527 299-12376/? E/SimpleSoftOMXComponent: 1
05-26 10:10:53.527 299-12376/? E/SimpleSoftOMXComponent: 2
05-26 10:10:53.527 299-12376/? E/SimpleSoftOMXComponent: 3
Now my question is, what makes that file is broken and how to fix it?
I followed the instruction of this.But can not to make it work. Always got the "There was an error while playing" problem. Here is my steps:
Create the project in google play console
Enable the Youtube Data API for the project
Setup the credentials for the project
Import sample downloaded from google into Android studio
Change the package name to com.mydomain.youtubeapidemo
Change the developer key to the one in google play console
But I always get the "There was an error while playing" problem.
By the way, I'm using the following command to get the SHA1:
keytool -exportcert -alias androiddebugkey -keystore
~/.android/debug.keystore -list -v
What could be the reason? Thanks for any suggestion.
EDIT:
I got the following error message in my console:
04-27 23:25:28.132 4995-5050/? E/WVMExtractor﹕ Failed to open libwvm.so: dlopen failed: library "libwvm.so" not found
04-27 23:25:28.961 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Should have subtitle controller already set
04-27 23:25:28.984 4995-5058/? E/OMXNodeInstance﹕ getParameter(100663311) ERROR: 0x8000101a
\04-27 23:25:29.046 4995-5058/? E/SoftFFmpegVideo﹕ unsupported role: video_decoder.mpeg2
04-27 23:25:29.046 4995-5058/? E/OMXNodeInstance﹕ setParameter(16777239) ERROR: 0x80001001
04-27 23:25:29.046 4995-5058/? E/OMXNodeInstance﹕ getParameter(100663311) ERROR: 0x8000101a
04-27 23:25:29.046 4995-5058/? E/OMXNodeInstance﹕ getParameter(100663297) ERROR: 0x8000100e
04-27 23:25:29.046 4995-5058/? E/OMXNodeInstance﹕ OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
04-27 23:25:29.161 4995-5146/? E/SoftAVC﹕ Decoder failed: -2
04-27 23:25:29.161 4995-5060/? E/ACodec﹕ [OMX.google.h264.decoder] ERROR(0x80001001)
04-27 23:25:29.161 4995-5060/? E/ACodec﹕ signalError(omxError 0x80001001, internalError -2147483648)
04-27 23:25:29.162 4995-5057/? E/MediaCodec﹕ Codec reported err 0x80001001, actionCode 0, while in state 6
04-27 23:25:29.164 4995-5056/? E/NuPlayerDecoder﹕ Failed to dequeue input buffer for OMX.google.h264.decoder (err=-38)
04-27 23:25:29.164 4995-5049/? E/NuPlayer﹕ received error(0xffffffda) from video decoder, flushing(0), now shutting down
04-27 23:25:29.164 2798-2871/com.google.android.youtube.player E/MediaPlayer﹕ error (1, -38)
04-27 23:25:29.164 4995-5056/? E/NuPlayerDecoder﹕ failed to flush OMX.google.h264.decoder (err=-38)
04-27 23:25:29.164 4995-5049/? E/NuPlayer﹕ received error(0xffffffda) from video decoder, flushing(2), now shutting down
04-27 23:25:29.164 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Error (1,-38)
04-27 23:25:29.165 2798-2815/com.google.android.youtube.player E/MediaPlayer﹕ error (1, -38)
04-27 23:25:30.415 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Should have subtitle controller already set
04-27 23:25:30.452 4995-5159/? E/OMXNodeInstance﹕ setParameter(1866465283) ERROR: 0x8000101a
04-27 23:25:30.452 4995-5157/? E/OMXNodeInstance﹕ OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
04-27 23:25:30.452 4995-5157/? E/ACodec﹕ [OMX.google.h264.decoder] storeMetaDataInBuffers failed w/ err -2147483648
04-27 23:25:31.983 4996-4996/? E/local_camera﹕ We have a problem with the hw connection 2 (No such file or directory)
04-27 23:25:31.984 2798-2871/com.google.android.youtube.player E/MediaPlayer﹕ error (100, 0)
04-27 23:25:31.984 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Error (100,0)
04-27 23:25:31.987 495-554/system_process E/AudioService﹕ Media server died.
04-27 23:25:32.068 5181-5181/? E/MonoPipe﹕ Failed to fetch local time frequency when constructing a MonoPipe (res = -32). getNextWriteTimestamp calls will be non-functional
04-27 23:25:32.072 5181-5181/? E/SoundTriggerHwService﹕ couldn't load sound trigger module sound_trigger.primary (No such file or directory)
04-27 23:25:32.488 495-554/system_process E/AudioService﹕ Media server started.
04-27 23:25:33.279 5181-5194/? E/WVMExtractor﹕ Failed to open libwvm.so: dlopen failed: library "libwvm.so" not found
04-27 23:25:34.080 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Should have subtitle controller already set
04-27 23:25:34.133 5181-5200/? E/SoftFFmpegVideo﹕ unsupported role: video_decoder.mpeg2
04-27 23:25:34.133 5181-5200/? E/OMXNodeInstance﹕ setParameter(16777239) ERROR: 0x80001001
04-27 23:25:34.231 5181-5281/? E/SoftAVC﹕ Decoder failed: -2
04-27 23:25:34.231 5181-5201/? E/ACodec﹕ [OMX.google.h264.decoder] ERROR(0x80001001)
04-27 23:25:34.231 5181-5201/? E/ACodec﹕ signalError(omxError 0x80001001, internalError -2147483648)
04-27 23:25:34.231 5181-5199/? E/MediaCodec﹕ Codec reported err 0x80001001, actionCode 0, while in state 6
04-27 23:25:34.232 5181-5198/? E/NuPlayerDecoder﹕ Failed to dequeue output buffer for OMX.google.h264.decoder (err=-38)
04-27 23:25:34.233 5181-5193/? E/NuPlayer﹕ received error(0xffffffda) from video decoder, flushing(0), now shutting down
04-27 23:25:34.233 5181-5198/? E/NuPlayerDecoder﹕ failed to flush OMX.google.h264.decoder (err=-38)
04-27 23:25:34.233 2798-2814/com.google.android.youtube.player E/MediaPlayer﹕ error (1, -38)
04-27 23:25:34.233 5181-5193/? E/NuPlayer﹕ received error(0xffffffda) from video decoder, flushing(2), now shutting down
04-27 23:25:34.233 2798-2814/com.google.android.youtube.player E/MediaPlayer﹕ error (1, -38)
04-27 23:25:34.233 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Error (1,-38)
04-27 23:25:35.513 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Should have subtitle controller already set
04-27 23:25:35.520 5181-5292/? E/OMXNodeInstance﹕ OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
04-27 23:25:35.520 5181-5292/? E/ACodec﹕ [OMX.google.h264.decoder] storeMetaDataInBuffers failed w/ err -2147483648
04-27 23:25:35.521 5181-5294/? E/OMXNodeInstance﹕ setParameter(1866465283) ERROR: 0x8000101a
04-27 23:25:35.525 5181-5295/? E/SoftAVC﹕ Decoder failed: -2
04-27 23:25:35.525 5181-5292/? E/ACodec﹕ [OMX.google.h264.decoder] ERROR(0x80001001)
04-27 23:25:35.525 5181-5292/? E/ACodec﹕ signalError(omxError 0x80001001, internalError -2147483648)
04-27 23:25:35.525 5181-5291/? E/MediaCodec﹕ Codec reported err 0x80001001, actionCode 0, while in state 6
04-27 23:25:35.527 5181-5290/? E/NuPlayerDecoder﹕ Failed to dequeue input buffer for OMX.google.h264.decoder (err=-38)
04-27 23:25:35.527 5181-5285/? E/NuPlayer﹕ received error(0xffffffda) from video decoder, flushing(0), now shutting down
04-27 23:25:35.527 2798-2871/com.google.android.youtube.player E/MediaPlayer﹕ error (1, -38)
04-27 23:25:35.528 5181-5290/? E/NuPlayerDecoder﹕ failed to flush OMX.google.h264.decoder (err=-38)
04-27 23:25:35.528 5181-5285/? E/NuPlayer﹕ received error(0xffffffda) from video decoder, flushing(2), now shutting down
04-27 23:25:35.528 2798-2871/com.google.android.youtube.player E/MediaPlayer﹕ error (1, -38)
04-27 23:25:35.531 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Error (1,-38)
04-27 23:25:36.694 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Should have subtitle controller already set
04-27 23:25:36.709 5181-5306/? E/OMXNodeInstance﹕ setParameter(1866465283) ERROR: 0x8000101a
04-27 23:25:36.710 5181-5307/? E/OMXNodeInstance﹕ OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
04-27 23:25:36.710 5181-5307/? E/ACodec﹕ [OMX.google.h264.decoder] storeMetaDataInBuffers failed w/ err -2147483648
04-27 23:25:36.722 5181-5310/? E/SoftAVC﹕ Decoder failed: -2
04-27 23:25:36.727 5181-5307/? E/ACodec﹕ [OMX.google.h264.decoder] ERROR(0x80001001)
04-27 23:25:36.727 5181-5307/? E/ACodec﹕ signalError(omxError 0x80001001, internalError -2147483648)
04-27 23:25:36.727 5181-5304/? E/MediaCodec﹕ Codec reported err 0x80001001, actionCode 0, while in state 6
04-27 23:25:36.729 5181-5303/? E/NuPlayerDecoder﹕ Failed to dequeue input buffer for OMX.google.h264.decoder (err=-38)
04-27 23:25:36.730 5181-5299/? E/NuPlayer﹕ received error(0xffffffda) from video decoder, flushing(0), now shutting down
04-27 23:25:36.733 2798-2871/com.google.android.youtube.player E/MediaPlayer﹕ error (1, -38)
04-27 23:25:36.739 5181-5303/? E/NuPlayerDecoder﹕ failed to flush OMX.google.h264.decoder (err=-38)
04-27 23:25:36.740 5181-5299/? E/NuPlayer﹕ received error(0xffffffda) from video decoder, flushing(2), now shutting down
04-27 23:25:36.749 2798-2859/com.google.android.youtube.player E/MediaPlayer﹕ error (1, -38)
04-27 23:25:36.766 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Error (1,-38)
04-27 23:25:38.112 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Should have subtitle controller already set
04-27 23:25:38.125 5181-5320/? E/OMXNodeInstance﹕ OMX_GetExtensionIndex OMX.google.android.index.storeMetaDataInBuffers failed
04-27 23:25:38.125 5181-5320/? E/ACodec﹕ [OMX.google.h264.decoder] storeMetaDataInBuffers failed w/ err -2147483648
04-27 23:25:38.125 5181-5321/? E/OMXNodeInstance﹕ setParameter(1866465283) ERROR: 0x8000101a
04-27 23:25:38.131 5181-5324/? A/libc﹕ Fatal signal 11 (SIGSEGV), code 1, fault addr 0x60 in tid 5324 (peg.aac.decoder)
04-27 23:25:38.238 85-85/? E/DEBUG﹕ AM write failure (32 / Broken pipe)
04-27 23:25:38.294 495-1532/system_process E/SharedPreferencesImpl﹕ Couldn't create directory for SharedPreferences file shared_prefs/log_files.xml
04-27 23:25:38.321 5183-5183/? E/local_camera﹕ We have a problem with the hw connection 2 (No such file or directory)
04-27 23:25:38.321 5182-5182/? E/local_camera﹕ We have a problem with the hw connection 2 (No such file or directory)
04-27 23:25:38.323 495-554/system_process E/AudioService﹕ Media server died.
04-27 23:25:38.323 2798-2814/com.google.android.youtube.player E/MediaPlayer﹕ error (100, 0)
04-27 23:25:38.323 2798-2798/com.google.android.youtube.player E/MediaPlayer﹕ Error (100,0)
04-27 23:25:38.412 5330-5330/? E/MonoPipe﹕ Failed to fetch local time frequency when constructing a MonoPipe (res = -32). getNextWriteTimestamp calls will be non-functional
04-27 23:25:38.417 5330-5330/? E/SoundTriggerHwService﹕ couldn't load sound trigger module sound_trigger.primary (No such file or directory)
04-27 23:25:38.824 495-554/system_process E/AudioService﹕ Media server started.
It works after I changed the video id in demo application. What I don't understand is it works if I put the video id from application to browser. Why the video in demo application doesn't work.
when you import the youtube android api demo ...
there you need to add your api key which one you have got from api store.
package com.examples.youtubeapidemo;
/**
* Static container class for holding a reference to your YouTube Developer Key.
*/
public class DeveloperKey {
/**
* Please replace this with a valid API key which is enabled for the
* YouTube Data API v3 service. Go to the
* Google Developers Console
* to register a new developer key.
*/
public static final String DEVELOPER_KEY = "Here you need to add your youtube api key ...dllk3m6SNbpRPHZLCly6Wq1pxM";
}
When i play video with resolution 704x576 (using MediaCodec) . I'm seeing this error and app is crashing
Logs:
12-04 04:35:55.507 E/OMX-VDEC-1080P( 9621): Insufficient sized buffer given for playback, expected 2514944, got 2506752
12-04 04:35:55.507 E/OMXNodeInstance( 9621): OMX_UseBuffer failed with error -2147479547 (0x80001005)
12-04 04:35:55.507 E/ACodec (22699): registering GraphicBuffer 0 with OMX IL component failed: -2147483648
12-04 04:35:55.507 E/ACodec (22699): Failed to allocate output port buffers after port reconfiguration (error 0x80000000)
12-04 04:35:55.507 E/MediaCodec(22699): Codec reported an error. (omx error 0x80001001, internalError -2147483648)