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
Streaming Segment Parser
Search
Yiqi Yan
October 14, 2019
Programming
170
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Streaming Segment Parser
Internship project at Amazon Prime Video
Yiqi Yan
October 14, 2019
More Decks by Yiqi Yan
See All by Yiqi Yan
master_thesis_defense
saoyan
0
280
Bachelor's Thesis - Oral Defense
saoyan
0
470
Deep Learning for Object Detection
saoyan
0
200
Surveillance Video Analysis
saoyan
0
760
Other Decks in Programming
See All in Programming
Building an Out-of-Order CPU
latte72
0
670
이 함수, 실패하면 어떻게 되나요? null부터 Rich Errors까지, Kotlin 에러 처리 15년
haeti2
0
130
【デモ】Kiroで体験する仕様駆動開発|設計からコーディングまでAIと進める開発フロー
cmkudo
0
570
片田舎のおっさん、 Swift Buildのダイアモンド問題解決の不具合修正PRを出すが、解決方法がキャッシュをしないようにすることであり、ビルド時間が伸びると言われてマージされないので高速化もする/swiftbuild
yimajo
0
360
[DroidKaigi 2026] Bring your own phones to Gradle Managed Devices
f2lk
0
110
初心者DevRelとして参加者だった私が、DevRel Talks!#2に登壇するまでにしてきたこと
sokohirai
0
330
Flow は今どうなっているか
mizdra
PRO
0
920
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
370
typoなんかねぇよ
raspython3
0
660
まだ間に合う!今年の夏こそSchemeのマクロ展開器を完全理解!
omasanori
0
630
Gmail/Google DriveをトリガーにAIエージェントを動かそう! / Run AI agents with Gmail/Google Drive as triggers!
har1101
3
460
Vibes Containers 〜AIで変わるコンテナ設計と運用〜
tkikuc
1
470
Featured
See All Featured
Discover your Explorer Soul
emna__ayadi
2
1.3k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Rails Girls Zürich Keynote
gr2m
96
14k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
450
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
290
Designing Experiences People Love
moore
143
24k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
360
Transcript
STREAMING SEGMENT PARSER PRESENTED BY YIQI YAN XP PLAYER INTERN
PRESENTATION
CONTENTS ▸ ISO-BMFF Parser ▸ Current Design ▸ Proposed Design
▸ Implementation ▸ Demo & Analysis
ISO-BMFF PARSER bytes box segment box parser segment parser
ISO-BMFF PARSER bytes box segment box parser segment parser
ISO-BMFF PARSER bytes box segment box parser segment parser
ISO-BMFF PARSER bytes box segment box parser segment parser MEDIA
DATA
CURRENT DESIGN ▸ Fully synchronous process ▸ Unnecessary latency ▸
Each stage relies on the completeness of the previous one ▸ The decoder has to wait for the entire segment while it is able to perform on separate media samples
PROPOSED DESIGN ▸ Asynchronous process ▸ Whenever some data is
downloaded, pass it to the parser. ▸ Whenever some media sample is available, send it to the decoder.
CURRENT DESIGN
CURRENT DESIGN bytes box segment box parser segment parser
CURRENT DESIGN bytes box segment box parser segment parser
CURRENT DESIGN bytes box segment box parser segment parser
CURRENT DESIGN bytes box box parser segment parser segment
PROPOSED DESIGN bytes box box parser segment parser segment
PROPOSED DESIGN bytes box box parser segment parser segment
PROPOSED DESIGN bytes box box parser segment parser segment
PROPOSED DESIGN bytes box box parser segment parser segment
PROPOSED DESIGN bytes box box parser segment parser segment
PROPOSED DESIGN bytes box box parser segment parser segment
PROPOSED DESIGN bytes box box parser segment parser segment
PROPOSED DESIGN bytes box box parser segment parser segment
IMPLEMENTATION STREAM-BASED IMPLEMENTATION ▸ Third-party stream processing library ▸ Doesn’t
have control of implementation details - potential performance problem ▸ Relies on primitive Node modules - not supported on Roku
IMPLEMENTATION EVENT-BASED IMPLEMENTATION
DEMO & ANALYSIS Audio Segment Video Segment (encrypted) Trailer Segment
(non-encrypted) number of media samples 47 109 69 size of segment (kB) ~17 ~744 ~1485 metrics ▸ time to first sample (tFirst, ms) ▸ time to last sample (tLast, ms) environment ▸ 2.5GHz Intel i7 processor ▸ 16GB memory (2133 MHz LPDDR3) ▸ macOS Mojave ▸ node.js 10
DEMO & ANALYSIS AUDIO SEGMENT (500 RUNS)
DEMO & ANALYSIS VIDEO SEGMENT (ENCRYPTED, 500 RUNS)
DEMO & ANALYSIS TRAILER SEGMENT (NON-ENCRYPTED, 500 RUNS)
TO DO ▸ Integration to XP player framework ▸ Event-based
decoder ▸ Error handling ▸ Performance measurement in real case ▸ With pre-buffer ▸ Counting decoding time
Q&A Q & A