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
PRO
October 11, 2023
1.3k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rust×mediasoupで作るビデオチャットシステム.pdf
hotwatermorning
PRO
October 11, 2023
More Decks by hotwatermorning
See All by hotwatermorning
オーディオ処理入門 ボイスチェンジャーを作ろう
hotwatermorning
PRO
5
1.1k
Rust の中で TypeScript を書くには
hotwatermorning
PRO
0
540
Featured
See All Featured
A Soul's Torment
seathinner
6
3.1k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
330
We Have a Design System, Now What?
morganepeng
55
8.2k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2.1k
The agentic SEO stack - context over prompts
schlessera
0
840
Designing for Timeless Needs
cassininazir
1
340
Crafting Experiences
bethany
1
210
Being A Developer After 40
akosma
91
590k
Are puppies a ranking factor?
jonoalderson
1
3.7k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
260
The Cult of Friendly URLs
andyhume
79
6.9k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
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.