ijkplayer、VLC Player、SmartPlayer、ExoPlayer播放器比較

ijkPlayer

ijkPlayer是BiliBili公司維護的一個開源工程,基於ffmpeg開發的一個播放器軟件,支持Android和iOS平臺,整個ijkplayer就是以ffplay爲基礎,若是隻是使用它進行播放,集成也較爲簡單,使用也和MediaPlayer差很少,可是要定製化需求,就有必定的門檻高度。支持軟硬編解碼,支持倍速播放,能夠定製化集成須要的功能,集成佔用體積也很小,更詳細的解釋參看下面官方介紹:html

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)

VLC Media Player

VLC 是一款自由、開源的跨平臺多媒體播放器及框架,可播放大多數多媒體文件,以及 DVD、音頻 CD、VCD 及各種流媒體協議。java

Plays all formatsnode

MPEG-1/2, DivX® (1/2/3/4/5/6), MPEG-4 ASP, XviD, 3ivX D4, H.261, H.263 / H.263i, H.264 / MPEG-4 AVC, Cinepak, Theora, Dirac / VC-2, MJPEG (A/B), WMV 1/2, WMV 3 / WMV-9 / VC-1, Sorenson 1/3, DV, On2 VP3/VP5/VP6, Indeo Video v3 (IV32), Real Video (1/2/3/4).android

MPEG Layer 1/2, MP3 - MPEG Layer 3, AAC - MPEG-4 part3, Vorbis, AC3 - A/52, E-AC-3, MLP / TrueHD>3, DTS, WMA 1/2, WMA 3, FLAC, ALAC, Speex, Musepack / MPC, ATRAC 3, Wavpack, Mod, TrueAudio, APE, Real Audio, Alaw/µlaw, AMR (3GPP), MIDI, LPCM, ADPCM, QCELP, DV Audio, QDM2/QDMC, MACE.ios

DVD, Text files (MicroDVD, SubRIP, SubViewer, SSA1-5, SAMI, VPlayer), Closed captions, Vobsub, Universal Subtitle Format (USF), SVCD / CVD, DVB, OGM, CMML, Kate.git

ID3 tags, APEv2, Vorbis comment.github

Advanced formatswindows

 Input Mediaapi

UDP/RTP Unicast, UDP/RTP Multicast, HTTP / FTP, MMS, TCP/RTP Unicast, DCCP/RTP Unicast, File, DVD Video, Video CD / VCD, SVCD, Audio CD (no DTS-CD), DVB (Satellite, Digital TV, Cable TV), MPEG encoder, Video acquisition.網絡

 Input Formats

MPEG (ES,PS,TS,PVA,MP3), AVI, ASF / WMV / WMA, MP4 / MOV / 3GP, OGG / OGM / Annodex, Matroska (MKV), Real, WAV (including DTS), Raw Audio: DTS, AAC, AC3/A52, Raw DV, FLAC, FLV (Flash), MXF, Nut, Standard MIDI / SMF, Creative™ Voice.

 Miscellaneous

SAP/SDP announces, Bonjour protocol, Mozilla/Firefox plugin, ActiveX plugin, SVCD Menus, Localization, CD-Text, CDDB CD info, IGMPv3, IPv6, MLDv2, CPU acceleration.

SmartPlayer

