react-native-video takes too long to start playback - android

In upgrading my app to react-native 0.59, I also upgraded react-native-video to it's latest version 4.4.1. What is currently happening is when trying to play videos with this library, it takes a while for the video to be available for playback. The size of the videos doesn't seem to matter. The videos are stored on S3, in my test environment the videos are linked by Cloudfront, in my local environment the videos are linked by the S3 location, but the behavior exhibited is the same for both environments.
This only happens for Android, iOS playback availability is ready in under 1s for the same videos.
I have tried rolling back react-native-video to a previous compatible version, the problem persists.
Different devices have different wait times for playback availability.
I wasn't able to used SDK 27 due to using a version of Firebase requiring SDK 28.
There is an IOException being raised when the component has been initialized to get the S3 resource, but the library does eventually get the video.
I don't know the exact cause of the problem, whether or not the library is downloading the video before playing, or if there needs to be a header included in the request.
Here is the debug output when trying to play a video:
I/MediaPlayer: constructor
W/MediaPlayer: setScreenOnWhilePlaying(true) is ineffective without a SurfaceHolder
V/MediaPlayer: resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer: resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
cleanDrmObj: mDrmObj=null mDrmSessionId=null
I/MediaPlayer: setDataSource:<S3-url>/video.mp4
W/MediaPlayer: Couldn't open <S3-url>/video.mp4: java.io.FileNotFoundException: No content provider: <S3-url>/video.mp4
I/MediaPlayer: setDataSource:<S3-url>/video.mp4
V/MediaHTTPService: MediaHTTPService(android.media.MediaHTTPService#cefd526): Cookies: null
V/MediaHTTPService: makeHTTPConnection: CookieManager created: java.net.CookieManager#6738567
makeHTTPConnection(android.media.MediaHTTPService#cefd526): cookieHandler: java.net.CookieManager#6738567 Cookies: null
I/DpmTcmClient: RegisterTcmMonitor from: com.android.okhttp.TcmIdleTimerMonitor
V/MediaPlayer: resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
cleanDrmObj: mDrmObj=null mDrmSessionId=null
V/MediaPlayer: resetDrmState: mDrmInfo=null mDrmProvisioningThread=null mPrepareDrmInProgress=false mActiveDrmScheme=false
cleanDrmObj: mDrmObj=null mDrmSessionId=null
I/MediaPlayer: setDataSource:<S3-url>/video.mp4
W/MediaPlayer: Couldn't open <S3-url>/video.mp4: java.io.FileNotFoundException: No content provider: <S3-url>/video.mp4
I/MediaPlayer: setDataSource:<S3-url>/video.mp4
V/MediaHTTPService: MediaHTTPService(android.media.MediaHTTPService#f3e96c4): Cookies: null
V/MediaHTTPService: makeHTTPConnection: CookieHandler (java.net.CookieManager#6738567) exists.
makeHTTPConnection(android.media.MediaHTTPService#f3e96c4): cookieHandler: java.net.CookieManager#6738567 Cookies: null
W/MediaPlayer: setScreenOnWhilePlaying(true) is ineffective for Surface
W/System: A resource failed to call release.
I/MediaPlayer: start
W/MapperHal: buffer descriptor with invalid usage bits 0x2000
W/MapperHal: buffer descriptor with invalid usage bits 0x2000
W/MapperHal: buffer descriptor with invalid usage bits 0x2000
E/Config:Grabber:GameModeImComponents: Exception:Value fcf76744443e3b9b807f2f2b24316f7e4814f6f6829b3a1403f7fe6b6f1f4111242d998547a4f387fdb6f411c5587e4ee1e5f80ac775bd0fb89f0f20f5dd10ee9a42ac5080a02377888eb7f9961acfad8ddf68ea67cab1f15a2ce58bfda46223bae1c9201ae662baf445368dc8d30680ee7f1e58d782c3d588f14c91f5bd80d84e9d60d298153d0b781a842d5c05aae5bcf2fc423b6419cadfdaad20044d200e3a850fb950b2b10851a69032db63196767da7a27e23c0835b1180f5dae394433ae57895815b8d3479fbf8e451efd426933b11ba2ceb78057fbe638daaaf9100084541b079a4c5bb3cd705ebc9e2eb46ee8086f03c5c3dc9a5b8b9331b4f01923ac25e0c214f2876d38dc31f3bc6d93681511c7ccd1a672bcc05e62d4a1b8fe27086bd1bfc7fffeff51d16f0c9f6d0004d249bc57667be3bd3109d08d28b8bf96435d4ce310f80d78ba6cfbf4dd1ab65dd37645c5bd9a91fd416ca58992c8ada57a67fd0238460f83b004c9f95aef00da9ad00b96a383a35f8edfb4db21c4c98165063124d79988fdc6b104f9f41bef115cb4fbdb56a5a72097883d68ffdb0c9e1b7c71e30bd4cb589883e71b41ebb174720c5dc357ace7009588aa6f2ef13934aca4bbd330f17506b3713cb5fd4dff3bff8777fada23dc38584edbe34e0ad6d8929e970ce04275424ac06ee070ec76eefba6ac7681693f1f36276127a5f8be92ed65e269fde35c09cac535925a0d4eab290353f1b578949fe8ff8cde7c6c72457a9c1fb4492bed2e93064d5009bbfb0c040bf631e628b61349193471abc17c71c3367f764633c3d989bb33b949f8136de844c0aa5d41d246bf02ac824077a76312c62bbe297ce08b20312a2c0b2a3f8e4a878c1453d793a9cc1a38a8767368efc857b729a207ff9f860dc57c4d7fbe9422d388e95ff0be79f776b7f4307e98fe10ab607e7cbe933306b5be42b95ff490b7dd4cbec76b6590acd621a266178d0b8ea1594d6f33de986cdb62b21168145d86dba8fed10d59c87a5bde995a3aa7251b98b7ed1b15d01e4232624efebf5efae840e733abca5ab8c9e274b78b7c62cfadf341d6a01e2e5a9e7852bc15def79f0443c54ebeaa94ecb949f80ae13339ed301e4b947993f0491e271a1ab44e054fa1d1060014470e2b05fbaf7f95888474c254f9689d04c5dabc5aa28358094d37e8461b0b5711d5c327fc0286dd650ca26e79c5b094d237c63c1cd6a595484700a9dc8f63eed39283a6ee8a52ff93fb12b3fa387ef8113547a11bb501273735806a28e7430106785a33f4dc97f4f17d7e78a662b7d00f6838e57368c74bc4826bff82de4552cd7a7e109919a6cf7ad5e7e7b7a66299bf1d89ba342b13d69fb08e1292b6de85a0097aba02d12f17ab39bf09f3f56a589301313b8971fc97e594847130e504758c5b7721fec3a09bf599e22f63d29dc8772464a4dc91e802f9e4a5cae29bdd42b3d854ca04d3cb44bff6d4ce3c3354a7b00dcb393c70a45c55633a80ab0db8c09ae1b9e15a21057e6916bc1386a9d1afd96bba1f2a464b5684aa52f336f4f633d0de2fce2703408056a68c36195539efd1e21dab31ff37a4f6cfc6c0caa5942b39dbec0b9b0faf87a5d7576987d47c48d5b95ea964ab3863bfe6d4d0470d07bd362d2deb72f50896a1af6f64875ca5ea097eddfb6ac478e87875f506a9683c98f3fc1ecd15aac0400004bc621c9e263fdc0d0ab30c2804c50de4c3c946b58c0ac8b34d9011dfa6c41f7d6d84afffa8a64f87689ee80ae12e203cda of type java.lang.String cannot be converted to JSONArray
E/Config:Grabber:GameModeImComponents: Exception:Value fcf76744443e3b9b807f2f2b24316f7e4814f6f6829b3a1403f7fe6b6f1f4111242d998547a4f387fdb6f411c5587e4ee1e5f80ac775bd0fb89f0f20f5dd10ee9a42ac5080a02377888eb7f9961acfad8ddf68ea67cab1f15a2ce58bfda46223bae1c9201ae662baf445368dc8d30680ee7f1e58d782c3d588f14c91f5bd80d84e9d60d298153d0b781a842d5c05aae5bcf2fc423b6419cadfdaad20044d200e3a850fb950b2b10851a69032db63196767da7a27e23c0835b1180f5dae394433ae57895815b8d3479fbf8e451efd426933b11ba2ceb78057fbe638daaaf9100084541b079a4c5bb3cd705ebc9e2eb46ee8086f03c5c3dc9a5b8b9331b4f01923ac25e0c214f2876d38dc31f3bc6d93681511c7ccd1a672bcc05e62d4a1b8fe27086bd1bfc7fffeff51d16f0c9f6d0004d249bc57667be3bd3109d08d28b8bf96435d4ce310f80d78ba6cfbf4dd1ab65dd37645c5bd9a91fd416ca58992c8ada57a67fd0238460f83b004c9f95aef00da9ad00b96a383a35f8edfb4db21c4c98165063124d79988fdc6b104f9f41bef115cb4fbdb56a5a72097883d68ffdb0c9e1b7c71e30bd4cb589883e71b41ebb174720c5dc357ace7009588aa6f2ef13934aca4bbd330f17506b3713cb5fd4dff3bff8777fada23dc38584edbe34e0ad6d8929e970ce04275424ac06ee070ec76eefba6ac7681693f1f36276127a5f8be92ed65e269fde35c09cac535925a0d4eab290353f1b578949fe8ff8cde7c6c72457a9c1fb4492bed2e93064d5009bbfb0c040bf631e628b61349193471abc17c71c3367f764633c3d989bb33b949f8136de844c0aa5d41d246bf02ac824077a76312c62bbe297ce08b20312a2c0b2a3f8e4a878c1453d793a9cc1a38a8767368efc857b729a207ff9f860dc57c4d7fbe9422d388e95ff0be79f776b7f4307e98fe10ab607e7cbe933306b5be42b95ff490b7dd4cbec76b6590acd621a266178d0b8ea1594d6f33de986cdb62b21168145d86dba8fed10d59c87a5bde995a3aa7251b98b7ed1b15d01e4232624efebf5efae840e733abca5ab8c9e274b78b7c62cfadf341d6a01e2e5a9e7852bc15def79f0443c54ebeaa94ecb949f80ae13339ed301e4b947993f0491e271a1ab44e054fa1d1060014470e2b05fbaf7f95888474c254f9689d04c5dabc5aa28358094d37e8461b0b5711d5c327fc0286dd650ca26e79c5b094d237c63c1cd6a595484700a9dc8f63eed39283a6ee8a52ff93fb12b3fa387ef8113547a11bb501273735806a28e7430106785a33f4dc97f4f17d7e78a662b7d00f6838e57368c74bc4826bff82de4552cd7a7e109919a6cf7ad5e7e7b7a66299bf1d89ba342b13d69fb08e1292b6de85a0097aba02d12f17ab39bf09f3f56a589301313b8971fc97e594847130e504758c5b7721fec3a09bf599e22f63d29dc8772464a4dc91e802f9e4a5cae29bdd42b3d854ca04d3cb44bff6d4ce3c3354a7b00dcb393c70a45c55633a80ab0db8c09ae1b9e15a21057e6916bc1386a9d1afd96bba1f2a464b5684aa52f336f4f633d0de2fce2703408056a68c36195539efd1e21dab31ff37a4f6cfc6c0caa5942b39dbec0b9b0faf87a5d7576987d47c48d5b95ea964ab3863bfe6d4d0470d07bd362d2deb72f50896a1af6f64875ca5ea097eddfb6ac478e87875f506a9683c98f3fc1ecd15aac0400004bc621c9e263fdc0d0ab30c2804c50de4c3c946b58c0ac8b34d9011dfa6c41f7d6d84afffa8a64f87689ee80ae12e203cda of type java.lang.String cannot be converted to JSONArray
W/MapperHal: buffer descriptor with invalid usage bits 0x2000
W/MapperHal: buffer descriptor with invalid usage bits 0x2000
W/MediaPlayerNative: info/warning (3, 0)
W/MapperHal: buffer descriptor with invalid usage bits 0x2000
W/OpenGLRenderer: Unsupported Gamut: 147062784
W/MapperHal: buffer descriptor with invalid usage bits 0x2000
W/MediaPlayerNative: info/warning (703, 62540)
W/MediaPlayerNative: info/warning (701, 0)
W/MediaPlayerNative: info/warning (703, 69051)
W/MediaPlayerNative: info/warning (702, 0)
W/MediaPlayerNative: info/warning (3, 0)
W/MediaPlayerNative: info/warning (703, 10821)
W/MediaPlayerNative: info/warning (701, 0)
W/MediaPlayerNative: info/warning (703, 13947)
W/MediaPlayerNative: info/warning (702, 0)
W/MediaPlayerNative: info/warning (3, 0)
I/MediaPlayer: seek to:0 mode:0
W/MediaPlayerNative: info/warning (703, 67808)
info/warning (701, 0)
W/MediaPlayerNative: info/warning (703, 9582)
info/warning (702, 0)
React-Native: 0.59
Target SDK: 28
Android OS: Pie
Testing Device: OnePlus 5
Other devices with older OS version (at least Marshmellow) are also affected

By enabling the react-native-video to use the ExoPlayer on Android reduced the load time to only couple of seconds from around earlier 20sec. So now similar playback time on iOS and Android. The file played was 8.8mb .MOV file via Google Cloud storage.
Add inside the whole projects root a react-native.config.js file with following lines:
module.exports = {
dependencies: {
"react-native-video": {
platforms: {
android: {
sourceDir: "../node_modules/react-native-video/android-exoplayer",
},
},
},
},
}
Used: "react-native-video": "^5.2.0",
release mode, on device.

Related

Flutter, video_player I/ACodec codec does not support config priority (err -2147483648)

The videos are mp4. All other videos work fine, but weirdly, only certain videos come out this way.
I/ACodec (27533): codec does not support config priority (err -2147483648)
I was offered to change the audio codec while searching.
I tried encoding it with AAC, AC3, and MPEG but couldn't solve it. (I tried with each file)
It's really weird. The audio is a bit stuttering. It doesn't sound very annoying, but it certainly seems to be a bit cut off.
Does anyone know how to do this? Any advice would be appreciated. thank you.
I/ExoPlayerImpl( 8291): Init 6c53ea1 [ExoPlayerLib/2.12.1] [generic_x86_64, Android SDK built for x86_64, unknown, 24]
D/MetadataUtil( 8291): Skipped unknown metadata entry: ������
I/art ( 8291): Do partial code cache collection, code=25KB, data=24KB
I/art ( 8291): After code cache collection, code=23KB, data=23KB
I/art ( 8291): Increasing code cache capacity to 128KB
I/VideoCapabilities( 8291): Unsupported profile 4 for video/mp4v-es
I/OMXClient( 8291): MuxOMX ctor
I/MediaCodec( 8291): [OMX.google.h264.decoder] setting surface generation to 8489985
E/ACodec ( 8291): [OMX.google.h264.decoder] storeMetaDataInBuffers failed w/ err -1010
I/ACodec ( 8291): codec does not support config priority (err -2147483648)
I/ACodec ( 8291): codec does not support config operating rate (err -2147483648)
I/OMXClient( 8291): MuxOMX ctor
I/ACodec ( 8291): codec does not support config priority (err -2147483648)
D/AudioTrack( 8291): Client defaulted notificationFrames to 3675 for frameCount 11025
D/MediaCodec( 8291): [OMX.google.h264.decoder] setting dataspace on output surface to #104
D/ ( 8291): HostConnection::get() New Host Connection established 0x77a6caeb31c0, tid 8420
D/SoftwareRenderer( 8291): setting dataspace on output surface to #104
I/art ( 8291): Do partial code cache collection, code=61KB, data=59KB
I/art ( 8291): After code cache collection, code=58KB, data=57KB
I/art ( 8291): Increasing code cache capacity to 256KB

Android Studio videoView - unexpected end of stream

I'm trying to play video from the URL. Everything seems fine in the first few minutes, but then it crashes and the message "Can't Play Video" occurs. My code:
videoView.setVisibility(View.VISIBLE);
videoView.setVideoPath(url);
videoView.setMediaController(mediaController);
videoView.seekTo(time);
videoView.start();
Logcat:
2020-04-03 22:02:29.572 25409-25409/com.modyf.anime_app W/InputTransport: Slow Input: 152ms so far, channel 'ClientState{7a1b727 uid 10348 pid 25409} (server)' publisher ~ publishKeyEvent: seq=1, deviceId=4, source=0x101, action=0x0, flags=0x8, keyCode=25, scanCode=114, metaState=0x0, repeatCount=0,downTime=101580658000000, eventTime=101580658000000
2020-04-03 22:03:54.751 25409-25421/com.modyf.anime_app W/MediaHTTPConnection: readAt 25214561 / 16799 => java.net.ProtocolException: unexpected end of stream
2020-04-03 22:05:11.419 25409-25421/com.modyf.anime_app W/MediaPlayerNative: info/warning (804, -1004)
2020-04-03 22:05:11.475 25409-25422/com.modyf.anime_app E/MediaPlayerNative: error (1, -1004)
2020-04-03 22:05:11.476 25409-25409/com.modyf.anime_app E/MediaPlayer: Error (1,-1004)
2020-04-03 22:05:11.476 25409-25409/com.modyf.anime_app D/VideoView: Error: 1,-1004
2020-04-03 22:05:11.604 25409-25439/com.modyf.anime_app W/Adreno-EGL: <qeglDrvAPI_eglGetConfigAttrib:612>: EGL_BAD_ATTRIBUTE
2020-04-03 22:05:11.606 25409-25439/com.modyf.anime_app D/vndksupport: Loading /vendor/lib64/hw/gralloc.msm8937.so from current namespace instead of sphal namespace.

ts file not playing in android tablet

I am trying to play a file i have recorded. The file plays well in vlc(linux pc) and in Moboplayer(android tablet). While using the default player in the android tablet it shows this in logcat.
I/ActivityManager( 201): START {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.example.mymediaplayer/.MyVideoView bnds=[656,246][752,342]} from pid 417
I/System.out(20286): MyVideoView.onCreate()
I/System.out(20286): MyVideoView.onResume()
V/TabletStatusBar( 281): setLightsOn(true)
I/AwesomePlayer( 141): setDataSource_l('/sdcard/video/TunerOut.ts')
I/avc_utils( 141): found AVC codec config (720 x 480, Baseline-profile level 3.1)
I/MPEG2TSExtractor( 141): haveAudio=1, haveVideo=1
E/OMXCodec( 141): Attempting to allocate OMX node 'OMX.TI.DUCATI1.VIDEO.DECODER'
E/OMXCodec( 141): Attempting to allocate OMX node 'OMX.Nvidia.h264.decode'
E/OMXCodec( 141): Attempting to allocate OMX node 'OMX.qcom.7x30.video.decoder.avc'
E/OMXCodec( 141): Attempting to allocate OMX node 'OMX.qcom.video.decoder.avc'
E/OMXCodec( 141): Attempting to allocate OMX node 'OMX.TI.Video.Decoder'
E/OMXCodec( 141): Attempting to allocate OMX node 'OMX.SEC.AVC.Decoder'
E/OMXCodec( 141): Successfully allocated OMX node 'OMX.SEC.AVC.Decoder'
I/OMXCodec( 141): [OMX.SEC.AVC.Decoder] AVC profile = 66 (Baseline), level = 31
E/OMXCodec( 141): [OMX.SEC.AVC.Decoder] Video O/P format.eColorFormat 0x40b452b1
I/OMXCodec( 141): [OMX.SEC.AVC.Decoder] video dimensions are 720 x 480
D/OpenGLRenderer( 417): Flushing caches (mode 1)
I/ActivityManager( 201): Displayed com.example.mymediaplayer/.MyVideoView: +323ms
W/InputManagerService( 201): Starting input on non-focused client com.android.internal.view.IInputMethodClient$Stub$Proxy#4106dc38 (uid=10036 pid=20503)
W/IInputConnectionWrapper(20503): showStatusIcon on inactive InputConnection
E/OMXCodec( 141): Attempting to allocate OMX node 'OMX.Nvidia.mp2.decoder'
**E/MediaPlayer(20286): error (1, -2147483648)
E/MediaPlayer(20286): Error (1,-2147483648)
D/VideoView(20286): Error: 1,-2147483648**
D/OpenGLRenderer( 417): Flushing caches (mode 0)
W/InputManagerService( 201): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#41033300
D/AudioHardware( 141): AudioHardware pcm playback is going to standby.
what is error 1,-2147483648
I just had that error too. The reason (in my case) was that the mp3 has the wrong format, i.e.
MPEG ADTS, layer II, v1, 192 kbps, 44.1 kHz, Stereo
while a "good" mp3 has this format:
MPEG ADTS, layer III, v1, 128 kbps, 44.1 kHz, JntStereo

Can't play mp4 video in my Android app

I very want to play mp4 video in my android app. I even wrote a bit of code for it:
String sourceUrl = "http://tvstream.cn.ru/storage/1kanal/20120530/"
+ "1kanal-20120530-01-14-00-20120530-03-16-00.mp4";
final VideoView videoView = (VideoView) findViewById(R.id.videoView);
getWindow().setFormat(PixelFormat.TRANSLUCENT);
final MediaController mediaController = new MediaController(this);
mediaController.setMediaPlayer(videoView);
videoView.setMediaController(mediaController);
videoView.setVideoURI(Uri.parse(sourceUrl));
videoView.setOnPreparedListener(new OnPreparedListener() {
public void onPrepared(MediaPlayer mp) {
videoView.requestFocus();
videoView.start();
mediaController.show();
}
});
But nothing works :( When I launch my app in emulator (Android 2.3.3) I've got weird stacktrace with some common error codes:
After few hours off googling and experiments I decided to try to launch my app on real device and watch logcat:
D/test.tv.activity.PlayerActivity( 3428): Player source: http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 320x430
I/Launcher( 260): onWindowFocusChanged(false)
D/Launcher( 260): setWallpaperDimension() called
D/Launcher( 260): USE_NON_SCROLLABLE_IMAGE_WALLPAPER is true
I/ActivityManager( 163): Start proc org.reactivephone for broadcast org.reactivephone/ru.yandex.common.clid.ClidBroadcastReceiver: pid=3448 uid=10073 gids={1015, 3003}
I/ActivityManager( 163): No longer want com.sec.android.provider.badge (pid 2310): hidden #16
I/MediaPlayer( 3428): uri is:http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4
I/MediaPlayer( 3428): path is null
D/MediaPlayer( 3428): Couldn't open file on client side, trying server side
D/Launcher( 260): It's image wallpaper. suggestDesiredDimensions(-1,-1)
I/ActivityManager( 163): Displayed test.tv/.activity.PlayerActivity: +943ms
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 320x430
W/dalvikvm( 3406): threadid=5: spin on suspend #1 threadid=22 (pcf=0)
W/dalvikvm( 3406): threadid=5: spin on suspend resolved in 1154 msec
W/SearchableInfo( 163): Invalid searchable metadata for org.reactivephone/.ui.RegionForm: Search label must be a resource reference.
I/ActivityManager( 163): Start proc com.google.android.googlequicksearchbox for broadcast com.google.android.googlequicksearchbox/.SourceUpdateReceiver: pid=3457 uid=10027 gids={3003}
I/WindowOrientationListener( 163): orientation 295.6932 gives new rotation = 2
I/OrientationDebug( 163): [pwm] in MyOrientationListener.onOrientationChanged() rotation=3 mFancyRotationAnimation=0 now call mWindowManager.setRotation()
I/OrientationDebug( 163): [wms] in setRotation() rotation=3 alwaysSendConfiguration=false animFlags=0
I/OrientationDebug( 163): [wms] in setRotation() now call setRotationUnchecked()
I/WindowManager( 163): Setting rotation to 3, animFlags=0
I/ActivityManager( 163): Config changed: { scale=1.0 imsi=250/1 loc=ru_RU touch=3 keys=1/1/2 nav=1/1 orien=2 layout=18 uiMode=17 seq=7}
D/PhoneApp( 241): updateProximitySensorMode: lock already released.
I/ActivityThread( 3457): Pub com.google.android.googlequicksearchbox.shortcuts: com.google.android.googlequicksearchbox.WebHistoryProvider
I/ActivityThread( 3457): Pub com.google.android.googlequicksearchbox.google: com.google.android.googlequicksearchbox.google.GoogleSuggestionProvider
I/ActivityManager( 163): No longer want com.sec.android.widgetapp.clockweather.clockwidget (pid 1214): hidden #16
D/Finsky ( 3406): [1] 2.run: Loaded library for account: [Y091GklnFtI4Ab1gmLOw-nJkJXQ]
D/Finsky ( 3406): [1] 2.run: Finished loading 1 libraries.
W/dalvikvm( 3406): VFY: unable to resolve instance field 78
D/DfeApi ( 3406): [1] DfeApiContext.getSmallestScreenWidthDp: smallestScreenWidthDp does not exist, using pre-ics hack.
E/QCvdec ( 95): Setparameter: unknown param 2130706451
W/TimedEventQueue( 95): Event 3 was not found in the queue, already cancelled?
E/QCvdec ( 95): Omx Flush issued when vdec is not initialized yet.
W/QCvdec ( 95): ======================================================================
W/QCvdec ( 95): Open Max Statistics
W/QCvdec ( 95): ======================================================================
W/QCvdec ( 95): empty this buffer rate = NaN
W/QCvdec ( 95): empty this buffer total time = 0
W/QCvdec ( 95): empty this buffer count = 0
W/QCvdec ( 95): ======================================================================
D/test.tv.activity.PlayerActivity( 3428): Player source: http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 480x270
I/MediaPlayer( 3428): uri is:http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4
I/MediaPlayer( 3428): path is null
D/MediaPlayer( 3428): Couldn't open file on client side, trying server side
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 480x270
D/WifiService( 163): [mPersistState] : On
D/BatteryService( 163): update start
D/BatteryService( 163): update start
D/BatteryService( 163): update start
E/QCvdec ( 95): Setparameter: unknown param 2130706451
I/VideoView( 3428): start()
D/WifiService( 163): [mPersistState] : On
D/WifiService( 163): [mPersistState] : On
D/WifiWatchdogService( 163): (android.server.ServerThread) wntk (1c:af:f7:2e:7f:c8) does not require the watchdog
E/QCvdec ( 95): Unsupported profile, level, or widht, height
E/QCvdec ( 95): Unsupported clip
E/QCvdec ( 95): Unsupported profile, level, or widht, height
E/QCvdec ( 95): Unsupported clip
E/QCvdec ( 95): Omx Flush issued when vdec is not initialized yet.
E/QCvdec ( 95): Omx Flush issued when vdec is not initialized yet.
E/QCvdec ( 95): Empty this buffer in Invalid State
E/OMXCodec( 95): [OMX.qcom.video.decoder.avc] ERROR(0x8000100a, 0)
E/OMXCodec( 95): [OMX.qcom.video.decoder.avc] ERROR(0x8000100a, 0)
E/OMXCodec( 95): read : mState[9] is wrong...
E/MediaPlayer( 3428): error (1, -2147483648)
E/OMXCodec( 95): [OMX.qcom.video.decoder.avc] ERROR(0x8000100a, 0)
E/QCvdec ( 95): Omx Flush issued when vdec is not initialized yet.
D/VideoView( 3428): onMeasure()
I/VideoView( 3428): Setting size: 335x270
I/VideoView( 3428): start()
E/MediaPlayer( 3428): start called in state 0
E/MediaPlayer( 3428): error (-38, 0)
E/MediaPlayer( 3428): Error (1,-2147483648)
D/VideoView( 3428): Error: 1,-2147483648
E/MediaPlayer( 3428): Error (-38,0)
D/VideoView( 3428): Error: -38,0
D/PowerManagerService( 163): reactivateScreenLocksLocked mProxIgnoredBecauseScreenTurnedOff=false
I/PowerManagerService( 163): Ulight 1->3|0
W/InputManagerService( 163): Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy#40873ab8
I/PowerManagerService( 163): Light Animator Finished curIntValue=141
D/Finsky ( 3406): [1] 5.onFinished: Installation state replication succeeded.
D/BatteryService( 163): update start
D/BatteryService( 163): update start
D/BatteryService( 163): update start
I try to find something about "OMX.qcom.video.decoder.avc] ERROR(0x8000100a, 0)", but didn't find nothing interesting. About "Couldn't open file on client side, trying server side" problem stackoverflow has many answers, but no one helped.
When I launch this app on ICS (in emulator) I've got similar errors:
06-01 10:22:14.674: I/NuCachedSource2(37): ERROR_END_OF_STREAM
06-01 10:22:15.375: I/OMXCodec(37): [OMX.google.h264.decoder] AVC profile = 100 (High), level = 30
06-01 10:22:15.384: I/OMXCodec(37): [OMX.google.h264.decoder] video dimensions are 320 x 240
06-01 10:22:15.384: I/OMXCodec(37): [OMX.google.h264.decoder] Crop rect is 320 x 240 # (0, 0)
06-01 10:22:16.253: W/NetworkManagementSocketTagger(89): setKernelCountSet(10013, 0) failed with errno -2
06-01 10:22:16.374: I/Launcher(553): setLoadOnResume
06-01 10:22:16.584: D/MediaPlayer(602): getMetadata
06-01 10:22:16.614: I/NuCachedSource2(37): new range: offset= 0
06-01 10:22:16.694: I/ChromiumHTTPDataSource(37): connect to http://tvstream.cn.ru/storage/1kanal/20120530/1kanal-20120530-01-14-00-20120530-03-16-00.mp4 #0
06-01 10:22:16.834: E/SoftAVC(37): Decoder failed: -2
06-01 10:22:16.844: E/OMXCodec(37): [OMX.google.h264.decoder] ERROR(0x80001001, -1007)
06-01 10:22:16.884: D/AudioSink(37): bufferCount (4) is too small and increased to 12
As I know, Android supports playback of video decoded with h264 (http://developer.android.com/guide/appendix/media-formats.html). So, can anyone tell me what I do wrong.
Probably your file is using an unsupported profile, notice that official media formats page only lists Baseline Profile as supported for H.264 AVC.
Try transcoding the video specifying Baseline Profile as suggested in this stackoverflow question, i.e. if your container is MP4 run:
ffmpeg -i yourfile.mp4 -c:v libx264 -profile:v baseline -level 1 yourfile_BaselineProfile.mp4
If this works it's not a issue in your code, you just have to use supported formats.
Try this
File clip=new File(Environment.getExternalStorageDirectory(),
"test.mp4");
if (clip.exists()) {
video=(VideoView)findViewById(R.id.video);
video.setVideoPath(clip.getAbsolutePath());
ctlr=new MediaController(this);
ctlr.setMediaPlayer(video);
video.setMediaController(ctlr);
video.requestFocus();
video.start();
VideoView classes does not allow playing MP4 file format videos. Please go through this link for Android Media Formats. Try checking your video with Daroon Player

Android MediaPlayer warnings when looping a sound

I am getting warning messages in the log file. I continuously play a looping sound during gameplay (and adjust the volume). The log message seems to be produced when the sound is being looped (every 2 secs or so). It is a normal .wav file and it plays as expected.
squishSound = MediaPlayer.create(context, R.raw.juicy);
squishSound.setVolume(0, 0);
squishSound.setLooping(true);
squishSound.start();
This produces a log message every 2 seconds: -
05-16 15:31:23.745:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:26.112:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:28.479:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:30.846:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:33.221:
WARN/MediaPlayer(10356): info/warning
(1, 44)
05-16 15:31:35.589:
WARN/MediaPlayer(10356): info/warning
(1, 44)
I have searched, but I can't find any reason why this would happen.
Any ideas?
This is OK, and probably notifies that the file is replayed.

Categories

Resources