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
14k
動画配信技術について
yaminoma
1
1.2k
Multimedia Security Topics
yaminoma
0
2k
コロナ禍でのライブストリーミングの変化とテレビ放送の規格について
yaminoma
0
940
今日から分かる Android Audioの全て
yaminoma
0
370
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
Enabling DevOps and Team Topologies Through Architecture: Architecting for Fast Flow
cer
PRO
0
370
見せてあげますよ、「本物のLaravel批判」ってやつを。
77web
7
7.9k
WebAssembly Unleashed: Powering Server-Side Applications
chrisft25
0
1.1k
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
3
750
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
1
110
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.5k
みんなでプロポーザルを書いてみた
yuriko1211
0
290
Hotwire or React? ~アフタートーク・本編に含めなかった話~ / Hotwire or React? after talk
harunatsujita
1
120
3 Effective Rules for Using Signals in Angular
manfredsteyer
PRO
0
130
Kaigi on Rails 2024 〜運営の裏側〜
krpk1900
1
290
最新TCAキャッチアップ
0si43
0
230
RubyLSPのマルチバイト文字対応
notfounds
0
120
Featured
See All Featured
For a Future-Friendly Web
brad_frost
175
9.4k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Why Our Code Smells
bkeepers
PRO
334
57k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.8k
The Cult of Friendly URLs
andyhume
78
6k
Into the Great Unknown - MozCon
thekraken
33
1.5k
Documentation Writing (for coders)
carmenintech
65
4.4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
KATA
mclloyd
29
14k
How STYLIGHT went responsive
nonsquared
95
5.2k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
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.
&/%