SmartPlayer是大牛直播SDK(Github)開發的全自研跨平臺(windows/android/iOS)流媒體內核,支持RTSP、RTMP,功能齊全、高穩定、超低延遲,超低資源佔用,適用於安防、教育、單兵指揮等行業。如不單獨說明,系Windows、Android、iOS全平臺支持。

  •  [支持播放協議]RTSP、RTMP;
  •  [多實例播放]支持多實例播放;
  •  [事件回調]支持網絡狀態、buffer狀態等回調;
  •  [視頻格式]支持H.26五、H.264,此外,還支持RTSP MJPEG播放;
  •  [音頻格式]支持AAC/PCMA/PCMU;
  •  [H.264/H.265軟解碼]支持H.264/H.265軟解;
  •  [H.264硬解碼]Windows/Android/iOS支持特定機型H.264硬解;
  •  [H.265硬解]Windows/Android/iOS支持特定機型H.265硬解;
  •  [H.264/H.265硬解碼]Android支持設置Surface模式硬解和普通模式硬解碼;
  •  [RTSP模式設置]支持RTSP TCP/UDP模式設置;
  •  [RTSP TCP/UDP自動切換]支持RTSP TCP、UDP模式自動切換;
  •  [RTSP超時設置]支持RTSP超時時間設置,單位:秒;
  •  [RTSP 401認證處理]支持上報RTSP 401事件,如URL攜帶鑑權信息,會自動處理;
  •  [緩衝時間設置]支持buffer time設置;
  •  [首屏秒開]支持首屏秒開模式;
  •  [複雜網絡處理]支持斷網重連等各類網絡環境自動適配;
  •  [快速切換URL]支持播放過程當中,快速切換其餘URL,內容切換更快;
  •  [音視頻多種render機制]Android平臺,視頻:surfaceview/OpenGL ES,音頻:AudioTrack/OpenSL ES;
  •  [實時靜音]支持播放過程當中,實時靜音/取消靜音;
  •  [實時音量調節]支持播放過程當中實時調節音量;
  •  [實時快照]支持播放過程當中截取當前播放畫面;
  •  [只播關鍵幀]Windows平臺支持實時設置是否只播放關鍵幀;
  •  [渲染角度]支持0°,90°,180°和270°四個視頻畫面渲染角度設置;
  •  [渲染鏡像]支持水平反轉、垂直反轉模式設置;
  •  [等比例縮放]支持圖像等比例縮放繪製(Android設置surface模式硬解模式不支持);
  •  [實時下載速度更新]支持當前下載速度實時回調(支持設置回調時間間隔);
  •  [解碼前視頻數據回調]支持H.264/H.265數據回調;
  •  [解碼後視頻數據回調]支持解碼後YUV/RGB數據回調;
  •  [解碼前音頻數據回調]支持AAC/PCMA/PCMU數據回調;
  •  [音視頻自適應]支持播放過程當中,音視頻信息改變後自適應;
  •  [擴展錄像功能]支持和錄像SDK組合使用。
ExoPlayer

ExoPlayer 是google推出的開源播放器,主要是集成了Android 提供的一套解碼系統來解析視頻和音頻,將MediaCodec封裝地很是完善,造成了一個性能優越,播放穩定性較好的一個開發播放器。

ExoPlayer is an application level media player for Android. It provides an alternative to Android’s MediaPlayer API for playing audio and video both locally and over the Internet. ExoPlayer supports features not currently supported by Android’s MediaPlayer API, including DASH and SmoothStreaming adaptive playbacks. Unlike the MediaPlayer API, ExoPlayer is easy to customize and extend, and can be updated through Play Store application updates.

Documentation

Using ExoPlayer

Via jCenter

The easiest way to get started using ExoPlayer is by including the following in your project's build.gradle file:

compile 'com.google.android.exoplayer:exoplayer:rX.X.X'

where rX.X.X is the your preferred version. For the latest version, see the project's Releases. For more details, see the project on Bintray.

As source

ExoPlayer can also be built from source using Gradle. You can include it as a dependent project like so:

// settings.gradle
include ':app', ':..:ExoPlayer:library'

// app/build.gradle
dependencies {
    compile project(':..:ExoPlayer:library')
}

As a jar

If you want to use ExoPlayer as a jar, run:

./gradlew jarRelease

and copy library.jar to the libs folder of your new project.

總結

ijkplayer結構比較相對比較清晰,可擴展性較差,基本上沒有提供modules供開發者二次開發,官方更新比較慢,值得欣慰的是,好多開發者基於ijkplayer作了擴展,填了很是多的坑,往上資料很是多;

VLC對點播的支持比較好,可是工程龐大,接入或二次開發難度比較大;

SmartPlayer對RTSP和RTMP直播播放支持很是優秀,毫秒級延遲,穩定性比較好;

ExoPlayer不太適合直播,視頻解碼沒法接入軟解,可擴展性通常,並且只支持Android平臺。

相關文章
相關標籤/搜索