Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Rust×mediasoupで作るビデオチャットシステム.pdf
Search
hotwatermorning
PRO
October 11, 2023
1.4k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rust×mediasoupで作るビデオチャットシステム.pdf
hotwatermorning
PRO
October 11, 2023
Transcript
22 slides
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.
More Decks by hotwatermorning
See All by hotwatermorning
オーディオ処理入門 ボイスチェンジャーを作ろう
hotwatermorning
PRO
5
1.1k
Rust の中で TypeScript を書くには
hotwatermorning
PRO
0
570
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
306
120k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.7k
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Designing for humans not robots
tammielis
254
26k
WENDY [Excerpt]
tessaabrams
15
41k
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
640
The Spectacular Lies of Maps
axbom
PRO
1
1.2k
Building Flexible Design Systems
yeseniaperezcruz
330
41k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
2
6.5k
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
2
2.2k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
500
Avoiding the “Bad Training, Faster” Trap in the Age of AI
tmiket
1
320