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.5k
今日から分かる AVAudioEngineの全て
yaminoma
4
5.7k
PHPとRustを組み合わせて音声ファイルをエンコードする話
yaminoma
0
3.2k
字幕のはなし
yaminoma
4
1.7k
Other Decks in Programming
See All in Programming
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
350
Webエンジニア主体のモバイルチームの 生産性を高く保つためにやったこと
igreenwood
0
330
アクターシステムに頼らずEvent Sourcingする方法について
j5ik2o
4
160
Full stack testing :: basic to basic
up1
1
930
快速入門可觀測性
blueswen
0
310
From Translations to Multi Dimension Entities
alexanderschranz
2
130
Security_for_introducing_eBPF
kentatada
0
110
The rollercoaster of releasing an Android, iOS, and macOS app with Kotlin Multiplatform | droidcon Italy
prof18
0
150
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
複雑な仕様に立ち向かうアーキテクチャ
myohei
0
170
これが俺の”自分戦略” プロセスを楽しんでいこう! - Developers CAREER Boost 2024
niftycorp
PRO
0
190
Featured
See All Featured
It's Worth the Effort
3n
183
28k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
26
1.9k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
59k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
2
160
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Music & Morning Musume
bryan
46
6.2k
How GitHub (no longer) Works
holman
311
140k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
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.
&/%