GSYVideoPlayer
Video players (IJKplayer, ExoPlayer, MediaPlayer), HTTPS, 16k page size, danmaku (bullet chat) support, external subtitles, support for filters, watermarks, and GIF screenshots, pre-roll and mid-roll ads, multiple simultaneous playback, basic seeking/dragging, volume and brightness adjustment, play-while-cache support
Install / Use
/learn @CarGuo/GSYVideoPlayerREADME

Supports IJKPlayer, Media3(EXOPlayer2), MediaPlayer, AliPlayer, implementing a multi-functional video player. (Please read the following instructions carefully, most questions can be answered below).
* HarmonyOS version openharmony-tpc/GSYVideoPlayer
If cloning is too slow or images are not visible, you can try to synchronize from the following addresses
- GitCode https://gitcode.com/ZuoYueLiang/GSYVideoPlayer
- Gitee:https://gitee.com/CarGuo/GSYVideoPlayer
Type | Function -------------|------------------------------------------------------------------------------------------------------------------------------------------------- Cache | Play while caching, using AndroidVideoCache; Media3(ExoPlayer) uses SimpleCache. Protocols | h263\4\5, Https, concat, rtsp, hls, rtmp, crypto, mpeg, etc. (ijk mode format support) Filters | Simple filters (mosaic, black and white, color filter, Gaussian, blur, etc. more than 20 kinds), animation, (watermark, multi-screen playback, etc.). Frame images | Video first frame, video frame screenshot function, video to gif function. Playback | List playback, continuous list playback, gravity rotation and manual rotation, video's own rotation attribute, fast and slow playback, network video loading speed. Screen | Adjust display ratio: default, 16:9, 4:3, fill; rotate screen angle during playback (0,90,180,270); mirror rotation. Kernel | IJKPlayer, Media3(EXOPlayer), MediaPlayer, AliPlayer switching, custom kernel Layout | Full screen and non-full screen two sets of layout switching, pure playback support without any operation controls, barrage function, inherited custom any layout. Playback | Singleton playback, multiple simultaneous playback, video list sliding automatic playback, seamless playback of list switching detail pages. Window | Small window, small window playback in multiple windows (including desktop). Ads | Opening ads, skip ad support, interstitial ad function. Subtitles | Media3(exo2) mode supports custom external subtitles. Dash | Media3(exo2) mode supports dash Stream | Supports metadata playback Adapt 16k | ex_so adapts to 16K Page Size openssl | Currently ex_so's arm64/x86_64 uses openssl 1.1.1w FFmpeg | Currently ex_so's arm64/x86_64 uses FFmpeg 4.3 FFmpeg | Currently ex_so's arm64/x86_64 supports G711a(pcm_alaw) More | No black screen when pausing front and back switching; support for adjusting different definitions; seamless switching support; lock/unlock full screen click function; progress bar small window preview (test). Customization | Customizable rendering layer, custom management layer, custom playback layer (control layer), custom cache layer.
| Official Account | Juejin | Zhihu | CSDN | Jianshu |---------|-------------------------------------------------------------|-------------------------------------------|-----------------------------------------|----------------------------------------------| | GSYTech | Click me | Click me | Click me | Click me
--------------Demo APK Download Address---------------
I. Using Dependencies
There are currently three hosting methods:
- MavenCentral: Available after version 11.0.0, all base class packages are published and hosted here.
- Github Package: Available from version 9.1.0, but before version 11.0.0, the basic dependencies of GSYIjkJava are still hosted on jitpack.
- Jitpack IO: Will continue to be released, but there is a random loss of packages on the hosting platform.
--- Version Update Instructions --- .
1. MavenCentral Reference (Recommended)
Since jitpack keeps losing packages, it has been migrated to MavenCentral. The usage is as follows:
First Add
allprojects {
repositories {
///...
mavenCentral()
maven { url "https://maven.aliyun.com/repository/public" }
}
}
You can choose one of the following three and add it to the build.gradle under the module.
A. Direct Introduction
//Complete version introduction
implementation 'io.github.carguo:gsyvideoplayer:12.0.0'
//Whether AliPlayer mode is needed
implementation 'io.github.carguo:gsyvideoplayer-aliplay:12.0.0'
B. Add java and the so support you want:
implementation 'io.github.carguo:gsyvideoplayer-java:12.0.0'
//Whether ExoPlayer mode is needed
implementation 'io.github.carguo:gsyvideoplayer-exo2:12.0.0'
//Whether AliPlayer mode is needed
implementation 'io.github.carguo:gsyvideoplayer-aliplay:12.0.0'
//so of ijk mode according to your needs
implementation 'io.github.carguo:gsyvideoplayer-arm64:12.0.0'
implementation 'io.github.carguo:gsyvideoplayer-armv7a:12.0.0'
implementation 'io.github.carguo:gsyvideoplayer-armv5:12.0.0'
implementation 'io.github.carguo:gsyvideoplayer-x86:12.0.0'
implementation 'io.github.carguo:gsyvideoplayer-x64:12.0.0'
C. Support other format protocols (mpeg, rtsp, concat, crypto protocols, support 16k Page Size)
A and B normal versions support 263/264/265, etc. For mpeg encoding, there will be sound but no picture. The so introduced by C supports mpeg encoding and other supplementary protocols, but the so package is relatively larger.
implementation 'io.github.carguo:gsyvideoplayer-java:12.0.0'
//Whether ExoPlayer mode is needed
implementation 'io.github.carguo:gsyvideoplayer-exo2:12.0.0'
//Whether AliPlayer mode is needed
implementation 'io.github.carguo:gsyvideoplayer-aliplay:12.0.0'
//More ijk encoding support
implementation 'io.github.carguo:gsyvideoplayer-ex_so:12.0.0'
2. Github Package Dependency Method (Recommended)
Since Jitpack often has the problem of random loss of historical packages, a new Github Package dependency method is added. The usage is as follows:
However, accessing github package requires a token to access, which is more troublesome, but it is stable.
allprojects {
repositories {
//...
maven {
url 'https://maven.pkg.github.com/CarGuo/GSYVideoPlayer'
// You can also use your own GitHub account and token
// For convenience, I have provided a token for an infrequently used account here
credentials {
// your github name
username = 'carsmallguo'
// your github generate new token
password = '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'
}
}
maven {
url "https://maven.aliyun.com/repository/public"
}
mavenCentral()
}
}
- To generate your own token, you can see: https://docs.github.com/zh/authentication/keeping-your-account-and-data-secure/managing-your-personal-access-tokens
In theory, it is the avatar in the upper right corner - Settings - Developer Settings - Personal access tokens - tokens (classic) - Generate new token (classic) - read:packages Remember to choose permanent for the expiration time
You can choose one of the following three and add it to the build.gradle under the module.
A. Direct Introduction
//Complete version introduction
implementation 'com.shuyu:gsyvideoplayer:12.0.0'
//Whether AliPlayer mode is needed
implementation 'com.shuyu:gsyvideoplayer-aliplay:12.0.0'
B. Add java and the so support you want:
implementation 'com.shuyu:gsyvideoplayer-java:12.0.0'
//Whether ExoPlayer mode is needed
implementation 'com.shuyu:gsyvideoplayer-exo2:12.0.0'
//Whether AliPlayer mode is needed
implement
