把直播系統包在一起的服務 Amazon Interactive Video Service:「Amazon Interactive Video Service – Add Live Video to Your Apps and Websites」。
這邊先抱怨一下,這個服務的網址是 https://aws.amazon.com/ivs/
,但 Elastic Load Balancer (ELB) 卻是 https://aws.amazon.com/elasticloadbalancing/
,這是差別待遇啊...
回到原來的主題,這個服務做了幾件事情。收到 RTMPS stream 後,他會轉成許多格式:
If you send the maximum 8.5Mbps, 1080p60 stream, Amazon IVS will create 8.5Mbps 1080p60, 3Mbps 720p60, 2Mbps 720p30, 1.2Mbps 480p30, 800Kbps 360p30, and 400Kbps 160p30 renditions in an ABR stream.
從這份列表可以看出他目前最高只支援 1080p60,而 1440p (2K) 或是 2160p (4K) 看起來都還不支援。
另外因為是包裝 AWS Elemental Media Services,所以有蠻多東西都一起可以拿進來用,像是廣告機制與 DRM,然後看起來可以選擇 CDN:
With AWS Elemental Media Services, you have a high level of control over all workflow components: transcoding and packaging configurations; levels of resilience; personalized ad insertion; and features like content protection for digital rights management (DRM). You also get to choose which video players and CDNs are used.
區域上只開了三區 (us-east-1
、us-west-2
與 eu-west-1
),但我在看 AWS 上的標價時整個搞混:

一開始看的時候在找單位但發現沒標,後來研究了一下看起來應該是 per hour?這樣標看起來很像是前面一萬個小時只要 USD$0.32 啊?
另外一個比較有趣的事情是,看起來不像是用 CloudFront 做,因為收費區域的區分跟 CloudFront 不太一樣,實際開下去後發現似乎是用 Twitch 的架構?
我試著開了一個,給了 a9a09e285166.us-east-1.playback.live-video.net
這樣的 endpoint,實際測試發現的確是某種 CDN,指到台灣的機房:
;; ANSWER SECTION:
a9a09e285166.us-east-1.playback.live-video.net. 56 IN A 23.160.0.254
a9a09e285166.us-east-1.playback.live-video.net. 56 IN A 192.108.239.254
實際 traceroute 後發現不是 CloudFront,但反解後發現 dig 拋出了 Justin.tv 的資訊:
;; AUTHORITY SECTION:
0.160.23.in-addr.arpa. 300 IN SOA ib-ens.sjc02.justin.tv. admin.justin.tv. 44 10800 3600 604800 300
;; AUTHORITY SECTION:
239.108.192.in-addr.arpa. 300 IN SOA ib-ens.sjc02.justin.tv. admin.justin.tv. 49 10800 3600 604800 300
然後 traceroute 可以發現跟 video-edge-6ab612.tpe03.abs.hls.ttvnw.net
(在 Twitch 上隨便找個實況抓的 hostname) 進到同一個機房 (在 router 還沒有擋下來的範圍),看起來就是拿 Twitch 的頻寬做事 XDDD
Twitch-as-a-service XDDD
這包會不會是 Twitch 掛 AWS 牌推出的服務啊 XDDD