Upgrade to Pro — share decks privately, control downloads, hide ads and more …

直播簡單講

 直播簡單講

MarkFly

May 21, 2019
Tweet

More Decks by MarkFly

Other Decks in Programming

Transcript

  1. 1. AVFoundation 2. GPUImage、OpenGL 3. FFMpeg、VideoToolbox、AudioToolbox 4. libRTMP 5. SRS/BMS、Nginx、CDN

    6. RTMP、HTTP-FLV、HLS 7. GPU(就是硬解)、CPU(就是軟解) 8. ijkPlayer 推流 拉流
  2. ⼀個完整直播APP功能 1、聊天 私聊、聊天室、點亮、推送、⿊名單等; 2、禮物 普通禮物、豪華禮物、紅包、排⾏榜、第三⽅充值、內購、禮物動態更新、提現等; 3、直播列表 關注、熱⾨、最新、分類直播⽤⼾列表等; 4、⾃⼰直播 錄制、推流、解碼、播放、美顏、⼼跳、後台切換、主播對管理員操作、管理員對⽤⼾等; 5、房間邏輯

    創建房間、進入房間、退出房間、關閉房間、切換房間、房間管理員設置、房間⽤⼾列表等; 6、⽤⼾邏輯 普通登陸、第三⽅登陸、註冊、搜索、修改個⼈信息、關注列表、粉絲列表、忘記密碼、查看個⼈信息、收入榜、 關注和取關、檢索等; 7、觀看直播 聊天信息、滾屏彈幕、禮物顯⽰、加載界⾯等; 8、統計 APP業務統計、第三⽅統計等; 9、超管 禁播、隱藏、審核等;
  3. 1. 先裝Homebrew 1. https://brew.sh/index_zh-tw 2. 裝nginx+rtmp 1. 下載:$ brew tap

    homebrew/nginx 1. Error: homebrew/nginx was deprecated. This tap is now empty as all its formulae were migrated. 1. $ brew tap denji/nginx 2. 安裝:$ brew install nginx-full --with-rtmp-module 1. Error: Your Xcode (10.1) is too outdated. Please update to Xcode 10.2.1 (or delete it). Xcode can be updated from the App Store.
  4. 3. 執⾏看看:$ nginx 1. http://localhost:8080 2. 如果遇到:nginx: [emerg] bind() to

    0.0.0.0:8080 failed (48: Address already in use) 1. lsof -i tcp:8080 2. kill {PID} 4. 修改配置: 1. $ brew info nginx-full 2. $ /usr/local/Cellar/nginx-full/{nginx version}/bin/nginx -s reload