Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Rust×mediasoupで作るビデオチャットシステム.pdf
Search
hotwatermorning
October 11, 2023
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rust×mediasoupで作るビデオチャットシステム.pdf
hotwatermorning
October 11, 2023
More Decks by hotwatermorning
See All by hotwatermorning
オーディオ処理入門 ボイスチェンジャーを作ろう
hotwatermorning
5
1k
Rust の中で TypeScript を書くには
hotwatermorning
0
540
Featured
See All Featured
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
590
Color Theory Basics | Prateek | Gurzu
gurzu
0
370
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
750
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
160
Site-Speed That Sticks
csswizardry
13
1.2k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
260
How People are Using Generative and Agentic AI to Supercharge Their Products, Projects, Services and Value Streams Today
helenjbeal
1
220
Designing for Timeless Needs
cassininazir
1
260
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
360
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
160
Being A Developer After 40
akosma
91
590k
Transcript
Copyright © LabBase, Inc. All Rights Reserved. Rust×mediasoup で作る ビデオチャットシステム
Copyright © LabBase, Inc. All Rights Reserved. 今日の発表について • 今日のデモサイトとコード
◦ https://mediasoup-test.diatonic.jp/ ◦ https://github.com/hotwatermorning/mediasoup-test • 今回の発表は、表題の内容について自分で調べて試してみたもの。 この技術について十分な知見があるとは言えないのでその点 ご容赦下さい。
Copyright © LabBase, Inc. All Rights Reserved. 会社紹介
Copyright © LabBase, Inc. All Rights Reserved. 会社紹介
Copyright © LabBase, Inc. All Rights Reserved. 弊社はRust推しです • 来週21日(土)のRust
Tokyo 2023に シルバースポンサーとして協賛してます ◦ https://rust.tokyo/2023 • 弊社での開発に興味があったらぜひカジュアル面談 しましょう! ◦ https://herp.careers/v1/polinc/QWQuVQIx8WH5
Copyright © LabBase, Inc. All Rights Reserved. 自己紹介 湯朝剛介 (@hotwatermorning)
• 前職ではC++でオーディオアプリケーションを開発 • いまは株式会社LabBaseで、TypeScriptとRustを使って Webサービスを開発している • 趣味はプログラミングと作曲(DTM) • 「C++ポケットリファレンス」 (技術評論社)共著
Copyright © LabBase, Inc. All Rights Reserved. 目次 • mediasoupとは
• Rust×mediasoupで何ができるのか • デモ • 参考情報など
Copyright © LabBase, Inc. All Rights Reserved. 01.mediasoupとは
Copyright © LabBase, Inc. All Rights Reserved. mediasoupとは? WebRTC SFUのためのライブラリ
https://mediasoup.org/
Copyright © LabBase, Inc. All Rights Reserved. mediasoupとは? WebRTC (Web
Real-Time Communication) • Webブラウザやモバイルアプリなどでリアルタイム通信をする技術 • 音声/ビデオ/バイナリデータをP2Pでやり取りできる • Webと付いているが、アプリやゲームからも利用できる
Copyright © LabBase, Inc. All Rights Reserved. mediasoupとは? SFU (Selective
Forwarding Unit) • WebRTCのP2P通信は、参加者が増えるほど帯域を消費する ◦ 例えば5人がフルメッシュでP2P通信すると、それぞれの参加者が自身を 除く4人すべてにデータを送受信する必要がある • これを防ぐために、各参加者の通信を集約して配信するための仕組み https://dev.to/devalexiou/the-multiple-faces-of-webrtc-n-peer-calling-mesh-mcu-and-sfu-39dg
Copyright © LabBase, Inc. All Rights Reserved. mediasoupとは? つまりmediasoupを使うと •
複数人が参加可能な、WebRTCによるビデオチャットのシステムを 構築できる。
Copyright © LabBase, Inc. All Rights Reserved. mediasoupとは? mediasoupの特徴 •
バックエンド(サーバーサイド)側のAPIとしてC++, Node, Rustをサポート • フロントエンド側のAPIとしてC++, JavaScript をサポート • サーバーではなく単体のライブラリとして提供されている ◦ 他のアプリケーションに組み込みやすい
Copyright © LabBase, Inc. All Rights Reserved. 02.Rust×mediasoupで 何ができるか
Copyright © LabBase, Inc. All Rights Reserved. Rust×mediasoupで何ができるか mediasoupとRust •
mediasoupはバックエンド側のAPIでRustをサポートしている • => Rust製のWebアプリケーションにビデオチャットシステムを 組み込みやすい ◦ フロントエンドはJavaScriptかC++で書く必要あり
Copyright © LabBase, Inc. All Rights Reserved. Rust×mediasoupで何ができるか mediasoupの機能 •
SFU • IPv6 Ready • Simulcast and SVC • 輻輳制御 • 録画(GStreamer, FFmpeg) • などなど・・・
Copyright © LabBase, Inc. All Rights Reserved. 03.デモ
Copyright © LabBase, Inc. All Rights Reserved. デモ
Copyright © LabBase, Inc. All Rights Reserved. 04.参考情報など
Copyright © LabBase, Inc. All Rights Reserved. 参考情報など • mediasoup公式サイト
(https://mediasoup.org/) • 時雨堂のWebRTC入門イベント ◦ 自社でSFUを開発している時雨堂の人が時々やっている WebRTCの入門イベント ◦ めちゃめちゃ勉強になるので興味ある人はおすすめです • WebRTC Meetup (https://webrtcmeetup.connpass.com/) ◦ WebRTCのコミュニティ ◦ 過去の勉強会の資料や動画が上がっていてめちゃめちゃ参考になります • console.lealog(); (https://lealog.hateblo.jp/) ◦ mediasoupの仕組みについて分かりやすく解説されています
Copyright © LabBase, Inc. All Rights Reserved. ありがとう ございました!
Copyright © LabBase, Inc. All Rights Reserved.