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
Cross Platform Video Player
Search
Shumpei Urabe
September 09, 2020
Programming
0
470
Cross Platform Video Player
Tokyo Video Tech #8 Shift
https://www.meetup.com/ja-JP/Tokyo-Video-Tech/events/273026420/
Shumpei Urabe
September 09, 2020
Tweet
Share
More Decks by Shumpei Urabe
See All by Shumpei Urabe
AIを活用した放送技術スタートアップの制作現場改革について
yaminoma
0
14k
動画配信技術について
yaminoma
1
1.5k
Multimedia Security Topics
yaminoma
0
2.3k
コロナ禍でのライブストリーミングの変化とテレビ放送の規格について
yaminoma
0
990
今日から分かる Android Audioの全て
yaminoma
0
430
Apple Low-Latency HLSを使った 超低遅延配信について
yaminoma
4
4.9k
今日から分かる AVAudioEngineの全て
yaminoma
4
6k
PHPとRustを組み合わせて音声ファイルをエンコードする話
yaminoma
0
3.4k
字幕のはなし
yaminoma
4
1.7k
Other Decks in Programming
See All in Programming
AIコーディング道場勉強会#2 君(エンジニア)たちはどう生きるか
misakiotb
1
280
GitHub Copilot and GitHub Codespaces Hands-on
ymd65536
2
140
WindowInsetsだってテストしたい
ryunen344
1
230
エラーって何種類あるの?
kajitack
5
340
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
470
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
490
XP, Testing and ninja testing
m_seki
3
220
Goで作る、開発・CI環境
sin392
0
190
LINEヤフー データグループ紹介
lycorp_recruit_jp
0
1.8k
ISUCON研修おかわり会 講義スライド
arfes0e2b3c
0
300
Team operations that are not burdened by SRE
kazatohiei
1
290
A2A プロトコルを試してみる
azukiazusa1
2
1.3k
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
181
53k
Product Roadmaps are Hard
iamctodd
PRO
54
11k
Agile that works and the tools we love
rasmusluckow
329
21k
Into the Great Unknown - MozCon
thekraken
39
1.9k
Building a Scalable Design System with Sketch
lauravandoore
462
33k
YesSQL, Process and Tooling at Scale
rocio
173
14k
Build your cross-platform service in a week with App Engine
jlugia
231
18k
Designing for humans not robots
tammielis
253
25k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
124
52k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
500
The Art of Programming - Codeland 2020
erikaheidi
54
13k
Transcript
$SPTT1MBUGPSN7JEFP1MBZFS 4FQUFNCFSUI /"9" --$"MM3JHIUT3FTFSWFE
4IVNQFJ63"#& /"9" --$$&0
$SPTTQMBUGPSN
J04 "OESPJE NBD04 8JOEPXT
UseCase • Play Video from File • Get Raw Video
Buffer
Supported Codecs iOS macOS Android Windows H.264 H.264 H.264 H.264
H.265 H.265 H.265 H.265 VP8 VP8 VP9 VP9
None
Supported Codecs iOS macOS Android Windows H.264 H.264 H.264 H.264
H.265 H.265 H.265 H.265 VP8 VP8 VP9 VP9
None
Supported Codecs iOS macOS Android Windows H.264 H.264 H.264 H.264
H.265 H.265 H.265 H.265 VP8 VP8 VP9 VP9
8IBUEPZPVBDUVBMMZEP
6TF044UBOEBSE"1*
iOS / macOS 1. AVPlayer(AVFoundation) 2. VTDecompressionSession to MTKView
iOS / macOS 1. AVPlayer(AVFoundation) 2. VTDecompressionSession to MTKView
iOS / macOS VTDecompressionSession CVMetalTexture MTKView CVMetalTextureCache MTLTexture
Android 1. ExoPlayer (Google OSS) 2. MediaCodec to SurfaceView
Android 1. ExoPlayer (Google OSS) 2. MediaCodec to SurfaceView
Android MediaExtractor MediaCodec SurfaceView
Windows 1. MediaFoundation.MediaEngine 2. MediaFoundation.MFCreateVideoRenderer
Windows 1. MediaFoundation.MediaEngine 2. MediaFoundation.MFCreateVideoRenderer
Windows Set up Video sink (Enhanced Video Renderer) Set up
Video source. Create a media type and set on the source and sink. Set up event handler for sink events. Srart the sample loop.
None
WMDPSNQW
mpv
mpv • Famous as a video player. • Backend is
ffmpeg. • There is a libmpv that can be used as a library.
libmpv • embedded into other programs as video/audio playback backend.
• Compared to other libraries, it is very simple to use.
libmpv 1. Embed Native Window (Windows / X11) 2. Rendering
API (OpenGL)
Basic Usage mpv_handle *ctx = mpv_create(); mpv_initialize(ctx); const char *cmd[]
= {"loadfile", filename, NULL}; mpv_command(ctx, cmd);
OpenGL
Native Window Renderer (Windows) _mpvHandle = _mpvCreate.Invoke(); _mpvInitialize.Invoke(_mpvHandle); _mpvSetOption(_mpvHandle, GetUtf8Bytes("wid"),
mpvFormatInt64, ref windowId); DoMpvCommand("loadfile", filename);
Tips • If you use libmpv, you can't handle the
raw buffer. • mpv iOS build is pretty hard to do.
Tips You can use libvlc to get a buffer on
callback.
&/%