bilibili / ijkplayer Goto Github PK
View Code? Open in Web Editor NEWAndroid/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
License: GNU General Public License v2.0
Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
License: GNU General Public License v2.0
How can I catch this error at android development level ?
These errors occours when I set high frame-rate and high resolution for my grid of videoview.
I want decrease video quality if these errors starts to occur, but I need to catch them.
I set OnErrorListener and OnInfoListener of Videoview, but nobody fire on these errors.
05-13 12:02:32.601: E/IJKMEDIA(2658): top block unavailable for requested intra4x4 mode -1 at 14 0
05-13 12:02:32.601: E/IJKMEDIA(2658): error while decoding MB 14 0
05-13 12:03:30.765: E/IJKMEDIA(2658): corrupted macroblock 13 0 (total_coeff=-1)
05-13 12:03:30.765: E/IJKMEDIA(2658): error while decoding MB 13 0
如题。
mp2 编码的音频无声
我使用ijkplayer做多个文件播放
方式是一开始就初始化两个播放器
先开始播放第一个
第一个播放结束 就开始播放第二个 销毁第一个 创建下一个
这里出现的问题是 在播放第二段的时候 也就是第一段播放完了 接着播放的二段
这个途中却提前收到了MPMovieFinishReasonPlaybackEnded 时间 不知道这是不是bug
还有个就是貌似存在内存泄漏 内存没有完全回收
感谢你的回复,但是在文件夹内并为成功生成so文件。
rm: libavcodec/log2_tab.o: No such file or directory
LiYunlongs-iMac:android Lee$ sh compile-ijk.sh
Android NDK: ERROR:/Users/Lee/android/ijkplayer-android-stable/android/ijkmediaplayer/jni/ffmpeg/Android.mk:ffmpeg: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /Users/Lee/android/ijkplayer-android-stable/android/build/ffmpeg-armv7a/output/libffmpeg.so exists or that its path is correct
/Users/Lee/android/android-ndk-r9d/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
Hi, How can I force MediaPlayer to prepare video only using Tcp ?
Sometimes udp stream does not pass through 3G connections
thanks
Hello again.
---Anroid---
How can I prevent the player runs multiple times simultaneosly?
For example: When I quit the app while streams play, it continues playing. It is ok. But when I launch the app again how can I get the instance of player which is running and stop it. If I don't this, second player starts playing with the old one.
I use mediaplayer and surface view to construct player to play video.
Firstly, playing video is successful and then use mediaplayer API reset() to prepare playing next video.
But the next video can not play. Log shows messages which below:
Error: the video system does not support an image
size of 1280x720 pixels. Try using -lowres or -vf "scale=w:h"
to reduce the image size.
So, I find the way to solve this problem. Release mediaplayer and new another mediaplayer instance.
Is function of ijkplayer API reset just like Android mediaplayer? Or has a another way to manipulate?
Android NDK: ERROR:/Users/bill/ijkplayer-android-master/android/ijkmediaplayer/jni/ffmpeg/Android.mk:ijkffmpeg: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /libijkffmpeg.so exists or that its path is correct
/Users/bill/Desktop/Dev/android-ndk-r9d/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
/Users/bill/ijkplayer-android-master/android
Android NDK: ERROR:/Users/bill/ijkplayer-android-master/android/ijkmediaplayer-armv5/jni/ffmpeg/Android.mk:ijkffmpeg: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /libijkffmpeg.so exists or that its path is correct
/Users/bill/Desktop/Dev/android-ndk-r9d/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
/Users/bill/ijkplayer-android-master/android
Android NDK: ERROR:/Users/bill/ijkplayer-android-master/android/ijkmediaplayer-x86/jni/ffmpeg/Android.mk:ijkffmpeg: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /libijkffmpeg.so exists or that its path is correct
/Users/bill/Desktop/Dev/android-ndk-r9d/build/core/prebuilt-library.mk:45: *** Android NDK: Aborting . Stop.
/Users/bill/ijkplayer-android-master/android
Great lib and am really liking using this as solves a lot of Vitamio issues I was having with playback quality.
One thing I have noticed though is that there is an option in Vitamio for:
mediaPlayer.setAdaptiveStream(true);
which is not available here
Which somehow that I haven't worked out yet makes the ffmpeg hls.c actually switch bitrates on playback.
The standard apple URL for testing this is here: http://devimages.apple.com/iphone/samples/bipbop/bipbopall.m3u8
You will note that it just sits on Gear 1 when it should shift up bitrates. In ffplay command line you can shift up and down by pressing 'v'
Hello,
I want to play some audio background on iOS. Does it support for this function?
If do, how could I set in the project? Thank you .
I have about 6 seconds of delay on live video rtsp streams in local wifi network, using vlc app I have only 1 second of delay using same source.
Is possible to reduce this time ?
I use Android tv.danmaku.ijk.media.widget.VideoView
Please help me
./compile-ffmpeg.sh: 85: [: Linux: unexpected operator
WARNING: The shell running this script isn't bash. Although we try to avoid bashism in scripts, things can happen.
Copying prebuilt binaries...
Copying sysroot headers and libraries...
Copying libstdc++ headers and libraries...
Copying files to: /home/longtq/ijkplayer-android-master/android/build/ffmpeg-armv7a/toolchain
Cleaning up...
Done.
./compile-ffmpeg.sh: 133: ./compile-ffmpeg.sh: source: not found
longtq@longtq:~/ijkplayer-android-master/android$
I am trying to play an ffmpeg encoded H.265/HEVC file but it is not working. It plays in ffplay and I can also get it to play in Vitamio. I think this might be because the master on the https://github.com/bbcallen/FFmpeg.git is quite a long way behind the ffmpeg master.
Any tips on what I should do to update to latest ffmpeg master and test? Sample file is here.
http://bucket01.mscreentv.com.s3.amazonaws.com/hevc/anchorman2_640x360_x265.mp4
I downloaded this and then import it to eclipse by File > Import > General > Existing Projects to Workspace. After that I have three project:
1.ijkmediaplayer ( library )
2.ijkmediawidget ( VideoView-like interface )
3.ijkmediademo ( Demo project )
When I run ijkmediademo, Error happened and program crashed. I got these lines of error:
07-06 14:06:26.913: E/AndroidRuntime(11394): FATAL EXCEPTION: main
07-06 14:06:26.913: E/AndroidRuntime(11394): Process: tv.danmaku.ijk.media.demo, PID: 11394
07-06 14:06:26.913: E/AndroidRuntime(11394): java.lang.UnsatisfiedLinkError: Couldn't load ijkffmpeg from loader dalvik.system.PathClassLoader[dexPath=/data/app/tv.danmaku.ijk.media.demo-8.apk,libraryPath=/data/app-lib/tv.danmaku.ijk.media.demo-8]: findLibrary returned null
07-06 14:06:26.913: E/AndroidRuntime(11394): at java.lang.Runtime.loadLibrary(Runtime.java:358)
07-06 14:06:26.913: E/AndroidRuntime(11394): at java.lang.System.loadLibrary(System.java:526)
07-06 14:06:26.913: E/AndroidRuntime(11394): at tv.danmaku.ijk.media.player.IjkMediaPlayer$1.loadLibrary(IjkMediaPlayer.java:86)
07-06 14:06:26.913: E/AndroidRuntime(11394): at tv.danmaku.ijk.media.player.IjkMediaPlayer.loadLibrariesOnce(IjkMediaPlayer.java:95)
07-06 14:06:26.913: E/AndroidRuntime(11394): at tv.danmaku.ijk.media.player.IjkMediaPlayer.initPlayer(IjkMediaPlayer.java:137)
07-06 14:06:26.913: E/AndroidRuntime(11394): at tv.danmaku.ijk.media.player.IjkMediaPlayer.<init>(IjkMediaPlayer.java:133)
07-06 14:06:26.913: E/AndroidRuntime(11394): at tv.danmaku.ijk.media.player.IjkMediaPlayer.<init>(IjkMediaPlayer.java:125)
07-06 14:06:26.913: E/AndroidRuntime(11394): at tv.danmaku.ijk.media.widget.VideoView.openVideo(VideoView.java:244)
07-06 14:06:26.913: E/AndroidRuntime(11394): at tv.danmaku.ijk.media.widget.VideoView.access$30(VideoView.java:229)
07-06 14:06:26.913: E/AndroidRuntime(11394): at tv.danmaku.ijk.media.widget.VideoView$8.surfaceCreated(VideoView.java:502)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.SurfaceView.updateWindow(SurfaceView.java:602)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.SurfaceView.access$000(SurfaceView.java:94)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.SurfaceView$3.onPreDraw(SurfaceView.java:183)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.ViewTreeObserver.dispatchOnPreDraw(ViewTreeObserver.java:888)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2173)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1246)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:6567)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.Choreographer$CallbackRecord.run(Choreographer.java:803)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.Choreographer.doCallbacks(Choreographer.java:603)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.Choreographer.doFrame(Choreographer.java:573)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:789)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.os.Handler.handleCallback(Handler.java:733)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.os.Handler.dispatchMessage(Handler.java:95)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.os.Looper.loop(Looper.java:136)
07-06 14:06:26.913: E/AndroidRuntime(11394): at android.app.ActivityThread.main(ActivityThread.java:5476)
07-06 14:06:26.913: E/AndroidRuntime(11394): at java.lang.reflect.Method.invokeNative(Native Method)
07-06 14:06:26.913: E/AndroidRuntime(11394): at java.lang.reflect.Method.invoke(Method.java:515)
07-06 14:06:26.913: E/AndroidRuntime(11394): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
07-06 14:06:26.913: E/AndroidRuntime(11394): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
07-06 14:06:26.913: E/AndroidRuntime(11394): at dalvik.system.NativeStart.main(Native Method)
It's seems that program can't find some libraries that sets here in IjkMediaPlayer class:
public static void loadLibrariesOnce(IjkLibLoader libLoader) {
synchronized (IjkMediaPlayer.class) {
if (!mIsLibLoaded) {
libLoader.loadLibrary("stlport_shared");
libLoader.loadLibrary("ijkffmpeg");
libLoader.loadLibrary("ijkutil");
libLoader.loadLibrary("ijkadk");
libLoader.loadLibrary("ijksdl");
libLoader.loadLibrary("ijkplayer");
mIsLibLoaded = true;
}
}
}
what are these libraries?
where are these libraries? ( i could not find them in projects )
How can solve this issue?
Hello,
How I can change the original playback framerate? Do i need to modify the native code or just call a function in the app? Just want to play the high resolution video smoother on low-end devices.
thanks!
你好,播放高清视频和直播会出现一直buffering不能继续播放的问题,能帮忙看下这个问题吗?log里没有报error
I'm testing ijkplayer with an app where I need to play some video one after the other. The videos are about 30 seconds average.
After the 5th or 6th video I keep getting this TOTAL FAILURE:
06-09 16:42:06.342: E/AndroidRuntime(5233): FATAL EXCEPTION: FinalizerWatchdogDaemon
06-09 16:42:06.342: E/AndroidRuntime(5233): java.util.concurrent.TimeoutException: tv.danmaku.ijk.media.player.IjkMediaPlayer.finalize() timed out after 10 seconds
06-09 16:42:06.342: E/AndroidRuntime(5233): at tv.danmaku.ijk.media.player.IjkMediaPlayer.native_finalize(Native Method)
06-09 16:42:06.342: E/AndroidRuntime(5233): at tv.danmaku.ijk.media.player.IjkMediaPlayer.finalize(IjkMediaPlayer.java:405)
06-09 16:42:06.342: E/AndroidRuntime(5233): at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:187)
06-09 16:42:06.342: E/AndroidRuntime(5233): at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:170)
06-09 16:42:06.342: E/AndroidRuntime(5233): at java.lang.Thread.run(Thread.java:856)
The only way I've been able to continue working at the moment is by removing line 405 in IjkMediaPlayer
您好:
希望有人能帮到我。
我按照Build Android去做
./init-android.sh
cd android
./compile-ffmpeg.sh
执行到这里提醒要输入参数
于是我就执行 ./compile-ffmpeg.sh all
输出这个:
(我的环境是uBuntu 14.04 ndkR9c sdk18)
====================
FF_ALL_ARCHS = armv5 armv7a x86
NDKr9c detected
tools/do-compile-ffmpeg.sh: 67: [: armv5: unexpected operator
tools/do-compile-ffmpeg.sh: 84: [: armv5: unexpected operator
tools/do-compile-ffmpeg.sh: 99: [: armv5: unexpected operator
unknown architecture armv5
Hello.
How can I set the buffer size of a stream? Or buffer time?
I am streaming only audio.
Default buffer time is around 5 seconds. How can I decrease this?
Thanks
我试了好几个版本,都有这样的问题,难道是我用的ffmpeg的版本不对吗?
Hello, I test ijkmediademo and found libc error on exit (onBackpressed)
06-26 17:07:51.567: W/IJKMEDIA(14626): FFP_MSG_BUFFERING_START:
06-26 17:07:51.567: I/tv.danmaku.ijk.media.player.IjkMediaPlayer(14626): Info (701,0)
06-26 17:07:51.567: D/tv.danmaku.ijk.media.widget.VideoView(14626): onInfo: (701, 0)
06-26 17:07:51.567: D/tv.danmaku.ijk.media.widget.VideoView(14626): onInfo: (MEDIA_INFO_BUFFERING_START)
06-26 17:07:52.418: D/IJKMEDIA(14626): ffp_toggle_buffering_l: end
06-26 17:07:52.418: W/IJKMEDIA(14626): FFP_MSG_BUFFERING_END:
06-26 17:07:52.418: I/tv.danmaku.ijk.media.player.IjkMediaPlayer(14626): Info (702,0)
06-26 17:07:52.418: D/tv.danmaku.ijk.media.widget.VideoView(14626): onInfo: (702, 0)
06-26 17:07:52.426: D/tv.danmaku.ijk.media.widget.VideoView(14626): onInfo: (MEDIA_INFO_BUFFERING_END)
06-26 17:08:26.856: W/IJKMEDIA(14626): IjkMediaPlayer_reset
06-26 17:08:26.856: W/IJKMEDIA(14626): ijkmp_set_android_surface(surface=0x0)
06-26 17:08:26.856: W/IJKMEDIA(14626): ijkmp_set_android_surface(surface=0x0)=void
06-26 17:08:26.863: W/IJKMEDIA(14626): ijkmp_reset()
06-26 17:08:26.863: W/IJKMEDIA(14626): ijkmp_shutdown_l()
06-26 17:08:26.863: W/IJKMEDIA(14626): wait for read_tid
06-26 17:08:26.863: W/IJKMEDIA(14626): message_loop exit
06-26 17:08:26.988: E/IJKMEDIA(14626): failed to open segment, retry...
06-26 17:08:26.988: D/dalvikvm(14626): threadid=15: thread exiting, not yet detached (count=0)
06-26 17:08:26.996: D/dalvikvm(14626): threadid=13: thread exiting, not yet detached (count=0)
06-26 17:08:26.996: W/IJKMEDIA(14626): wait for video_refresh_tid
06-26 17:08:40.012: I/dalvikvm(14626): threadid=3: reacting to signal 3
06-26 17:08:40.020: A/libc(14626): @@@ ABORTING: heap corruption detected by dlmalloc
06-26 17:08:40.020: A/libc(14626): Fatal signal 11 (SIGSEGV) at 0xdeadbaad (code=1), thread 14631 (Signal Catcher)
How can I get metada of the file I am streaming?
I followed the install process:
"git clone https://github.com/bbcallen/ijkplayer.git ijkplayer-ios-stable
cd ijkplayer-ios-stable
git checkout -B stable n0.1.0
sh init-ios.sh
cd ios
sh compile-ffmpeg.sh all"
But I got some errors when I try to compile theIJKMediaDemo xCode project. I have the following warning and errors:
"ld: warning: directory not found for option '-L/Users/SEB/Documents/ijkplayer-ios-stable/ios/IJKMediaDemo/../../../../../Library/Developer/Xcode/DerivedData/IJKMedia-earrwrzhlmypuheegnwtfewujljd/Build/Products/Debug-iphoneos'
Undefined symbols for architecture armv7:
"OBJC_CLASS$_IJKFFMoviePlayerController", referenced from:
objc-class-ref in IJKMoviePlayerViewController.o
"OBJC_CLASS$_IJKMediaModule", referenced from:
objc-class-ref in IJKAppDelegate.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)"
Whatever the platform (iPhone 4, iPhone 5, iPhone 5S or simulator) I always got these kind of architecture errors.
I have been trying to change the search paths for the past days with no success...
Am I missing something?
Any help will be greatly appreciated
07-17 14:45:39.200: W/IJKMEDIA(22358): IjkMediaPlayer_native_setup
07-17 14:45:39.200: W/IJKMEDIA(22358): IjkMediaPlayer_setVideoSurface
07-17 14:45:39.200: W/IJKMEDIA(22358): ijkmp_set_android_surface(surface=0x36e0001d)
07-17 14:45:39.200: W/IJKMEDIA(22358): ijkmp_set_android_surface(surface=0x36e0001d)=void
07-17 14:45:39.200: W/IJKMEDIA(22358): IjkMediaPlayer_setDataSourceAndHeaders
07-17 14:45:39.200: W/IJKMEDIA(22358): ijkmp_set_data_source(url="/storage/sdcard0/Duopai/1.mp4")
07-17 14:45:39.200: W/IJKMEDIA(22358): ijkmp_set_data_source(url="/storage/sdcard0/1.mp4")=0
07-17 14:45:39.200: W/IJKMEDIA(22358): IjkMediaPlayer_prepareAsync
07-17 14:45:39.200: W/IJKMEDIA(22358): ijkmp_prepare_async()
07-17 14:45:39.200: W/IJKMEDIA(22358): message_loop
07-17 14:45:39.200: W/IJKMEDIA(22358): FFP_MSG_FLUSH:
07-17 14:45:39.215: W/IJKMEDIA(22358): ijkmp_prepare_async()=0
07-17 14:45:39.285: W/IJKMEDIA(22358): ijkmp_get_msg: FFP_MSG_PREPARED
07-17 14:45:39.285: W/IJKMEDIA(22358): FFP_MSG_PREPARED:
07-17 14:45:39.285: E/IJKMEDIA(22358): unknown FFP_MSG_xxx(700)
07-17 14:45:39.285: W/IJKMEDIA(22358): FFP_MSG_VIDEO_SIZE_CHANGED: 480, 480
07-17 14:45:39.285: W/IJKMEDIA(22358): FFP_MSG_SAR_CHANGED: 1, 1
07-17 14:45:39.290: W/IJKMEDIA(22358): FFP_MSG_BUFFERING_START:
when I am play this video,output log message have not "multiple edit list entries, a/v desync might occur, patch welcome",than it is will be down.
执行这条命令的时候报错:
fatal: 不能同时更新路径并切换到分支'stable'。
您是想要检出 'n0.1.0' 但其未能解析为提交么?
这句是不是不用执行?
i don't konwn how to use the ccache method. x264/aac or other
do you have a example?
thanks
I am streaming HLS (playlist.m3u8) file.
When I call the getDuration() method I get wrong values at lower Android Api. I tested at 2.3.7 Galaxy S 2 I9100 device.
It is working correctly on the same device but higher Api like 4.1.2.
Can you help?
Hello,
Thank you for awesome job to do this player. I have question about playing streaming
video which protocol is https. This would cause playing error. Does it has any solution for this function? Thank you!
03-22 21:24:09.154: E/SurfaceFlinger(1365): Layer::requestBuffer(this=0x1024fd8), index=0, pid=7517, w=512, h=288 failed (Invalid argument)
03-22 21:24:09.154: E/Surface(7517): Surface (identity=291) requestBuffer(0, 512, 288, 842094169, 00000033) returned a buffer with a null handle
03-22 21:24:09.154: E/Surface(7517): getBufferLocked(0, 512, 288, 842094169, 00000033) failed (Out of memory)
03-22 21:24:09.154: E/Surface(7517): dequeueBuffer failed (Out of memory)
03-22 21:24:09.234: W/GraphicBufferAllocator(1365): alloc(512, 288, 842094169, 00000133, ...) failed -22 (Invalid argument)
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): Allocated buffers:
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): 0x4d1530: 2059.38 KiB | 800 ( 800) x 659 | 1 | 0x00000133 | 1475
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): 0x578700: 750.00 KiB | 480 ( 480) x 800 | 4 | 0x00000133 | 1365
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): 0x5ccec8: 750.00 KiB | 480 ( 480) x 800 | 4 | 0x00000133 | 1365
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): 0x8f1ce8: 1059.38 KiB | 800 ( 800) x 339 | 1 | 0x00000133 | 1475
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): 0x98fc68: 1500.00 KiB | 800 ( 800) x 480 | 1 | 0x00000133 | 7517
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): 0x9c13e0: 118.75 KiB | 800 ( 800) x 38 | 2 | 0x00000133 | 1475
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): 0x9ddfb8: 1500.00 KiB | 800 ( 800) x 480 | 1 | 0x00000133 | 7517
03-22 21:24:09.234: D/GraphicBufferAllocator(1365): 0xae6ef0: 118.75 KiB | 800 ( 800) x 38 | 2 | 0x00000133 | 1475
#3-22 21:24:09.234: D/GraphicBufferAllocator(1365): Total allocated: 7856.25 KB
像是内存申请失败之类的错误,麻烦帮助看定位一下,谢谢!
测试用的是ijk原生的代码,从播放开始的log如下:
03-22 21:34:40.374: D/ConnectivityService(1365): getMobileDataEnabled returning false
03-22 21:34:40.645: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:41.325: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:42.006: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:42.697: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:43.377: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:43.377: D/ConnectivityService(1365): getMobileDataEnabled returning false
03-22 21:34:43.778: D/lights(1365): set_light_buttons_func: on=6710886 brightness=102
03-22 21:34:43.788: D/lights(1365): set_light_buttons_func: on=16777215 brightness=255
03-22 21:34:43.868: I/RenderThread(1485): RenderThread resumed
03-22 21:34:43.868: I/RenderThread(1485): RenderThread paused, waiting for signal
03-22 21:34:43.878: I/ActivityManager(1365): Starting activity: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=tv.danmaku.ijk.media.demo/.VideoPlayerActivity bnds=[251,211][341,301] } from pid 1485
03-22 21:34:43.928: V/HtcAppUsageStats(1365): (launch app, package): (ijkmediademo, tv.danmaku.ijk.media.demo)
03-22 21:34:43.938: I/POST_RESELECT: [spanChange](o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$START@401050e8,-1,0,-1,0)
03-22 21:34:43.948: I/POST_RESELECT: [spanChange](o, oldStart, newStart, oldEnd, newEnd)=(android.text.Selection$END@4011d768,-1,0,-1,0)
03-22 21:34:43.948: I/SurfaceFlinger(1365): SurfaceFlinger::setOrientation
03-22 21:34:43.948: I/WindowManager(1365): Setting rotation to 1, animFlags=1
03-22 21:34:43.948: D/PowerManagerService(1365): button light setOrientation:1
03-22 21:34:43.968: I/ActivityManager(1365): Config changed: { scale=1.0 imsi=460/2 loc=zh_CN touch=3 keys=1/1/2 nav=1/1 orien=2 layout=34 uiMode=17 seq=66 skin=default}
03-22 21:34:44.148: D/dalvikvm(1492): GC_EXTERNAL_ALLOC freed 189K, 50% free 3404K/6727K, external 1656K/1954K, paused 29ms
03-22 21:34:44.178: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:44.308: I/ActivityManager(1365): Displayed tv.danmaku.ijk.media.demo/.VideoPlayerActivity: +364ms
03-22 21:34:44.408: D/szipinf(2604): Initializing inflate state
03-22 21:34:44.418: W/IInputConnectionWrapper(1485): showStatusIcon on inactive InputConnection
03-22 21:34:44.418: W/IInputConnectionWrapper(1485): InputConnection = android.view.inputmethod.BaseInputConnection@406112f0, active client = false
03-22 21:34:44.418: W/InputManagerService(1365): [unbindCurrentClientLocked] Disable input method client.
03-22 21:34:44.418: W/InputManagerService(1365): [startInputLocked] Enable input method client.
03-22 21:34:44.428: D/SurfaceFlinger(1365): layer=0x1024fd8 is not in the purgatory list
03-22 21:34:44.869: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:45.029: D/dalvikvm(1492): GC_EXPLICIT freed 38K, 50% free 3393K/6727K, external 1592K/2281K, paused 63ms
03-22 21:34:45.179: D/StatusBarPolicy(1475): onSignalStrengthsChanged
03-22 21:34:45.549: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:46.240: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:46.380: D/ConnectivityService(1365): getMobileDataEnabled returning false
03-22 21:34:46.560: D/dalvikvm(1365): GC_EXPLICIT freed 1319K, 39% free 8558K/14023K, external 2940K/3117K, paused 145ms
03-22 21:34:46.931: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:47.621: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:48.302: W/AudioTrack(7517): obtainBuffer() track 0x3a53a0 disabled, restarting
03-22 21:34:48.362: D/tv.danmaku.ijk.media.widget.VideoView(7517): onPrepared
03-22 21:34:48.362: D/tv.danmaku.ijk.media.widget.VideoView(7517): onVideoSizeChanged: (512x288)
03-22 21:34:48.362: D/tv.danmaku.ijk.media.widget.VideoView(7517): VIDEO: 512x288x1.777778[SAR:0:0], Surface: 512x288, LP: 800x480, Window: 800x480x1.666667
03-22 21:34:48.372: I/AudioPolicyManagerBase(1251): setOutputDevice() output 1 device 2 delayMs 0
03-22 21:34:48.372: I/AudioPolicyManagerBase(1251): setOutputDevice() setting same device 2 or null device for output 1
03-22 21:34:48.382: D/tv.danmaku.ijk.media.widget.VideoView(7517): onVideoSizeChanged: (1x1)
03-22 21:34:48.392: D/tv.danmaku.ijk.media.widget.VideoView(7517): VIDEO: 512x288x1.777778[SAR:1:1], Surface: 512x288, LP: 800x480, Window: 800x480x1.666667
03-22 21:34:48.392: I/tv.danmaku.ijk.media.player.IjkMediaPlayer(7517): Info (701,0)
03-22 21:34:48.402: D/tv.danmaku.ijk.media.widget.VideoView(7517): onInfo: (701, 0)
03-22 21:34:48.402: D/tv.danmaku.ijk.media.widget.VideoView(7517): onInfo: (MEDIA_INFO_BUFFERING_START)
03-22 21:34:48.402: I/tv.danmaku.ijk.media.player.IjkMediaPlayer(7517): Info (702,0)
03-22 21:34:48.402: D/AudioHardwareMSM7X30(1251): acquire output wakelock
03-22 21:34:48.412: I/AudioHardwareMSM7X30(1251): do_aic3254_control (1, 0, 0)
03-22 21:34:48.412: I/AudioHardwareMSM7X30(1251): aic3254: change rx mode to 13
03-22 21:34:48.412: D/AudioHardwareMSM7X30(1251): addToTable (dec_id 5, dev_rx 6, dev_tx -1, type 1, active 1)
03-22 21:34:48.412: D/tv.danmaku.ijk.media.widget.VideoView(7517): onInfo: (702, 0)
03-22 21:34:48.412: D/tv.danmaku.ijk.media.widget.VideoView(7517): onInfo: (MEDIA_INFO_BUFFERING_END)
03-22 21:34:48.422: I/HTC Acoustic(1251): update ACDB id: (tx, rx, tx_acdb, rx_acdb) = (11, 6, 0, 607)
03-22 21:34:48.432: D/AudioHardwareMSM7X30(1251): updateACDB: (6, 11, 607, 0) success!
03-22 21:34:48.432: I/AudioHardwareMSM7X30(1251): AUDIO_START: start kernel pcm_out driver.
03-22 21:34:48.522: D/tv.danmaku.ijk.media.widget.VideoView(7517): onVideoSizeChanged: (512x288)
03-22 21:34:48.522: D/tv.danmaku.ijk.media.widget.VideoView(7517): VIDEO: 512x288x1.777778[SAR:1:1], Surface: 512x288, LP: 800x480, Window: 800x480x1.666667
03-22 21:34:48.522: W/GraphicBufferAllocator(1365): alloc(512, 288, 842094169, 00000133, ...) failed -22 (Invalid argument)
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): Allocated buffers:
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): 0x489ce8: 71.25 KiB | 480 ( 480) x 38 | 2 | 0x00000133 | 1475
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): 0x4d53a0: 750.00 KiB | 480 ( 480) x 800 | 4 | 0x00000133 | 1365
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): 0x4f50c0: 2059.38 KiB | 800 ( 800) x 659 | 1 | 0x00000133 | 1475
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): 0x884280: 118.75 KiB | 800 ( 800) x 38 | 2 | 0x00000133 | 1475
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): 0x8f1298: 750.00 KiB | 800 ( 800) x 480 | 4 | 0x00000133 | 1365
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): 0x9ddfb8: 346.88 KiB | 800 ( 800) x 111 | 1 | 0x00000133 | 7517
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): 0x9dfbb8: 1059.38 KiB | 800 ( 800) x 339 | 1 | 0x00000133 | 1475
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): 0xa08da0: 1500.00 KiB | 800 ( 800) x 480 | 1 | 0x00000133 | 7517
03-22 21:34:48.532: D/GraphicBufferAllocator(1365): Total allocated: 6655.62 KB
03-22 21:34:48.532: E/SurfaceFlinger(1365): Layer::requestBuffer(this=0xa99ef0), index=0, pid=7517, w=512, h=288 failed (Invalid argument)
03-22 21:34:48.532: E/Surface(7517): Surface (identity=297) requestBuffer(0, 512, 288, 842094169, 00000033) returned a buffer with a null handle
03-22 21:34:48.532: E/Surface(7517): getBufferLocked(0, 512, 288, 842094169, 00000033) failed (Out of memory)
03-22 21:34:48.532: E/Surface(7517): dequeueBuffer failed (Out of memory)
03-22 21:34:48.532: D/tv.danmaku.ijk.media.widget.VideoView(7517): onVideoSizeChanged: (512x288)
03-22 21:34:48.532: D/tv.danmaku.ijk.media.widget.VideoView(7517): VIDEO: 512x288x1.777778[SAR:1:1], Surface: 512x288, LP: 800x480, Window: 800x480x1.666667
03-22 21:34:48.562: D/tv.danmaku.ijk.media.widget.VideoView(7517): onVideoSizeChanged: (512x288)
03-22 21:34:48.562: D/tv.danmaku.ijk.media.widget.VideoView(7517): VIDEO: 512x288x1.777778[SAR:1:1], Surface: 512x288, LP: 800x480, Window: 800x480x1.666667
03-22 21:34:48.592: W/GraphicBufferAllocator(1365): alloc(512, 288, 842094169, 00000133, ...) failed -22 (Invalid argument)
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): Allocated buffers:
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): 0x489ce8: 71.25 KiB | 480 ( 480) x 38 | 2 | 0x00000133 | 1475
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): 0x4d53a0: 750.00 KiB | 480 ( 480) x 800 | 4 | 0x00000133 | 1365
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): 0x4f50c0: 2059.38 KiB | 800 ( 800) x 659 | 1 | 0x00000133 | 1475
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): 0x884280: 118.75 KiB | 800 ( 800) x 38 | 2 | 0x00000133 | 1475
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): 0x8f1298: 750.00 KiB | 800 ( 800) x 480 | 4 | 0x00000133 | 1365
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): 0x9ddfb8: 346.88 KiB | 800 ( 800) x 111 | 1 | 0x00000133 | 7517
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): 0x9dfbb8: 1059.38 KiB | 800 ( 800) x 339 | 1 | 0x00000133 | 1475
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): 0xa08da0: 1500.00 KiB | 800 ( 800) x 480 | 1 | 0x00000133 | 7517
03-22 21:34:48.592: D/GraphicBufferAllocator(1365): Total allocated: 6655.62 KB
03-22 21:34:48.592: E/SurfaceFlinger(1365): Layer::requestBuffer(this=0xa99ef0), index=0, pid=7517, w=512, h=288 failed (Invalid argument)
03-22 21:34:48.592: E/Surface(7517): Surface (identity=297) requestBuffer(0, 512, 288, 842094169, 00000033) returned a buffer with a null handle
03-22 21:34:48.592: E/Surface(7517): getBufferLocked(0, 512, 288, 842094169, 00000033) failed (Out of memory)
03-22 21:34:48.592: E/Surface(7517): dequeueBuffer failed (Out of memory)
03-22 21:34:48.663: W/GraphicBufferAllocator(1365): alloc(512, 288, 842094169, 00000133, ...) failed -22 (Invalid argument)
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): Allocated buffers:
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): 0x489ce8: 71.25 KiB | 480 ( 480) x 38 | 2 | 0x00000133 | 1475
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): 0x4d53a0: 750.00 KiB | 480 ( 480) x 800 | 4 | 0x00000133 | 1365
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): 0x4f50c0: 2059.38 KiB | 800 ( 800) x 659 | 1 | 0x00000133 | 1475
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): 0x884280: 118.75 KiB | 800 ( 800) x 38 | 2 | 0x00000133 | 1475
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): 0x8f1298: 750.00 KiB | 800 ( 800) x 480 | 4 | 0x00000133 | 1365
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): 0x9ddfb8: 346.88 KiB | 800 ( 800) x 111 | 1 | 0x00000133 | 7517
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): 0x9dfbb8: 1059.38 KiB | 800 ( 800) x 339 | 1 | 0x00000133 | 1475
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): 0xa08da0: 1500.00 KiB | 800 ( 800) x 480 | 1 | 0x00000133 | 7517
03-22 21:34:48.663: D/GraphicBufferAllocator(1365): Total allocated: 6655.62 KB
03-22 21:34:48.663: E/SurfaceFlinger(1365): Layer::requestBuffer(this=0xa99ef0), index=0, pid=7517, w=512, h=288 failed (Invalid argument)
03-22 21:34:48.663: E/Surface(7517): Surface (identity=297) requestBuffer(0, 512, 288, 842094169, 00000033) returned a buffer with a null handle
03-22 21:34:48.663: E/Surface(7517): getBufferLocked(0, 512, 288, 842094169, 00000033) failed (Out of memory)
03-22 21:34:48.663: E/Surface(7517): dequeueBuffer failed (Out of memory)
03-22 21:34:48.723: W/GraphicBufferAllocator(1365): alloc(512, 288, 842094169, 00000133, ...) failed -22 (Invalid argument)
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): Allocated buffers:
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): 0x489ce8: 71.25 KiB | 480 ( 480) x 38 | 2 | 0x00000133 | 1475
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): 0x4d53a0: 750.00 KiB | 480 ( 480) x 800 | 4 | 0x00000133 | 1365
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): 0x4f50c0: 2059.38 KiB | 800 ( 800) x 659 | 1 | 0x00000133 | 1475
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): 0x884280: 118.75 KiB | 800 ( 800) x 38 | 2 | 0x00000133 | 1475
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): 0x8f1298: 750.00 KiB | 800 ( 800) x 480 | 4 | 0x00000133 | 1365
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): 0x9ddfb8: 346.88 KiB | 800 ( 800) x 111 | 1 | 0x00000133 | 7517
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): 0x9dfbb8: 1059.38 KiB | 800 ( 800) x 339 | 1 | 0x00000133 | 1475
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): 0xa08da0: 1500.00 KiB | 800 ( 800) x 480 | 1 | 0x00000133 | 7517
03-22 21:34:48.733: D/GraphicBufferAllocator(1365): Total allocated: 6655.62 KB
bitrate
resolution
video encode & audio encode
从0.1.1之后的版本,原生的ijkplayer出现首次启动正常,关闭再次启动出现黑屏卡死anr的问题,很奇怪,后台也没抓到log,只是pull出anr的traces.txt,
----- pid 2940 at 2014-06-23 11:04:45 -----
Cmd line: tv.danmaku.ijk.media.demo
DALVIK THREADS:
(mutexes: tll=0 tsl=0 tscl=0 ghl=0 hwl=0 hwll=0)
"main" prio=5 tid=1 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x40027550 self=0xcfc0
| sysTid=2940 nice=0 sched=0/0 cgrp=bg_non_interactive handle=-1345006240
| schedstat=( 218383782 741882328 539 )
at tv.danmaku.ijk.media.player.IjkMediaPlayer._reset(Native Method)
at tv.danmaku.ijk.media.player.IjkMediaPlayer.reset(IjkMediaPlayer.java:353)
at tv.danmaku.ijk.media.widget.VideoView.release(VideoView.java:516)
at tv.danmaku.ijk.media.widget.VideoView.access$31(VideoView.java:514)
at tv.danmaku.ijk.media.widget.VideoView$8.surfaceDestroyed(VideoView.java:510)
at android.view.SurfaceView.reportSurfaceDestroyed(SurfaceView.java:600)
at android.view.SurfaceView.updateWindow(SurfaceView.java:486)
at android.view.SurfaceView.onWindowVisibilityChanged(SurfaceView.java:213)
at android.view.View.dispatchWindowVisibilityChanged(View.java:4074)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:738)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:738)
at android.view.ViewGroup.dispatchWindowVisibilityChanged(ViewGroup.java:738)
at android.view.ViewRoot.performTraversals(ViewRoot.java:814)
at android.view.ViewRoot.handleMessage(ViewRoot.java:1939)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:143)
at android.app.ActivityThread.main(ActivityThread.java:4196)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
"AudioTrackThread" prio=10 tid=12 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4052f9c0 self=0x3c60c0
| sysTid=2953 nice=-16 sched=0/0 cgrp=bg_non_interactive handle=4009440
| schedstat=( 625091550 1243041976 10123 )
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #2" prio=5 tid=8 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4051be48 self=0x2cc780
| sysTid=2947 nice=0 sched=0/0 cgrp=bg_non_interactive handle=2164192
| schedstat=( 5493165 115173338 30 )
at dalvik.system.NativeStart.run(Native Method)
"Binder Thread #1" prio=5 tid=7 NATIVE
| group="main" sCount=1 dsCount=0 obj=0x4051a5b8 self=0x182bd0
| sysTid=2946 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1195176
| schedstat=( 4852294 290588377 30 )
at dalvik.system.NativeStart.run(Native Method)
"Compiler" daemon prio=5 tid=6 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40517a30 self=0x182a98
| sysTid=2945 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1198456
| schedstat=( 16693113 45532229 160 )
at dalvik.system.NativeStart.run(Native Method)
"JDWP" daemon prio=5 tid=5 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40517980 self=0x2cbca0
| sysTid=2944 nice=0 sched=0/0 cgrp=bg_non_interactive handle=2162424
| schedstat=( 2105712 976562 19 )
at dalvik.system.NativeStart.run(Native Method)
"Signal Catcher" daemon prio=5 tid=4 RUNNABLE
| group="system" sCount=0 dsCount=0 obj=0x405178c0 self=0x1247b8
| sysTid=2943 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1580424
| schedstat=( 1647949 701905 6 )
at dalvik.system.NativeStart.run(Native Method)
"GC" daemon prio=5 tid=3 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40517818 self=0x20fd08
| sysTid=2942 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1585304
| schedstat=( 335694 3265382 3 )
at dalvik.system.NativeStart.run(Native Method)
"HeapWorker" daemon prio=5 tid=2 VMWAIT
| group="system" sCount=1 dsCount=0 obj=0x40517760 self=0x210958
| sysTid=2941 nice=0 sched=0/0 cgrp=bg_non_interactive handle=1585240
| schedstat=( 28411865 3631592 18 )
at dalvik.system.NativeStart.run(Native Method)
----- end 2940 -----
The error is 'You need the NDKr9 or later', but my ndk version is r9c.
And I have used the version r9d, the same error occurred.
What do I lack? Thanks!
Hello.
I am using IjkPlayer for audio streaming and I want to be able to stream in the background. I have found all the methods which paused the stream when app goes to background but the app still pauses streaming when I locked the device.
The interesting thing is the app only pauses when the device's light is off. When I turn the light on but keep locked the devices, the app continues streaming. When I turn the light of by pressing power button it pauses streaming again. (I think it is called "Sleep Mode")
Can you help? Thanks.
05-05 14:59:28.356: E/IJKMEDIA(3449): sdl_native_window_display_l: ANativeWindow_lock: failed -1
05-05 14:59:28.395: E/Surface(3449): Surface (identity=43) requestBuffer(0, 320, 240, 2, 00000033) returned a buffer with a null handle
05-05 14:59:28.395: E/Surface(3449): getBufferLocked(0, 320, 240, 2, 00000033) failed (Out of memory)
05-05 14:59:28.395: E/Surface(3449): dequeueBuffer failed (Out of memory)
05-05 14:59:28.395: E/IJKMEDIA(3449): sdl_native_window_display_l: ANativeWindow_lock: failed -1
05-05 14:59:28.434: E/Surface(3449): Surface (identity=43) requestBuffer(0, 320, 240, 2, 00000033) returned a buffer with a null handle
05-05 14:59:28.434: E/Surface(3449): getBufferLocked(0, 320, 240, 2, 00000033) failed (Out of memory)
05-05 14:59:28.434: E/Surface(3449): dequeueBuffer failed (Out of memory)
05-05 14:59:28.434: E/IJKMEDIA(3449): sdl_native_window_display_l: ANativeWindow_lock: failed -1
05-05 14:59:28.481: E/Surface(3449): Surface (identity=43) requestBuffer(0, 320, 240, 2, 00000033) returned a buffer with a null handle
05-05 14:59:28.481: E/Surface(3449): getBufferLocked(0, 320, 240, 2, 00000033) failed (Out of memory)
05-05 14:59:28.481: E/Surface(3449): dequeueBuffer failed (Out of memory)
05-05 14:59:28.481: E/IJKMEDIA(3449): sdl_native_window_display_l: ANativeWindow_lock: failed -1
Hello. I am trying to get mediaplayer situations when it is paused or stoped. But I can't receive correct notification.
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(stateDidChange:) name:IJKMoviePlayerPlaybackStateDidChangeNotification object:self.player];
But the state is always "MPMoviePlaybackStatePaused".
Please help.
vlc‘s way is enough :)
[armeabi-v7a] Install : libijkadk.so => libs/armeabi-v7a/libijkadk.so
[armeabi-v7a] Install : libijkffmpeg.so => libs/armeabi-v7a/libijkffmpeg.so
[armeabi-v7a] Compile thumb : ijkplayer <= ijkplayer_jni.c
ijkplayer_jni.c: In function '_onNativeControlResolveSegmentConcat':
ijkplayer_jni.c:385:5: error: unknown type name 'IJKFormatSegmentConcatContext'
IJKFormatSegmentConcatContext _fsc_concat = (IJKFormatSegmentConcatContext *)data;
^
ijkplayer_jni.c:385:50: error: 'IJKFormatSegmentConcatContext' undeclared (first use in this function)
IJKFormatSegmentConcatContext *fsc_concat = (IJKFormatSegmentConcatContext *)data;
^
ijkplayer_jni.c:385:50: note: each undeclared identifier is reported only once for each function it appears in
ijkplayer_jni.c:385:81: error: expected expression before ')' token
IJKFormatSegmentConcatContext *fsc_concat = (IJKFormatSegmentConcatContext *)data;
^
ijkplayer_jni.c:391:15: error: request for member 'count' in something not a structure or union
fsc_concat->count = count;
^
ijkplayer_jni.c: In function '_onNativeControlResolveSegment':
ijkplayer_jni.c:419:8: error: 'IJKFormatSegmentContext' has no member named 'duration'
fsc->duration = duration;
^
ijkplayer_jni.c:420:8: error: 'IJKFormatSegmentContext' has no member named 'duration'
fsc->duration *= 1000;
^
ijkplayer_jni.c: In function 'onNativeControlResolveSegmentOffline':
ijkplayer_jni.c:448:8: error: 'IJKFormatSegmentContext' has no member named 'duration'
fsc->duration = duration;
^
ijkplayer_jni.c:449:8: error: 'IJKFormatSegmentContext' has no member named 'duration'
fsc->duration *= 1000;
^
ijkplayer_jni.c: In function 'format_control_message':
ijkplayer_jni.c:466:14: error: 'IJKAVF_CM_RESOLVE_SEGMENT_CONCAT' undeclared (first use in this function)
case IJKAVF_CM_RESOLVE_SEGMENT_CONCAT:
^
ijkplayer_jni.c:470:14: error: 'IJKAVF_CM_RESOLVE_SEGMENT_OFFLINE' undeclared (first use in this function)
case IJKAVF_CM_RESOLVE_SEGMENT_OFFLINE:
^
make: ** [ijkplayer_jni.o] Error 1
$ ./compile-ijk.sh
Android NDK: ERROR:/cygdrive/d/ijkplayer-n0.1.3/android/ijkmediaplayer/jni/ffmpeg/Android.mk:ijkffmpeg: LOCAL_SRC_FILES points to a missing file
Android NDK: Check that /libijkffmpeg.so exists or that its path is correct
what's the mean?
这个是什么意思?
05-27 15:33:28.382: D/libEGL(32074): loaded /vendor/lib/egl/libEGL_mtk.so
05-27 15:33:28.386: D/libEGL(32074): loaded /vendor/lib/egl/libGLESv1_CM_mtk.so
05-27 15:33:28.389: D/libEGL(32074): loaded /vendor/lib/egl/libGLESv2_mtk.so
05-27 15:33:28.392: I/IJKMEDIA(32074): max_frame_duration: 3600.000
05-27 15:33:28.392: I/IJKMEDIA(32074): Input #0, mov,mp4,m4a,3gp,3g2,mj2, from '/sdcard/1.mp4':
05-27 15:33:28.392: I/IJKMEDIA(32074): Metadata:
05-27 15:33:28.392: I/IJKMEDIA(32074): major_brand :
05-27 15:33:28.392: I/IJKMEDIA(32074): isom
05-27 15:33:28.392: I/IJKMEDIA(32074): minor_version :
05-27 15:33:28.392: I/IJKMEDIA(32074): 512
05-27 15:33:28.392: I/IJKMEDIA(32074): compatible_brands:
05-27 15:33:28.392: I/IJKMEDIA(32074): isomiso2avc1mp41
05-27 15:33:28.392: I/IJKMEDIA(32074): encoder :
05-27 15:33:28.392: I/IJKMEDIA(32074): Lavf54.29.104
05-27 15:33:28.392: I/IJKMEDIA(32074): Duration:
05-27 15:33:28.392: I/IJKMEDIA(32074): 00:01:02.76
05-27 15:33:28.392: I/IJKMEDIA(32074): , start:
05-27 15:33:28.392: I/IJKMEDIA(32074): 0.000000
05-27 15:33:28.392: I/IJKMEDIA(32074): , bitrate:
05-27 15:33:28.392: I/IJKMEDIA(32074): 246 kb/s
05-27 15:33:28.392: I/IJKMEDIA(32074): Stream #0:0
05-27 15:33:28.392: I/IJKMEDIA(32074): (eng)
05-27 15:33:28.392: I/IJKMEDIA(32074): : Video: h264 (High) (avc1 / 0x31637661), yuv420p, 1024x512 [SAR 1:1 DAR 2:1], 210 kb/s
05-27 15:33:28.392: I/IJKMEDIA(32074): , 25 fps
05-27 15:33:28.392: I/IJKMEDIA(32074): , 25 tbr
05-27 15:33:28.392: I/IJKMEDIA(32074): , 25 tbn
05-27 15:33:28.392: I/IJKMEDIA(32074): , 50 tbc
05-27 15:33:28.392: I/IJKMEDIA(32074): (default)
05-27 15:33:28.392: I/IJKMEDIA(32074): Metadata:
05-27 15:33:28.392: I/IJKMEDIA(32074): handler_name :
05-27 15:33:28.392: I/IJKMEDIA(32074): VideoHandler
05-27 15:33:28.392: I/IJKMEDIA(32074): Stream #0:1
05-27 15:33:28.392: I/IJKMEDIA(32074): (eng)
05-27 15:33:28.392: I/IJKMEDIA(32074): : Audio: aac (mp4a / 0x6134706D), 48000 Hz, mono, fltp, 29 kb/s
05-27 15:33:28.392: I/IJKMEDIA(32074): (default)
05-27 15:33:28.392: I/IJKMEDIA(32074): Metadata:
05-27 15:33:28.392: I/IJKMEDIA(32074): handler_name :
05-27 15:33:28.392: I/IJKMEDIA(32074): SoundHandler
05-27 15:33:28.400: D/dalvikvm(32074): threadid=14: interp stack at 0x5e78b000
05-27 15:33:28.401: I/IJKMEDIA(32074): SDL_AndroidAudioTrack: CHANNEL_OUT_MONO
05-27 15:33:28.401: I/IJKMEDIA(32074): SDL_AndroidAudioTrack: ENCODING_PCM_16BIT
05-27 15:33:28.405: D/AudioTrack(32074): audiotrack 0x5ca15380 set Type 3, rate 48000, fmt 1, chn 1, fcnt 4458, flag 0
05-27 15:33:28.406: D/dalvikvm(32074): threadid=15: interp stack at 0x5e949000
05-27 15:33:28.406: D/AudioTrack(32074): pid [32074] sched_setscheduler to default: 1
05-27 15:33:28.407: I/IJKMEDIA(32074): sdl_audiotrack_new: init volume as 1.000000/(0.000000,1.000000)
05-27 15:33:28.407: I/IJKMEDIA(32074): SDL_RunThread: [32095] ff_aout_android
05-27 15:33:28.407: D/dalvikvm(32074): threadid=16: interp stack at 0x5eecd000
05-27 15:33:28.407: D/AudioTrack(32074): start 0x5ca15380
05-27 15:33:28.408: D/IJKMEDIA(32074): ffp_toggle_buffering_l: start
05-27 15:33:28.408: W/IJKMEDIA(32074): FFP_MSG_BUFFERING_START:
05-27 15:33:28.419: I/IJKMEDIA(32074): fps: 25.000000 (normal)
05-27 15:33:28.419: I/IJKMEDIA(32074): SDL_RunThread: [32101] ff_video
05-27 15:33:28.419: I/IJKMEDIA(32074): fps: 25.000000 (normal)
05-27 15:33:28.419: W/IJKMEDIA(32074): ijkmp_get_msg: FFP_MSG_PREPARED
05-27 15:33:28.419: W/IJKMEDIA(32074): FFP_MSG_PREPARED:
05-27 15:33:28.419: D/IJKMEDIA(32074): ffp_toggle_buffering_l: end
05-27 15:33:28.423: W/IJKMEDIA(32074): FFP_MSG_VIDEO_SIZE_CHANGED: 1024, 512
05-27 15:33:28.423: W/IJKMEDIA(32074): FFP_MSG_SAR_CHANGED: 1, 1
05-27 15:33:28.423: E/IJKMEDIA(32074): unknown FFP_MSG_xxx(700)
05-27 15:33:28.423: W/IJKMEDIA(32074): FFP_MSG_BUFFERING_END:
05-27 15:33:28.425: D/OpenGLRenderer(32074): Enabling debug mode 0
05-27 15:33:28.427: I/SurfaceView(32074): Changes: creating=true format=true size=true visible=true left=true top=true mUpdateWindowNeeded=false mReportDrawNeeded=false redrawNeeded=false forceSizeChanged=true mVisible=false mRequestedVisible=true
05-27 15:33:28.433: I/SurfaceView(32074): Cur surface: Surface(name=null, identity=-1)
05-27 15:33:28.441: V/SurfaceView(32074): com.gemtek.superplayer.view.surface.BallSurfaceView{418d64e8 VFE..... .F....ID 0,0-720,1280 #7f070005 app:id/surface} got resized: w=720 h=1280, cur w=-1 h=-1
05-27 15:33:28.443: I/SurfaceView(32074): New surface: Surface(name=null, identity=982), vis=true, frame=Rect(0, 0 - 720, 1280)
05-27 15:33:28.444: I/SurfaceView(32074): visibleChanged -- surfaceCreated
05-27 15:33:28.444: I/SurfaceView(32074): surfaceChanged -- format=4 w=720 h=1280
05-27 15:33:28.444: I/SurfaceView(32074): surfaceRedrawNeeded
05-27 15:33:28.444: I/SurfaceView(32074): finishedDrawing
05-27 15:33:28.450: V/SurfaceView(32074): Layout: x=0 y=0 w=720 h=1280, frame=Rect(0, 0 - 720, 1280)
05-27 15:33:28.457: I/SurfaceView(32074): Changes: creating=false format=false size=false visible=false left=false top=false mUpdateWindowNeeded=true mReportDrawNeeded=true redrawNeeded=false forceSizeChanged=false mVisible=true mRequestedVisible=true
05-27 15:33:28.457: I/SurfaceView(32074): Cur surface: Surface(name=null, identity=982)
05-27 15:33:28.467: I/SurfaceView(32074): New surface: Surface(name=null, identity=982), vis=true, frame=Rect(0, 0 - 720, 1280)
05-27 15:33:28.468: I/SurfaceView(32074): surfaceRedrawNeeded
05-27 15:33:28.468: I/SurfaceView(32074): finishedDrawing
05-27 15:33:28.475: V/SurfaceView(32074): Layout: x=0 y=0 w=720 h=1280, frame=Rect(0, 0 - 720, 1280)
05-27 15:33:28.508: W/IJKMEDIA(32074): FFP_MSG_VIDEO_SIZE_CHANGED: 1024, 512
05-27 15:33:28.508: W/IJKMEDIA(32074): SDL_VoutFFmpeg_CreateOverlay(w=1024, h=512, fmt=RV32(0x32335652, dp=0x5ca24088)
05-27 15:33:28.508: E/IJKMEDIA(32074): OOM in opaque_obtain_managed_frame_buffer
05-27 15:33:28.509: E/IJKMEDIA(32074): Cannot initialize the conversion context
05-27 15:33:28.540: I/IspDrv(32074): {IspDrv} [~IspDrvImp]
如题
你好,我在中兴v6700/2.3.6播放直播有音视频不同步现象,在华为C8812E/4.0.1手机上播放高清码流也有音视频不同步现象
Hi. I've tried play this video. https://www.youtube.com/watch?v=Q_Knr7WNf0w&feature=kp
Video works. Audio doesn't work((( I've got this exception "No codec could be found with id 73728"
How I can fix it? Can I use another codec?
And another question. Can the player to play in background?
After I entered this command "sh compile-ffmpeg.sh" along with long processes,
I got this message
"rm: libavcodec/log2_tab.o: No such file or directory"
So, I tried to build again after deleting these lines in the "compile-ffmpeg.sh" file
rm libavcodec/log2_tab.o
rm libswresample/log2_tab.o
I got this message
libavcodec/aacps.c:242: error: undefined reference to 'ff_log2_tab'
libavformat/matroskadec.c:715: error: undefined reference to 'ff_log2_tab'
libavformat/rtsp.c:1581: error: undefined reference to 'ff_log2_tab'
collect2: error: ld returned 1 exit status
I wonder what is the problem..
Please help me. Thank you.
Hello,
I noticed that IjkPlayer does not implement .setVolume() like the native android mediaPlayer.
Is there another way to do that that I'm missing or should I add it to the C implementation and call the method from java?
Thanks.
执行compile-ijk.sh脚本报CLOCK_MONOTONIC_HR未定义错误,是否需要安装其它库。我把CLOCK_MONOTONIC_HR改为5可以正确执行。
iMac:android Lee$ sh compile-ijk.sh
[armeabi-v7a] Prebuilt : libffmpeg.so <= /Users/Lee/Test/ijkplayer-android-master/android/build/ffmpeg-armv7a/output/
[armeabi-v7a] Install : libffmpeg.so => libs/armeabi-v7a/libffmpeg.so
[armeabi-v7a] Compile thumb : ijkplayer <= ff_cmdutils.c
[armeabi-v7a] Compile thumb : ijkplayer <= ff_ffplay.c
[armeabi-v7a] Compile thumb : ijkplayer <= ijkplayer.c
[armeabi-v7a] Compile thumb : ijkplayer <= ijkplayer_android.c
[armeabi-v7a] Compile thumb : ijkplayer <= ijkplayer_jni.c
[armeabi-v7a] Prebuilt : libstlport_shared.so <= /sources/cxx-stl/stlport/libs/armeabi-v7a/
[armeabi-v7a] Compile thumb : ijkutil_c <= loghelp.c
[armeabi-v7a] StaticLibrary : libijkutil_c.a
[armeabi-v7a] Compile++ thumb: ijkutil_android_cpp <= jnihelp.cpp
[armeabi-v7a] StaticLibrary : libijkutil_android_cpp.a
[armeabi-v7a] SharedLibrary : libijkutil.so
[armeabi-v7a] Compile thumb : ijksdl <= ijksdl_aout.c
[armeabi-v7a] Compile thumb : ijksdl <= ijksdl_audio.c
[armeabi-v7a] Compile thumb : ijksdl <= ijksdl_error.c
[armeabi-v7a] Compile thumb : ijksdl <= ijksdl_mutex.c
[armeabi-v7a] Compile thumb : ijksdl <= ijksdl_stdinc.c
[armeabi-v7a] Compile thumb : ijksdl <= ijksdl_thread.c
[armeabi-v7a] Compile thumb : ijksdl <= ijksdl_timer.c
/Users/Lee/Test/ijkplayer-android-master/android/ijkmediaplayer/jni/ijkmedia/ijksdl/ijksdl_timer.c: In function 'SDL_GetTickHR':
/Users/Lee/Test/ijkplayer-android-master/android/ijkmediaplayer/jni/ijkmedia/ijksdl/ijksdl_timer.c:57:19: error: 'CLOCK_MONOTONIC_HR' undeclared (first use in this function)
clock_gettime(CLOCK_MONOTONIC_HR, &now);
^
/Users/Lee/Test/ijkplayer-android-master/android/ijkmediaplayer/jni/ijkmedia/ijksdl/ijksdl_timer.c:57:19: note: each undeclared identifier is reported only once for each function it appears in
make: *** [/Users/Lee/Test/ijkplayer-android-master/android/ijkmediaplayer/obj/local/armeabi-v7a/objs/ijksdl/ijksdl_timer.o] Error 1
07-15 15:36:30.935: W/IJKMEDIA(20956): IjkMediaPlayer_native_init
07-15 15:36:30.940: W/IJKMEDIA(20956): IjkMediaPlayer_native_setup
07-15 15:36:30.940: W/IJKMEDIA(20956): IjkMediaPlayer_setVideoSurface
07-15 15:36:30.940: W/IJKMEDIA(20956): ijkmp_set_android_surface(surface=0xac30001d)
07-15 15:36:30.940: W/IJKMEDIA(20956): ijkmp_set_android_surface(surface=0xac30001d)=void
07-15 15:36:30.940: W/IJKMEDIA(20956): IjkMediaPlayer_setDataSourceAndHeaders
07-15 15:36:30.940: W/IJKMEDIA(20956): ijkmp_set_data_source(url="/storage/sdcard0/Duopai/DownLoad/Video/http___guatingpublic_qiniudn_com_DwIzb5BfaDvYE0aRhdHTQRxi65I_mov.wb")
07-15 15:36:30.940: W/IJKMEDIA(20956): ijkmp_set_data_source(url="/storage/sdcard0/Duopai/DownLoad/Video/http___guatingpublic_qiniudn_com_DwIzb5BfaDvYE0aRhdHTQRxi65I_mov.wb")=0
07-15 15:36:30.940: W/IJKMEDIA(20956): IjkMediaPlayer_prepareAsync
07-15 15:36:30.940: W/IJKMEDIA(20956): ijkmp_prepare_async()
07-15 15:36:30.940: W/IJKMEDIA(20956): message_loop
07-15 15:36:30.940: W/IJKMEDIA(20956): FFP_MSG_FLUSH:
07-15 15:36:30.950: W/IJKMEDIA(20956): ijkmp_prepare_async()=0
07-15 15:36:31.045: W/IJKMEDIA(20956): No codec could be found with id 65557
07-15 15:36:31.055: W/IJKMEDIA(20956): ijkmp_get_msg: FFP_MSG_PREPARED
07-15 15:36:31.055: W/IJKMEDIA(20956): FFP_MSG_PREPARED:
07-15 15:36:31.055: W/IJKMEDIA(20956): FFP_MSG_VIDEO_SIZE_CHANGED: 480, 480
07-15 15:36:31.055: W/IJKMEDIA(20956): FFP_MSG_SAR_CHANGED: 0, 1
07-15 15:36:31.055: E/IJKMEDIA(20956): unknown FFP_MSG_xxx(700)
07-15 15:36:31.060: W/IJKMEDIA(20956): FFP_MSG_BUFFERING_START:
In Android,the majority of the video can play except for some.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.