{"id":23865917,"url":"https://github.com/pixlight/rtmp-publish-kit","last_synced_at":"2025-07-21T17:33:52.270Z","repository":{"id":165476582,"uuid":"143500674","full_name":"pixlight/rtmp-publish-kit","owner":"pixlight","description":"Rtmp video publish kit for android , encode with mediacodec","archived":false,"fork":false,"pushed_at":"2023-11-28T10:49:33.000Z","size":8867,"stargazers_count":161,"open_issues_count":1,"forks_count":54,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-02-02T05:56:06.291Z","etag":null,"topics":["aac","android","h264","live","mediacodec","rtmp"],"latest_commit_sha":null,"homepage":"https://pixpark.net/rtmp-publish-kit","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-2-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pixlight.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":"2018-08-04T05:30:23.000Z","updated_at":"2024-12-27T10:17:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"d75e054d-38a9-4c61-82ed-4a93399b97be","html_url":"https://github.com/pixlight/rtmp-publish-kit","commit_stats":null,"previous_names":["pixpark/rtmppublishkit","pixlight/rtmp-publish-kit","pixpark/rtmp-publish-kit"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixlight%2Frtmp-publish-kit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixlight%2Frtmp-publish-kit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixlight%2Frtmp-publish-kit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pixlight%2Frtmp-publish-kit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pixlight","download_url":"https://codeload.github.com/pixlight/rtmp-publish-kit/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238048498,"owners_count":19407878,"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":["aac","android","h264","live","mediacodec","rtmp"],"created_at":"2025-01-03T09:11:07.010Z","updated_at":"2025-02-10T03:09:31.042Z","avatar_url":"https://github.com/pixlight.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Rtmp Publish Kit for Android\n### 简介\n\nRtmp Live Publish Kit 是简洁的 Android 平台直播推流SDK，使用 Mediacodec进行H264 和 AAC 编码, 网络部分 Java 重写了RTMP协议，方便阅读定位，YUV处理考虑性能采用了LibYUV。整体延时在1-3秒左右。\n\nA simple rtmp live publisher for android, H264 and AAC encoder use android mediacodec. Publish media stream over RTMP protocol.  Using LibYUV for process yuv.\n\n### 特性\n\n* 支持 H.264/AAC 硬编码 -Supporting H264/AAC hard encoding\n* 支持RTMP协议推流 -Supporting publishing media over RTMP\n* 支持重力感应旋转画面-Supporting  dynamic rotation  image\n* 支持前后置摄像头动态切换，自动对焦-Supporting  front/back camera dynamic swithing and autofocus\n\n### NDK配置\n\n项目依赖NDK，已在build.gradle中指定21版本ndk, 可以不动，也可以按需要版本修改\n\n```shell\nndkVersion '21.4.7075529'\n```\n\n### 权限\n\n需要相机和麦克风权限，demo比较简单，默认不会主动申请，需要手动在app权限里面开启，\n\n若遇到预览黑屏或者无声音问题，检测是否开启相机和麦克风权限。\n\n### Demo\n\n北京向阿里香港服务器推流效果：\n\n\u003cimg src=\"images/demo.jpg\" alt=\"rtmp_android_01\" style=\"zoom:50%;\" /\u003e\n\n### 性能-Performance\n\nSimple Live Publisher 推720P视频，魅族MX4(14年32bit手机)上测试，CPU 占用在7%-12%左右，三星note4上测试，CPU占用7%左右，近两年出的手机CPU占用都在7%左右，发热控制的较好。\n\nSimple Live Publisher Publish 720P video，in Meizu MX4(2014-32bit-mobile)，cpu use about 7%-12%，in Samsung note4  about 7%，heating control well.\n\n魅族-MX4(2014-12) Mobie CPU Usage：\n\n\u003cimg src=\"images/cpu_usage.png\" alt=\"\tcpu_usage\" style=\"zoom:50%;\" /\u003e\n\n\n\n网络和内存-Network \u0026 Memory Usage:\n\n\u003cimg src=\"./images/mem_net_usage.png\" alt=\"Net \u0026amp; Mem\" style=\"zoom:50%;\" /\u003e\n\n\n\n### 附: \n\nrtmp mindmap:  见 `xmind` 目录\n\n\u003cimg src=\"./images/rtmp-1.png\" alt=\"Net \u0026amp; Mem\" style=\"zoom:50%;\" /\u003e\n\n\n\n\u003cimg src=\"./images/rtmp-2.png\" alt=\"Net \u0026amp; Mem\" style=\"zoom:50%;\" /\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixlight%2Frtmp-publish-kit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpixlight%2Frtmp-publish-kit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpixlight%2Frtmp-publish-kit/lists"}