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
440
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.4k
Multimedia Security Topics
yaminoma
0
2.1k
コロナ禍でのライブストリーミングの変化とテレビ放送の規格について
yaminoma
0
970
今日から分かる Android Audioの全て
yaminoma
0
400
Apple Low-Latency HLSを使った 超低遅延配信について
yaminoma
3
4.7k
今日から分かる AVAudioEngineの全て
yaminoma
4
5.9k
PHPとRustを組み合わせて音声ファイルをエンコードする話
yaminoma
0
3.3k
字幕のはなし
yaminoma
4
1.7k
Other Decks in Programming
See All in Programming
エンジニアに許された特別な時間の終わり
watany
88
79k
보일러플레이트 코드가 진짜 나쁜 건가요?
gaeun5744
0
330
イベントソーシングによってインピーダンスミスマッチから解放された話
tkawae
1
260
もう一人で悩まない! 個の知見をチームの知見にする3つの習慣と工夫 / Into team knowledge.
honyanya
3
500
Effective Signals in Angular 19+ Rules and Helpers
manfredsteyer
PRO
0
150
Scala 3 で GLSL のための c-like-for を実装してみた
exoego
1
160
CloudRun, Spanner に対する負荷試験の反省と オブザーバビリティによるアプローチ
oyasumipants
1
250
安全に倒し切るリリースをするために:15年来レガシーシステムのフルリプレイス挑戦記
sakuraikotone
5
1.6k
SwiftUIのObservationツールの挙動をテストしてみた
kenshih522
0
100
CIBMTR振り返り+敗北から学ぶコンペの取り組み方反省
takanao
1
470
SREチームのタスク優先度と向き合う Road to SRE NEXT@札幌
nealle
0
140
Expoによるアプリ開発の現在地とReact Server Componentsが切り開く未来
yukukotani
2
370
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
Designing for Performance
lara
605
69k
VelocityConf: Rendering Performance Case Studies
addyosmani
328
24k
Git: the NoSQL Database
bkeepers
PRO
429
65k
Large-scale JavaScript Application Architecture
addyosmani
511
110k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
251
21k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
4
430
Fantastic passwords and where to find them - at NoRuKo
philnash
51
3.1k
Optimizing for Happiness
mojombo
377
70k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
134
33k
Making Projects Easy
brettharned
116
6.1k
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.4k
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.
&/%