{"id":16790088,"url":"https://github.com/cainkernel/cainplayer","last_synced_at":"2025-10-04T01:31:50.579Z","repository":{"id":112527174,"uuid":"164284047","full_name":"CainKernel/CainPlayer","owner":"CainKernel","description":"A Simple Android MediaPlayer using FFmpeg, OpenSLES and OpenGLES base on ffplay","archived":false,"fork":false,"pushed_at":"2020-03-22T02:51:27.000Z","size":14726,"stargazers_count":103,"open_issues_count":10,"forks_count":26,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-01-11T20:10:40.049Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/CainKernel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-06T07:10:49.000Z","updated_at":"2024-12-02T06:23:53.000Z","dependencies_parsed_at":"2023-04-07T08:06:24.028Z","dependency_job_id":null,"html_url":"https://github.com/CainKernel/CainPlayer","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CainKernel%2FCainPlayer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CainKernel%2FCainPlayer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CainKernel%2FCainPlayer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/CainKernel%2FCainPlayer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/CainKernel","download_url":"https://codeload.github.com/CainKernel/CainPlayer/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":235208982,"owners_count":18953003,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-13T08:28:58.746Z","updated_at":"2025-10-04T01:31:47.122Z","avatar_url":"https://github.com/CainKernel.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CainPlayer\n基于ffplay逻辑实现的简单播放器。该播放器最开始是为了CainCamera中的短视频编辑而造的播放器，目前播放器还是个demo，离真正的商用播放器还差得远，各种异常状态都还没考虑进去。对于直播点播来说，个人推荐ijkplayer，都是基于ffplay实现的播放器，ijkplayer着重对网络流进行了优化，目前各大公司的直播点播的播放器基本采用ijkplayer或者基于ijkplayer改造而来，属于一个久经考验的播放器。\n\n# 支持部分ffplay命令\n通过使用 setOption 方法指定参数：\n```\n指定使用MediaCodec进行解码\nmCainMediaPlayer.setOption(CainMediaPlayer.OPT_CATEGORY_PLAYER, \"vcodec\", \"h264_mediacodec\");\n```\n\n# 截图\n![本地视频](https://github.com/CainKernel/CainPlayer/blob/master/screenshot/native_video.png)\n\n![网络视频](https://github.com/CainKernel/CainPlayer/blob/master/screenshot/rtmp_video.png)\n\n# 讲解文章\n[第零章 基础公共类的封装](https://www.jianshu.com/p/9003caa6683f)\n\n[第一章 播放器初始化与解复用流程](https://www.jianshu.com/p/95dc19217847)\n\n[第二章 音视解码器和视频解码器实现](https://www.jianshu.com/p/8de0fc796ef9)\n\n[第三章 音频输出 —— OpenSLES](https://www.jianshu.com/p/9b41212c71a5)\n\n[第四章 音频重采样与变速变调处理](https://www.jianshu.com/p/4af5d16ac017)\n\n[第五章 视频同步渲染输出](https://www.jianshu.com/p/f8ba3ceac687)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcainkernel%2Fcainplayer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcainkernel%2Fcainplayer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcainkernel%2Fcainplayer/lists"}