Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.

Overview

ijkplayer

Platform Build Status
Android Build Status
iOS Build Status

Video player based on ffplay

Download

  • Android:
  • Gradle
# required
allprojects {
    repositories {
        jcenter()
    }
}

dependencies {
    # required, enough for most devices.
    compile 'tv.danmaku.ijk.media:ijkplayer-java:0.8.8'
    compile 'tv.danmaku.ijk.media:ijkplayer-armv7a:0.8.8'

    # Other ABIs: optional
    compile 'tv.danmaku.ijk.media:ijkplayer-armv5:0.8.8'
    compile 'tv.danmaku.ijk.media:ijkplayer-arm64:0.8.8'
    compile 'tv.danmaku.ijk.media:ijkplayer-x86:0.8.8'
    compile 'tv.danmaku.ijk.media:ijkplayer-x86_64:0.8.8'

    # ExoPlayer as IMediaPlayer: optional, experimental
    compile 'tv.danmaku.ijk.media:ijkplayer-exo:0.8.8'
}
  • iOS
  • in coming...

My Build Environment

Latest Changes

Features

  • Common
  • remove rarely used ffmpeg components to reduce binary size config/module-lite.sh
  • workaround for some buggy online video.
  • Android
  • platform: API 9~23
  • cpu: ARMv7a, ARM64v8a, x86 (ARMv5 is not tested on real devices)
  • api: MediaPlayer-like
  • video-output: NativeWindow, OpenGL ES 2.0
  • audio-output: AudioTrack, OpenSL ES
  • hw-decoder: MediaCodec (API 16+, Android 4.1+)
  • alternative-backend: android.media.MediaPlayer, ExoPlayer
  • iOS
  • platform: iOS 7.0~10.2.x
  • cpu: armv7, arm64, i386, x86_64, (armv7s is obselete)
  • api: MediaPlayer.framework-like
  • video-output: OpenGL ES 2.0
  • audio-output: AudioQueue, AudioUnit
  • hw-decoder: VideoToolbox (iOS 8+)
  • alternative-backend: AVFoundation.Framework.AVPlayer, MediaPlayer.Framework.MPMoviePlayerControlelr (obselete since iOS 8)

