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
410
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
13k
動画配信技術について
yaminoma
1
1.2k
Multimedia Security Topics
yaminoma
0
2k
コロナ禍でのライブストリーミングの変化とテレビ放送の規格について
yaminoma
0
930
今日から分かる Android Audioの全て
yaminoma
0
360
Apple Low-Latency HLSを使った 超低遅延配信について
yaminoma
3
4.4k
今日から分かる AVAudioEngineの全て
yaminoma
4
5.6k
PHPとRustを組み合わせて音声ファイルをエンコードする話
yaminoma
0
3.1k
字幕のはなし
yaminoma
4
1.7k
Other Decks in Programming
See All in Programming
『ドメイン駆動設計をはじめよう』のモデリングアプローチ
masuda220
PRO
7
430
現場で役立つモデリング 超入門
masuda220
PRO
12
2.9k
Universal Linksの実装方法と陥りがちな罠
kaitokudou
1
220
Vitest Browser Mode への期待 / Vitest Browser Mode
odanado
PRO
2
1.7k
デプロイを任されたので、教わった通りにデプロイしたら障害になった件 ~俺のやらかしを越えてゆけ~
techouse
52
32k
Nuxt UI Pro、NuxtHub、Nuxt Scripts、Nuxtエコシステムをふんだんに利用して開発するコーポレートサイト@Vue Fes Japan 2024
shingangan
3
890
Why Spring Matters to Jakarta EE - and Vice Versa
ivargrimstad
0
960
Honoの来た道とこれから
yusukebe
19
3k
CSC509 Lecture 09
javiergs
PRO
0
100
LLM生成文章の精度評価自動化とプロンプトチューニングの効率化について
layerx
PRO
2
130
Piniaの現状と今後
waka292
5
1.4k
Vue SFCのtemplateでTypeScriptの型を活用しよう
tsukkee
3
1.5k
Featured
See All Featured
Designing Dashboards & Data Visualisations in Web Apps
destraynor
228
52k
Making the Leap to Tech Lead
cromwellryan
132
8.9k
Keith and Marios Guide to Fast Websites
keithpitt
408
22k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
504
140k
Building Applications with DynamoDB
mza
90
6.1k
Designing the Hi-DPI Web
ddemaree
280
34k
Adopting Sorbet at Scale
ufuk
73
9k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
159
15k
Navigating Team Friction
lara
183
14k
Thoughts on Productivity
jonyablonski
67
4.3k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
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.
&/%