以下簡述使用Youtube直播步驟。
http://yhsiang.logdown.com/posts/2014/04/16/stream-to-youtube-with-live-streaming-api
https://youtube-eng.googleblog.com/2014/10/watchme-live-stream.html
http://justinyang1221.blogspot.tw/2014/10/live-stream-youtubestreaming-to-youtube.html
將即時串流推送到串流伺服器 (推流)
https://github.com/jgh-/VideoCore
https://github.com/LaiFengiOS/LFLiveKit => 最好操作整合,很多人拿來二次開發
https://github.com/pili-engineering/PLMediaStreamingKit
顯示即時串流 (拉流)
https://github.com/Bilibili/ijkplayer
完整流程
以下是最後實作完驗證過的流程,這篇也講的很清楚。
http://octuplus.co/Detalles/2084/Cannot-make-transition-of-my-Youtube-broadcast-to-live-using-Youtube-API
So a bit unclear rule is:
- ensure you have broadcast and livestream created and ready.
and ensure that broadcast lifecycle status is notCOMPLETE
, otherwise recreate broadcast ... so ensure that your broadcast lifecycle status isready
- bind broadcast to livestream
- start publishing video to livestream
- wait for livestream status
active
- transition to
testing
(yes, you have to do it instead of moving tolive
) - wait for broadcast
lifeCycleStatus
to becometesting
- transition to
live
- wait for broadcast
lifeCycleStatus
to becomelive
You cannot skip
testing
and cannot transition from complete
to testing
or ready
.
沒有留言:
張貼留言
留個話吧:)