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
400
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.1k
Multimedia Security Topics
yaminoma
0
1.8k
コロナ禍でのライブストリーミングの変化とテレビ放送の規格について
yaminoma
0
910
今日から分かる Android Audioの全て
yaminoma
0
350
Apple Low-Latency HLSを使った 超低遅延配信について
yaminoma
3
4.3k
今日から分かる AVAudioEngineの全て
yaminoma
4
5.5k
PHPとRustを組み合わせて音声ファイルをエンコードする話
yaminoma
0
3k
字幕のはなし
yaminoma
4
1.6k
Other Decks in Programming
See All in Programming
Jakarta EE meets AI
ivargrimstad
0
380
Ruby Parser progress report 2024
yui_knk
2
230
Ebitengineの1vs1ゲーム WebRTCの活用
ponyo877
0
380
サーバーレスで負荷試験!Step Functions + Lambdaを使ったk6の分散実行
shuntakahashi
6
1.5k
全部見せます! クラシルリワードのSwiftTesting移行プロジェクト
uetyo
0
210
Some more adventure of Happy Eyeballs
coe401_
2
180
The Sequel to a Dream of Ruby Parser's Grammar
ydah
1
220
Rubyとクリエイティブコーディングの輪の広がり / The Growing Circle of Ruby and Creative Coding
chobishiba
1
270
長期運用プロダクトの開発速度を維持し続けるためのリファクタリング実践例
wataruss
8
2.7k
Jakarta EE meets AI
ivargrimstad
1
480
状態管理ライブラリZustandの導入から運用まで
k1tikurisu
3
470
マイグレーションコード自作して File-Based Routing に自動移行!! ~250 ページの歴史的経緯を添えて~
cut0
1
260
Featured
See All Featured
YesSQL, Process and Tooling at Scale
rocio
167
14k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
23
1.7k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
41
6.5k
Why You Should Never Use an ORM
jnunemaker
PRO
53
8.9k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
28
1.6k
Web development in the modern age
philhawksworth
204
10k
Designing the Hi-DPI Web
ddemaree
278
34k
Mobile First: as difficult as doing things right
swwweet
221
8.8k
For a Future-Friendly Web
brad_frost
174
9.3k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
248
20k
Designing for humans not robots
tammielis
248
25k
The Invisible Side of Design
smashingmag
295
50k
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.
&/%