{"id":13697081,"url":"https://github.com/hardman/AWLive","last_synced_at":"2025-05-03T17:33:12.613Z","repository":{"id":43972690,"uuid":"73000482","full_name":"hardman/AWLive","owner":"hardman","description":"最简单的iOS 推流代码，视频捕获，软编码(faac，x264)，硬编码（aac，h264），横屏直播，美颜，flv编码，rtmp协议，blog内陆续更新代码解析，你想学的知识这里都有，愿意懂直播技术的同学快来看！！","archived":false,"fork":false,"pushed_at":"2017-11-30T08:34:05.000Z","size":5973,"stargazers_count":697,"open_issues_count":7,"forks_count":194,"subscribers_count":37,"default_branch":"master","last_synced_at":"2024-11-13T00:33:20.516Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hardman.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}},"created_at":"2016-11-06T15:40:34.000Z","updated_at":"2024-11-07T13:49:12.000Z","dependencies_parsed_at":"2022-09-10T14:20:19.716Z","dependency_job_id":null,"html_url":"https://github.com/hardman/AWLive","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/hardman%2FAWLive","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardman%2FAWLive/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardman%2FAWLive/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hardman%2FAWLive/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hardman","download_url":"https://codeload.github.com/hardman/AWLive/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252226991,"owners_count":21714917,"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-08-02T18:00:52.436Z","updated_at":"2025-05-03T17:33:10.188Z","avatar_url":"https://github.com/hardman.png","language":"Objective-C","funding_links":[],"categories":["Media"],"sub_categories":[],"readme":"\n[blog点这里](http://www.jianshu.com/u/1240d2400ca1)\n\n介绍\n---\n最近在做iOS直播，研究了相关直播技术，主要包含两方面：推流，播放。\n\n因为之前使用cocos2dx做过一个视频游戏（[恋爱公寓](https://itunes.apple.com/cn/app/lian-ai-gong-yu-shi-pin-yang/id1149280715?mt=8)），用ffmpeg+sdl+cocos2dx实现过视频播放器。\n\n游戏中的视频是hevc(h265)+aac合成mp4文件，使用aes加密。视频播放的时候，需要使用ffmpeg中的crypt模块进行aes解密后播放视频，解析出来的yuv图片数据直接送给OpenGL显示。\n\n所以这次主要研究推流技术。并将[代码开源](https://github.com/hardman/AWLive)。\n\n其实直播技术中不论播放还是推流，更多的应该算是技术整合，就是将前人做好的协议和实现，整合成我们自己想要的功能。\n\n而这次做这个项目也并不是做了什么技术创新，github里面已经有着很多直播源代码，可能比我写的更好更完整。而我的代码，特点就是简单直接，直奔主题。\n\n我会在[我的博客](http://www.jianshu.com/u/1240d2400ca1)里做一些简单的解析，目的是希望让更多的人了解直播技术，能够了解直播内部的一些简单的原理，不再知其然不知其所以然。\n\n功能范围\n---\n- 视频捕获：系统方法捕获，GPUImage捕获，CMSampleRef解析\n- 美颜滤镜：GPUImage，\n- 视频变换：libyuv\n- 横屏直播\n- 软编码：faac，x264\n- 硬编码：VideoToolbox(aac/h264)\n- libaw：C语言函数库\n- flv协议及编码\n- 推流协议：librtmp，rtmp重连，rtmp各种状态回调\n\n代码使用及注意\n---\n代码使用方法见Demo。后续会根据上述功能的每一点对源代码进行解析。\n\n如果有什么疑问或者问题，请评论指出,希望能够给愿意了解直播技术的人抛出一块好砖。\n\n注1：项目中所有相关的文件名，类名，全局变量，全局方法都会加AW/aw作为前缀。\n注2：项目中关键代码都使用c语言编写，理论上可以很容易地移植到android中。\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardman%2FAWLive","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhardman%2FAWLive","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhardman%2FAWLive/lists"}