NOT-ON-PLAN

  • obsolete platforms (Android: API-8 and below; iOS: pre-6.0)
  • obsolete cpu: ARMv5, ARMv6, MIPS (I don't even have these types of devices…)
  • native subtitle render
  • avfilter support

Before Build

# install homebrew, git, yasm
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew install git
brew install yasm

# add these lines to your ~/.bash_profile or ~/.profile
# export ANDROID_SDK=<your sdk path>
# export ANDROID_NDK=<your ndk path>

# on Cygwin (unmaintained)
# install git, make, yasm
  • If you prefer more codec/format
cd config
rm module.sh
ln -s module-default.sh module.sh
cd android/contrib
# cd ios
sh compile-ffmpeg.sh clean
  • If you prefer less codec/format for smaller binary size (include hevc function)
cd config
rm module.sh
ln -s module-lite-hevc.sh module.sh
cd android/contrib
# cd ios
sh compile-ffmpeg.sh clean
  • If you prefer less codec/format for smaller binary size (by default)
cd config
rm module.sh
ln -s module-lite.sh module.sh
cd android/contrib
# cd ios
sh compile-ffmpeg.sh clean
  • For Ubuntu/Debian users.
# choose [No] to use bash
sudo dpkg-reconfigure dash
  • If you'd like to share your config, pull request is welcome.

Build Android

git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-android
cd ijkplayer-android
git checkout -B latest k0.8.8

./init-android.sh

cd android/contrib
./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all

cd ..
./compile-ijk.sh all

# Android Studio:
#     Open an existing Android Studio project
#     Select android/ijkplayer/ and import
#
#     define ext block in your root build.gradle
#     ext {
#       compileSdkVersion = 23       // depending on your sdk version
#       buildToolsVersion = "23.0.0" // depending on your build tools version
#
#       targetSdkVersion = 23        // depending on your sdk version
#     }
#
# If you want to enable debugging ijkplayer(native modules) on Android Studio 2.2+: (experimental)
#     sh android/patch-debugging-with-lldb.sh armv7a
#     Install Android Studio 2.2(+)
#     Preference -> Android SDK -> SDK Tools
#     Select (LLDB, NDK, Android SDK Build-tools,Cmake) and install
#     Open an existing Android Studio project
#     Select android/ijkplayer
#     Sync Project with Gradle Files
#     Run -> Edit Configurations -> Debugger -> Symbol Directories
#     Add "ijkplayer-armv7a/.externalNativeBuild/ndkBuild/release/obj/local/armeabi-v7a" to Symbol Directories
#     Run -> Debug 'ijkplayer-example'
#     if you want to reverse patches:
#     sh patch-debugging-with-lldb.sh reverse armv7a
#
# Eclipse: (obselete)
#     File -> New -> Project -> Android Project from Existing Code
#     Select android/ and import all project
#     Import appcompat-v7
#     Import preference-v7
#
# Gradle
#     cd ijkplayer
#     gradle

Build iOS

git clone https://github.com/Bilibili/ijkplayer.git ijkplayer-ios
cd ijkplayer-ios
git checkout -B latest k0.8.8

./init-ios.sh

cd ios
./compile-ffmpeg.sh clean
./compile-ffmpeg.sh all

# Demo
#     open ios/IJKMediaDemo/IJKMediaDemo.xcodeproj with Xcode
# 
# Import into Your own Application
#     Select your project in Xcode.
#     File -> Add Files to ... -> Select ios/IJKMediaPlayer/IJKMediaPlayer.xcodeproj
#     Select your Application's target.
#     Build Phases -> Target Dependencies -> Select IJKMediaFramework
#     Build Phases -> Link Binary with Libraries -> Add:
#         IJKMediaFramework.framework
#
#         AudioToolbox.framework
#         AVFoundation.framework
#         CoreGraphics.framework
#         CoreMedia.framework
#         CoreVideo.framework
#         libbz2.tbd
#         libz.tbd
#         MediaPlayer.framework
#         MobileCoreServices.framework
#         OpenGLES.framework
#         QuartzCore.framework
#         UIKit.framework
#         VideoToolbox.framework
#
#         ... (Maybe something else, if you get any link error)
# 

Support (支持)

  • Please do not send e-mail to me. Public technical discussion on github is preferred.
  • 请尽量在 github 上公开讨论技术问题,不要以邮件方式私下询问,恕不一一回复。

License

Copyright (c) 2017 Bilibili
Licensed under LGPLv2.1 or later

ijkplayer required features are based on or derives from projects below:

android/ijkplayer-exo is based on or derives from projects below:

android/example is based on or derives from projects below:

ios/IJKMediaDemo is based on or derives from projects below:

ijkplayer's build scripts are based on or derives from projects below:

Commercial Use

ijkplayer is licensed under LGPLv2.1 or later, so itself is free for commercial use under LGPLv2.1 or later

But ijkplayer is also based on other different projects under various licenses, which I have no idea whether they are compatible to each other or to your product.

IANAL, you should always ask your lawyer for these stuffs before use it in your product.

Comments
  • 视频缓冲和分段播放问题

    视频缓冲和分段播放问题

    感谢作者贡献了这么好的项目!我在使用的时候碰到了一些问题: 1、在使用IJKFFMoviePlayerController的暂停时缓冲也跟着暂停了,我用NSTimer去输出缓冲也是不变 2、处理多段播放能否使用另一个FFPlayer进行预缓冲和切换 3、最终缓冲playableDuration与视频的duration会有0.4~0.6秒的差距,这个是否是正常的 谢谢

    opened by Zard1096 72
  • 怎样边播放边录制直播视频呢?

    怎样边播放边录制直播视频呢?

    想到的方案有:

    一.(基于m3u8的经验是)下载直播流,再在本地拼接成视频文件 担心占用正在播放时的带宽导致播放器播放卡顿,本地拼接开销也是问题.

    二.截屏录制 基本不行,已实验过替换surfaceviw为自定义的AndroidTextureView,开启线程调用TextureView那个方法 getBitmap(bmp), 传入bmp宽高和屏幕(N6差不多2413x1357)一样的话需要耗时900+ms的时间截一次屏,而且播放画面卡顿一下.即便快到如 #301 dan-huang说的20ms,那截出来的怕也只能做成gif图了..

    三.从ijkplayer缓存里直接拷贝到一个本地文件 参考 [email protected] 的 ffp_get_current_frame_l 函数, 里面的vp->bmp->pitches[0]始终都是0,不知啥原因就搜资料,13年的资料说是结构体SDL_Overlay已弃用,不知道是不是代码太新,,所以就改成 AVFrame* fmp=vp->frame;拿到 AVFrame,可是现在拿到了不知道该怎么弄了, 或是说整个ijkplayer视频解码完成之后哪个代码是控制缓存的呢

    求 @bbcallen 赐教

    staled 
    opened by cjztool 41
  • android的系统,在播过过程中,视频一直显示缓存中。

    android的系统,在播过过程中,视频一直显示缓存中。

    @bbcallen 安卓的手机,在播放http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/auto_bbf0913484a59baedb5d694236a45cc2.m3u8流的过程中。显示缓存。显示缓存后就不能继续播放了。有遇到类似的bug吗? 各位大神。有遇到的麻烦指导下。谢谢!着急期盼。

    staled 
    opened by andyjmzheng 39
  • ./compile-ffmpeg.sh: 133: ./compile-ffmpeg.sh: source: not found

    ./compile-ffmpeg.sh: 133: ./compile-ffmpeg.sh: source: not found

    Please help me

    [*] make NDK standalone toolchain

    ./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.


    [*] check ffmpeg env

    ./compile-ffmpeg.sh: 133: ./compile-ffmpeg.sh: source: not found [email protected]:~/ijkplayer-android-master/android$

    opened by ghost 33
  • 紧急!不能播放ape文件,已经用了module-default.sh

    紧急!不能播放ape文件,已经用了module-default.sh

    下面是logcat: updateConfiguration freq=2462 BSSID=38:97:d6:18:df:50 RSSI=-53 "FlyAuDio"WPA_PSK 10-10 19:13:51.145 1067-1067/system_process E/WifiTrafficPoller: TRAFFIC_STATS_POLL true Token 25 num clients 12 10-10 19:13:51.145 1067-1067/system_process E/WifiTrafficPoller: packet count Tx=8273 Rx=69260 10-10 19:13:51.145 1067-1067/system_process E/WifiTrafficPoller: notifying of data activity 1 10-10 19:13:51.379 14764-15336/cn.flyaudio.videoplayer E/IJKMEDIA: Unsupported file version - 4.11 10-10 19:13:51.381 14764-15336/cn.flyaudio.videoplayer E/IJKMEDIA: /storage/emulated/0/musicTest/ape/天空 - 王菲.ape: Not yet implemented in FFmpeg, patches welcome 10-10 19:13:51.382 14764-14764/cn.flyaudio.videoplayer E/tv.danmaku.ijk.media.player.IjkMediaPlayer: Error (-10000,0) 10-10 19:13:51.684 1067-2072/system_process E/WifiMonitor: handleEvent unknown: 14 CTRL-EVENT-SCAN-STARTED

    opened by mouseOf2ch 30
  • How to display videos in portrait orientation?

    How to display videos in portrait orientation?

    The video was recorded in portrait orientation, but shows on the wrong orientation.. any ideas where should I start with for orientation correction? Thanks!

    PS: tested on android devices

    enhancement 
    opened by emptyway 28
  • 使用自定义数据源的问题

    使用自定义数据源的问题

    使用自定义数据源,实现接口tv.danmaku.ijk.media.player.misc.IMediaDataSource

    public int readAt(long position, byte[] buffer, int offset, int size) throws IOException

    这个方法给ijkplayer提供数据,为什么这个方法会频繁有size=0的时候调进来,这样是读不到任何数据的呀,是不是BUG,我觉得应该传1

    opened by mgoann 26
  • android的系统,在播过过程中,视频停止播放,一直显示缓存中。

    android的系统,在播过过程中,视频停止播放,一直显示缓存中。

    我在android的手机上测试url:http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/auto_bbf0913484a59baedb5d694236a45cc2.m3u8 过程中。播放大概十分钟后,视频就播放停止,一直缓冲。退出播放器。再打开也是不能播放。 下面是打印。请高手给查看下。谢谢!

    09-22 13:33:15.119 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_stop() 09-22 13:33:15.129 10271-10315/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ message_loop exit 09-22 13:33:15.129 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_stop()=0 09-22 13:33:15.129 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_release 09-22 13:33:15.129 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_android_surface(surface=0x0) 09-22 13:33:15.129 10271-10316/tv.danmaku.ijk.media.sample D/dalvikvm﹕ threadid=20: thread exiting, not yet detached (count=0) 09-22 13:33:15.129 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ffpipeline_set_surface() 09-22 13:33:15.129 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_android_surface(surface=0x0)=void 09-22 13:33:15.129 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_shutdown_l() 09-22 13:33:15.129 10271-10373/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ MediaCodec: enqueue_thread_func: exit: -1 09-22 13:33:15.129 10271-10373/tv.danmaku.ijk.media.sample D/dalvikvm﹕ threadid=19: thread exiting, not yet detached (count=0) 09-22 13:33:15.129 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ wait for read_tid 09-22 13:33:15.169 10271-10317/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ HLS request for url 'http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/600k/bbf0913484a59baedb5d694236a45cc2_600k_084.ts', offset 0, playlist 0 09-22 13:33:15.169 10271-10317/tv.danmaku.ijk.media.sample E/IJKMEDIA﹕ ffurl_connect 09-22 13:33:15.169 10271-10317/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ http_open http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/600k/bbf0913484a59baedb5d694236a45cc2_600k_084.ts 09-22 13:33:15.169 10271-10317/tv.danmaku.ijk.media.sample W/IJKMEDIA﹕ No trailing CRLF found in HTTP header. 09-22 13:33:15.169 10271-10317/tv.danmaku.ijk.media.sample E/IJKMEDIA﹕ ffurl_connect 09-22 13:33:15.209 10271-10317/tv.danmaku.ijk.media.sample W/IJKMEDIA﹕ PES packet size mismatch 09-22 13:33:15.209 10271-10347/tv.danmaku.ijk.media.sample D/dalvikvm﹕ threadid=17: thread exiting, not yet detached (count=0) 09-22 13:33:15.859 10271-10372/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ SDL_AMediaCodecJava_stop 09-22 13:33:15.889 10271-10372/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ MediaCodec: func_run_sync: exit: 0 09-22 13:33:15.889 10271-10372/tv.danmaku.ijk.media.sample D/dalvikvm﹕ threadid=18: thread exiting, not yet detached (count=0) 09-22 13:33:15.899 10271-10317/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ Statistics: 344 bytes read, 0 seeks 09-22 13:33:15.899 10271-10317/tv.danmaku.ijk.media.sample D/dalvikvm﹕ threadid=15: thread exiting, not yet detached (count=0) 09-22 13:33:15.899 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ wait for video_refresh_tid 09-22 13:33:15.919 10271-10271/tv.danmaku.ijk.media.sample E/IJKMEDIA﹕ SDL_Overlay(ffmpeg): overlay_free_l(0x63602ce8) 09-22 13:33:15.919 10271-10271/tv.danmaku.ijk.media.sample E/IJKMEDIA﹕ SDL_Overlay(ffmpeg): overlay_free_l(0x646837c8) 09-22 13:33:15.919 10271-10271/tv.danmaku.ijk.media.sample E/IJKMEDIA﹕ SDL_Overlay(ffmpeg): overlay_free_l(0x636d95f0) 09-22 13:33:15.919 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_shutdown_l()=void 09-22 13:33:15.919 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_dec_ref(): ref=0 09-22 13:33:15.919 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_shutdown_l() 09-22 13:33:15.919 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_shutdown_l()=void 09-22 13:33:15.919 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ SDL_AMediaCodecJava_delete 09-22 13:33:16.129 10271-10271/tv.danmaku.ijk.media.sample I/Timeline﹕ Timeline: Activity_idle id: [email protected] time:8856411 09-22 13:33:17.449 10271-10271/tv.danmaku.ijk.media.sample I/Timeline﹕ Timeline: Activity_launch_request id:tv.danmaku.ijk.media.sample time:8857733 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_native_setup 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ av_version_info: ff2.8--ijk0.3.3--dev0.3.3--rc1 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ffpipeline_create_from_android() 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_inject_opaque(0x1d3004d6) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int(ijkinject-opaque, 489686230) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_inject_opaque()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_android_set_mediacodec_select_callback() 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ffpipeline_set_mediacodec_select_callback 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_android_set_mediacodec_select_callback()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setOptionLong 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int(overlay-format, 842225234) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setOptionLong 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int(framedrop, 12) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setOptionLong 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int(http-detect-range-support, 0) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/VideoView﹕ mUri.getPath:http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/auto_bbf0913484a59baedb5d694236a45cc2.m3u8 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setOptionLong 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int(skip_loop_filter, 48) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setOptionLong 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int(get-av-frame-timeout, 3000000) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setOptionLong 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int(mediacodec, 1) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setOptionLong 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int(start-on-prepared, 1) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_option_int()=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setDataSourceAndHeaders 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample V/IJKMEDIA﹕ setDataSource: path http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/auto_bbf0913484a59baedb5d694236a45cc2.m3u8 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_data_source(url="http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/auto_bbf0913484a59baedb5d694236a45cc2.m3u8") 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_data_source(url="http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/auto_bbf0913484a59baedb5d694236a45cc2.m3u8")=0 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_setVideoSurface 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_android_surface(surface=0xc950001d) 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ffpipeline_set_surface() 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_set_android_surface(surface=0xc950001d)=void 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ IjkMediaPlayer_prepareAsync 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_prepare_async() 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ ===== options ===== 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ player-opts : overlay-format = 842225234 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ player-opts : framedrop = 12 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ player-opts : get-av-frame-timeout = 3000000 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ player-opts : mediacodec = 1 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ player-opts : start-on-prepared = 1 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ format-opts : ijkinject-opaque = 489686230 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ format-opts : http-detect-range-support = 0 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ codec-opts : skip_loop_filter = 48 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ =================== 09-22 13:33:17.659 10271-10271/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ijkmp_prepare_async()=0 09-22 13:33:17.669 10271-2566/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ SDL_RunThread: [2566] ff_msg_loop 09-22 13:33:17.669 10271-2566/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ message_loop 09-22 13:33:17.669 10271-2566/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ FFP_MSG_FLUSH: 09-22 13:33:17.669 10271-2567/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ SDL_RunThread: [2567] ff_vout 09-22 13:33:17.669 10271-2568/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ SDL_RunThread: [2568] ff_read 09-22 13:33:17.669 10271-2567/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ ffpipenode_create_video_output_from_android_mediacodec() 09-22 13:33:17.669 10271-2568/tv.danmaku.ijk.media.sample E/IJKMEDIA﹕ ffurl_connect 09-22 13:33:17.669 10271-2568/tv.danmaku.ijk.media.sample I/IJKMEDIA﹕ http_open http://ssports.vod.smgbb.cn.cloudcdn.net/otv/vod/auto_bbf0913484a59baedb5d694236a45cc2.m3u8 09-22 13:33:17.669 10271-2568/tv.danmaku.ijk.media.sample E/IJKMEDIA﹕ ffurl_connect 09-22 13:33:17.729 10271-10271/tv.danmaku.ijk.media.sample I/Timeline﹕ Timeline: Activity_idle id: [email protected] time:8858013 09-22 13:33:17.759 10271-2568/tv.danmaku.ijk.media.sample D/IJKMEDIA﹕ request: GET /otv/vod/auto_bbf0913484a59baedb5d694236a45cc2.m3u8 HTTP/1.1 User-Agent: Lavf/56.40.101 Accept: / Range: bytes=0- Connection: close Host: ssports.vod.smgbb.cn.cloudcdn.net Icy-MetaData: 1

    staled 
    opened by andyjmzheng 26
  • 在无网络下播放失败,重试,会出现signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

    在无网络下播放失败,重试,会出现signal 11 (SIGSEGV), code 1 (SEGV_MAPERR)

    ********** Crash dump: ********** Build fingerprint: 'samsung/ja3gzs/ja3g:4.4.2/KOT49H/I9500ZSUDNK1:user/release-keys' pid: 6521, tid: 6595, name: ff_read >>> tv.danmaku.ijk.media.player:ijk <<< signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad Stack frame I/DEBUG (22333): #00 pc 000117d0 /system/lib/libc.so (dlfree+1191): Routine ?? ??:0 Stack frame I/DEBUG (22333): #01 pc 0000dd1f /system/lib/libc.so (free+10): Routine ?? ??:0 Stack frame I/DEBUG (22333): #02 pc 0014ec63 /data/app-lib/tv.danmaku.ijk.media.player-12/libijkffmpeg.so (ffurl_closep+82): Routine ffurl_closep at /home/lyq/git/ijkplayer-d0413/ijkplayer/android/contrib/ffmpeg-armv7a/libavformat/avio.c:476 Crash dump is completed 就是 av_freep(&h->priv_data);这个方法

    can-not-reproduce staled 
    opened by lyqaiym 25
  • ijkplayer播放rtmp直播流,延迟明显

    ijkplayer播放rtmp直播流,延迟明显

    Android上使用master或stable分支的代码,编译后的demo播放rtmp直播流,从打开操作到屏幕显示活动视频,测试差不多需要8s左右,有时更长。

    视频打开后,对比实际活动,播放延迟要明显滞后超过5s以上。

    在PC端测试原版ffplay,也有类似现象,但如果加入如下参数,则播放延迟会明显减低至2s以内。

    ffplay -fflags nobuffer -i rtmp://dev:1935//live/livestream

    请问如果ijkplayer要增加该参数,要如何操作呢? 我尝试在ijkplayer/android/ijkmediawidget/src/tv/danmaku/ijk/media/widget/VideoView.java这个文件中增加 ijkMediaPlayer.setOverlayFormat(AvFourCC.SDL_FCC_RV32); ijkMediaPlayer.setAvFormatOption("fflags", “nobuffer”); // add ijkMediaPlayer.setAvCodecOption("skip_loop_filter", "48"); ijkMediaPlayer.setFrameDrop(12);

    貌似没有任何效果

    opened by walkermi 25
  • Wait for stream closed or switch url on the fly on IOS

    Wait for stream closed or switch url on the fly on IOS

    Hi,

    I have a rtsp server that can stream only 1 stream on the same time.

    When i try to call stop or shutdown, i have to wait around 10 or 15 seconds before i can init a new player. If i init the player before this time, the server say me that there is already a stream open.

    What can i do either to switch on the fly without needing to init a new player or have a message that it's ok ? I don't see MPMoviePlaybackStateStopped, only MPMoviePlaybackStatePlaying or MPMoviePlaybackStatePaused.

    It would be nice to not wait the 10 or 15s, with vlc i don't have this problem.

    staled 
    opened by linked67 23
  • 无法播放部分DSD文件

    无法播放部分DSD文件

    decoder中我已经加入了dsd_lsbf_planar、dsd_lsbf、dsd_msbf_planar、dsd_msbf, 目标音频stream信息为:Stream #0:0: Audio: dsd_msbf (DSD / 0x20445344), 352800 Hz, stereo, fltp, 5644 kb/s 无法播放 但是目标音频stream为 Stream #0:0: Audio: dsd_lsbf_planar, 352800 Hz, stereo, fltp, 5644 kb/s 则可以播放 请问这是什么原因呢,实在搞不懂了

    opened by wazrx 0
  • 增加pcm_alaw格式后录制视频失败

    增加pcm_alaw格式后录制视频失败

    改成pcm_alaw格式录制视频报下面两个错误 Could not find tag for codec pcm_alaw in stream #1, codec not currently supported in container Error occurred when opening output file

    opened by TocodingJay 0
  • ios16系统使用ijkplayer会崩溃

    ios16系统使用ijkplayer会崩溃

    只有iOS16系统才会有这个问题,麻烦问一下这个问题的解决办法,非常感谢 具体堆栈信息如下: 0 CoreVideo _CVPixelBufferLockBaseAddress + 36 1 CoreVideo CVPixelBufferLockBaseAddress + 8321884652264488988 2 __cxa_throw + 11540165082370076856 3 queue_picture (ff_ffplay.c:3300) 4 QueuePicture (VideoToolBox.m:571) 5 VTDecoderCallback (VideoToolBox.m:840) 6 VideoToolbox ___vtdsr_dequeueAllPendingFramesAndCallbackClientForEach_block_invoke + 1104

    opened by Qiangcheng 1
  • Will your library support OpenHarmony platform by JavaScript language ?

    Will your library support OpenHarmony platform by JavaScript language ?

    I am developing an OpenHarmony application with JavaScript language which used your library, will your library support OpenHarmony platform by JavaScript language?If so, I want to contribute to the OpenHarmony build of this library.Expecte for your reply!

    opened by yuangerep 0
  • 关于摘要认证的问题

    关于摘要认证的问题

    1.我用海康摄像头测试,发现RTSP视频播放不支持最新的RFC 7616(SHA256) 认证,但视频播放支持 RFC 2617(MD5)的认证,有大神知道吗

    1663237102128 海康摄像头“RTSP 摘要算法 ” 设置成 MD5 时 RTSP 流可以播放

    image

    海康摄像头“RTSP 摘要算法 ” 设置成 SHA256 时 RTSP 流不能播放了

    求教大佬解惑

    opened by zh302674199 0
Owner
bilibili
bilibili Open Source Task Force
bilibili
Yet Another Video Player (or YAVP) is a Video Player for Android that is based on Googles ExoPlayer.

Yet Another Video Player Yet Another Video Player (or YAVP) is a Video Player for Android that is based on Googles ExoPlayer. Who Is YAVP For? First o

null 63 Sep 6, 2022
FFmpeg compiled for Android. Execute FFmpeg commands with ease in your Android app.

FFMPEG video operations FFmpeg compiled for Android. Execute FFmpeg commands with ease in your Android app. Getting Started This project is provide in

Simform Solutions 261 Sep 24, 2022
Video Transcoder is an application which uses the open source program FFmpeg to transcode video files from one format to another.

Video Transcoder Do you want to encode videos on your phone into different formats, trim videos, or extract audio? Are you looking for a free solution

Branden Archer 334 Sep 24, 2022
Compose-video-player - Video player for Android Compose powered by ExoPlayer

Compose Video Player Video player for Android Compose powered by ExoPlayer. Addi

Juan Pablo Herrera 17 Sep 5, 2022
Fermata Media Player is a free, open source audio and video player with a simple and intuitive interface.

Fermata Media Player About Fermata Media Player is a free, open source audio and video player with a simple and intuitive interface. It is focused on

Andrey 204 Sep 28, 2022
mpv-android is a video player for Android based on libmpv.

mpv-android is a video player for Android based on libmpv.

null 1k Sep 30, 2022
Simple and lightweight, yet polished and powerful Android video player based on ExoPlayer

Just (Video) Player Android video player based on ExoPlayer It uses ExoPlayer's extension-ffmpeg with all its audio formats enabled (it can handle eve

Marcel Dopita 570 Sep 27, 2022
AutoPlayer - A player based on ExoPlayer for play video automatically in RecyclerView, when an item is visible.

A player based on ExoPlayer for play video automatically in RecyclerView, when an item is visible.

Kishan Singh 6 Aug 14, 2022
[] FFmpeg build for android random architectures with example jni

AndroidFFmpegLibrary This project aims to create working library providing playing video files in android via ffmpeg libraries. With some effort and N

AppUnite Sp. z o.o. Spk. 1.1k Sep 29, 2022
Free p2p cdn android github sdk to reduce video streaming costs of live and on demand video using webrtc by upto 90% and improve scalability by 6x - 🚀 Vadootv 🚀

Android p2p cdn sdk to distribute load and reduce costs(https://peervadoo.com) Vadootv is a p2p sdk integration to reduce your video streaming costs b

Vadootv 41 Sep 8, 2022
The Madman library (Media Ads Manager) enables you to advertise video contents with video ads.

Madman (Media ads manager) is a high performance alternative to Google's standard IMA android SDK. If you have your own VAST server and want to render video ads and have full control over the UI, then this library is for you.

Flipkart Incubator 64 Jun 8, 2022
Custom Android view with video player, loader and placeholder image

VideoPlayerView Custom Android view with video player, loader and placeholder image. To stay up-to-date with news about the library Usage Here is an e

Marcin Moskała 90 Aug 24, 2022
NOVA is an open source video player for Android

NOVA: opeN sOurce Video plAyer Overview NOVA is an open source video player for Android. It consists in a fork of the original Archos Video Player Com

NOVA 706 Sep 26, 2022
api.video Android player

api.video is the video infrastructure for product builders. Lightning fast video APIs for integrating, scaling, and managing on-demand & low latency live streaming features in your app.

api.video 6 Aug 30, 2022
A Custom Video Player with Controls in Kotlin

UNT-Video-Player A Custom Video Player with Controls in Kotlin Hello folks, Here is the custom video player built in Kotlin; with SeekBar, fast forwar

ultroNeous Technologies 0 Nov 8, 2021
Exo Player Video with jetPack Compose

Exo Player Video with jetPack Compose

mohamed tamer 2 Feb 26, 2022
Sample HLS Video player in Kotlin with mvvm

HLSVideoPlayer Sample HLS Video player in Kotlin with mvvm Note: mvvm is partially implemented due to time constraint, so here is a scope for improvem

null 0 Apr 9, 2022
Odeon Music Player is a lightweight music player for Android.

Odeon ?? Odeon Music Player is a lightweight music player for Android. Get it on Google Play. We value your privacy, your battery life and your device

Thibault Seisel 55 Sep 13, 2022
Music Player - This is a basic music player built with Android Studio and Kotlin

Music Player Made by Jenny Cárdenas This is a basic music player built with Android Studio and Kotlin, it shows two views in the UI, the user can play

Jenny C 3 Oct 28, 2021