Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Speaker Deck
PRO
Sign in
Sign up for free
Cross Platform Video Player
Shumpei Urabe
September 09, 2020
Programming
0
190
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
動画配信技術について
yaminoma
0
260
Multimedia Security Topics
yaminoma
0
560
コロナ禍での ライブストリーミングの変化と テレビ放送の規格について
yaminoma
0
420
今日から分かる Android Audioの全て
yaminoma
0
150
Apple Low-Latency HLSを使った 超低遅延配信について
yaminoma
3
1.9k
今日から分かる AVAudioEngineの全て
yaminoma
3
3.2k
PHPとRustを組み合わせて音声ファイルをエンコードする話
yaminoma
0
1.6k
Androidで スクリーン配信をする技術
yaminoma
0
200
字幕のはなし
yaminoma
4
1.1k
Other Decks in Programming
See All in Programming
ES2022の新機能
smt7174
0
240
Jetpack Compose, 어디까지 알고 있을까?
jisungbin
0
110
競プロのすすめ
uya116
0
660
Android スキルセットをフル活用して始めるスマートテレビアプリ開発
satsukies
1
190
LINE Messaging APIの概要 - LINE API総復習シリーズ
uezo
1
180
短納期でローンチした新サービスをJavaで開発した話/launched new service using Java
eichisanden
6
1.9k
UI Testing of Jetpack Compose Apps, AppDevCon
alexzhukovich
0
160
Scrum Fest Osaka 2022/5年で200人になったスタートアップの アジャイル開発の歴史とリアル
atamaplus
1
880
Jetpack Composeでの画面遷移
iwata_n
0
140
Lancersをコンテナへ本番移行する取り組み
rvirus0817
1
290
How we run a Realtime Puzzle Fighting Game on AWS Serverless
falken
0
250
Beyond Micro Frontends: Frontend Moduliths for the Enterprise @enterjs2022
manfredsteyer
PRO
0
170
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
119
28k
Product Roadmaps are Hard
iamctodd
34
6.5k
In The Pink: A Labor of Love
frogandcode
131
21k
Keith and Marios Guide to Fast Websites
keithpitt
404
21k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
349
27k
Navigating Team Friction
lara
175
11k
BBQ
matthewcrist
74
7.9k
Faster Mobile Websites
deanohume
294
28k
Side Projects
sachag
450
37k
5 minutes of I Can Smell Your CMS
philhawksworth
196
18k
Code Reviewing Like a Champion
maltzj
506
37k
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
7
1.1k
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.
&/%