SlideShare a Scribd company logo
Video Killed My Data Plan
How to Deliver Video Quickly, Beautifully, and without stalls
Doug Sillars
NodeJS Edinburgh
February 5, 2019
@DougSillars
Contact Me:
@DougSillars
Doug.Sillars@gmail.com
www.dougsillars.com
Doug Sillars
Freelance Developer Relations
Performance Audits: Web/Native
Workshops:
Performance/Images/Video
http://bit.ly/HighPerformanceAndroidApps
Video Consumption is Growing
https://www.recode.net/2017/6/8/15757594/future-internet-traffic-watch-live-video-facebook-google-netflix
Video Killed My Data Plan
Study of the Web
https://Webpagetest.org https://httparchive.org
WebPageTest
Tests Websites on Remote
Browsers
1. Enter Website
2. Set Test Location
3. Choose Device & Browser
4. Options
5. GO!
WebPageTest
Video Consumption is Growing
HTTPArchive: Sites with Video 15/6 crawls: 2017, & 2018 (out of 500k sites)
Video Use on the Web
HTTPArchive
Video Use on the Web
HTTPArchive
Video Use on the Web
HTTPArchive
Video Use on the Web
HTTPArchive
Video Quality Metrics
1.Does the Video Start?
2.Does the Video Stall?
3.Does it Look Good?
Video Quality Metrics
1.Does the Video Start?
2.Does the Video Stall?
3.Does it Look Good?
Video Delivery Optimisation will
solve many of these issues!
15
Video
Buffer Rage: a state of uncontrollable
fury or violent anger induced by delayed
or interrupted streaming video content
http://www.ineoquest.com/press-releases/new-research-reveals-buffer-rage-as-techs-newest-epidemic
Video Startup
Conviva creen_Streaming_TV_Census_Report_FINAL.pdf
Q1 2018: Video Startup
16.9B total Video plays
400M Fail to Start
2B Abandoned before Start
~800M hours of video
playback lost
Video Fails To Start
Video Startup Failure
Video Startup
Conviva creen_Streaming_TV_Census_Report_FINAL.pdf
Q1 2018: Video Startup
Average Video Start Time:
N. America: 4.91s
Asia: 3.00s
Europe: 4.30s
Video Startup Delay
After 2 seconds,
every additional
second corresponds
to 5.8% increase in
abandonment
https://www.akamai.com/kr/ko/multimedia/documents/technical-publication/video-stream-quality-impacts-viewer-behavior-inferring-causality-using-quasi-experimental-designs-technical-publication.pdf
Video Startup Delay
https://www.akamai.com/kr/ko/multimedia/documents/technical-publication/video-stream-quality-impacts-viewer-behavior-inferring-causality-using-quasi-experimental-designs-technical-publication.pdf
Sites with Video: Mobile V. Desktop
HTTPArchive: Sites with Video 7/15/2018
Mobile:
36,485
Desktop:
55,048
Sites with Video: Mobile V. Desktop
HTTPArchive: Sites with Video 7/15/2018
36,485 55,048
30,442
Sites with Video: Mobile V. Desktop
HTTPArchive: Sites with Video 7/15/2018
36,485 55,048
30,442
83% of mobile
Desktop: 207k video requests
Mobile: 185k video requests
19% of videos are IDENTICAL on
desktop and mobile
Video Quality Metrics
1.Does the Video Start?
2.Does the Video Stall?
3.Does it Look Good?
19% of videos are IDENTICAL on
desktop and mobile
Image Optimization
Image Quality
(85% or SSIM)
Image Format
Responsive Image
Image Optimization
2.53 MB
1.68MB
1.28 MB
1.24MB (WebP)
204 KB (1400px wide)
Image Quality
(85% or SSIM)
Image Format
Responsive Image
http://res.cloudinary.com/dougsillars/image/upload/q_auto,f_auto,w_1400/v1532673490/IMG_20150625_192917267_o4
bvyk.jpg
Image Optimization
HTTPArchive 15/06/2018
Video Optimization?
HTTPArchive 15/06/2018
Video
Video Compression
• Video is broken into a Group of Pictures (GOP)
• I-Frame: Full Image
• P-Frame: uses vectors to forward predict colors (50% size of I-Frame)
• B: Frame: Forward/backward predicted with vectors (25% size of I-
Frame)
https://en.wikipedia.org/wiki/Inter_frame#P-frame
Video Compression over Time
• P-Frames
Video Compression over Time
• B-Frames
Video Compression over Time
• P & B Frame vectors
Animated GIFs
Animated GIFs
“The Graphics Interchange Format is not
intended as a platform for animation, even
though it can be done in a limited way.”
-GIF89a Specification
https://www.w3.org/Graphics/GIF/spec-gif89a.txt
Animated GIFs
Original MP4
1.4 MB
Animated GIFs
Animated GIF
3.8 MB
270% larger
Animated GIFs
No GOP Compression
Animated GIFs: as Video?
MP4: 256 colors
247KB
93% smaller
Animated GIFs: Social Media
Animated GIFs: Social Media
#FAKENEWS
Animated GIFs: Social Media
Animated GIFs: as Video!
Video Tags:
<video loop autoplay muted playsinline controls = "false” src="goats.mp4”/>
Img tags are fast!
<picture>
<source type="video/mp4" srcset=”goats.mp4">
<source type="image/webp" srcset=”goats.webp">
<img src=”goats.gif">
</picture>
https://calendar.perfplanet.com/2017/animated-gif-without-the-gif/
Video Stats: File Extensions
Video: Different Size Screens
• (at least) 19% of all videos are identical on mobile and desktop
Video: Different Size Screens
• (at least) 19% of all videos are identical on mobile and desktop
17 MB
960 x 540
83s
1.78 MBPS
Video: Different Size Screens
• (at least) 19% of all videos are identical on mobile and desktop
17 MB
960 x 540
83s
1.78 MBPS
Video: Different Size Screens
• (at least) 19% of all videos are identical on mobile and desktop
17 MB
960 x 540
83s
1.78 MBPS
Downscale to 1.37 MBPS:
http://res.cloudinary.com/dougsill
ars/video/upload/vc_auto/v15334
48727/asset_1800K_ncjqnf.mp4
Quality = 70
Audio 22k
13.3 MB (22% savings)
640x360: 6.4 MB (62% savings)
Video: Don’t Download More on Mobile
Desktop Mobile
Video: Don’t Download More on Mobile
Desktop Mobile
@media only screen and (min-width:1024px)
Don’t Download Video That Is Not Displayed
Video
Preload = “auto”
Only use with high probability video views!
Video Preload
• preload = “metadata”
• Only downloads first x% of the video
Video Preload
• preload = “metadata”
• Only downloads first x% of the video
Video Preload
• preload = “metadata”
• Only downloads first x% of the video
Video Preload
• preload = “metadata”
150s
1920x1080
Full Length: 97MB
Use with discretion. Mind your
customer’s data plans.
Video: Preload
• preload = “auto||metadata”
Best Practices:
• Auto: Avoid unless high probability of play
• Metadata: medium probability of play – YMMV
Background Video
Video Background
Video (as Downloaded): 5.3 MB
Video 5 MB
Audio 250 KB 5% of file
Best Practice:
To save bandwidth, remove the audio stream from videos that
are played silently.
Video Background: Mobile
Best Practice:
If Viewport will not support Video…
Don’t Download it
Background Video
Video Background
Video Background
33.6 MB
27s
2560 x 1226
10 MBPS
Video Background
Best Practice:
Resize Video to reasonable size.
33.6 MB
27s
2560 x 1226
10 MBPS
Video Background
Best Practice:
Resize Video to reasonable size.
PROTIP: Renaming the file is not enough…
Video Resizing
• 1920x1080: 8.1 MB
• 1280x720: 4.3 MB
• 1080x608: 3.3 MB
• 720x405: 1.76 MB
http://res.cloudinary.com/dougsillars/video/upload/vc_auto,w_720/v1533591785/depend_p2ryou.mp4
Video Background: Mobile
Video Is Not Cheap
Video Is Not Cheap
Video Is Not Cheap
Video Is Not Cheap
Video Is Not Cheap
After 20 free videos
Each Video Download costs:
Video Is Not Cheap
Video Is Not Cheap
Best Practices (So Far…)
1. DPR: Use Judiciously on mobile.
2. If Video will be hidden…Don’t Download it. (Resize
it!)
3. Avoid preload = Auto.
1. Be careful with preload=metadata.
4. For Silent Movies: Strip out audio track.
5. Don’t duplicate Video Traffic.
6. Big Files Can Cost Big $$
7. Respect your Mobile Users’ data plans.
Video Streaming
Video Streaming
Manifest File:
List of Available
Streams
Player Chooses a Stream Stream Manifest:
List of Video Segments
Player Downloads
Segments into buffer
Video Plays
Video Plays
Optimizing Video Delivery
Video Streaming
Player can estimate
network throughput
Optimal video Bitrate
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8
Video Tracks
Video Tracks (iFrames)
Audio Tracks &
Subtitles
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8
Video Tracks
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8
Video Streaming
HTTPArchive: Sites with Video 7/15/2018
30,442 sites
83% of mobile
15,985 mobile TS files
14,081 desktop TS files
Desktop => Mobile
1,928 TS files are identical
Approximates First Stream Choice
Optimizing Video Delivery
Video Streaming
Manifest File:
List of Available
Streams
Player selects high
bitrate stream Stream Manifest:
List of Video Segments
Buffer takes a long
time to fill
Video Does Not Play
Player chooses low
bitrate
Buffer Fills Quickly
Video Plays
Video Startup
Conviva creen_Streaming_TV_Census_Report_FINAL.pdf
Q1 2018: Video Startup
Average Video Start Time:
N. America: 4.91s
Asia: 3.00s
Europe: 4.30s
Video Streaming: Startup Time
Low -> High
High => Low
Middle (Goldilocks)
Video Startup
10s 11s 12s 13s 14s 15s 16s 17s
4k Low->High:
4K Middle
(Goldilocks):
4k:High->Low:
Video Startup
4k Low->High:
4K Middle
(Goldilocks):
4k:High->Low:
PROs: CONS:
Fast Startup Initial Quality: Low
Other Connections:
Initial Quality: Low
Very slow startup
Fast Connections:
Initial Quality: High
Initial Quality: Good
Initial Startup: Not
fast, but not slow
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8
Teal: Video
Gray: Audio
With a separate audio track –
you can specify en, de, es
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8 Testing with WebPageTest 3G
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8
Testing with WebPageTest 3G
Video Streaming: Manifest File
600k.m3u8
Video Streaming: Manifest File
600k.m3u8
Video Streaming: Manifest File
https://hls.ted.com/talks/2208.m3u8
The Spengler
Crossing the Streams
Crossing the Streams
24 simultaneous streams @ 400-600 KBPS!!
245 MB of data in < 4 minutes.
Third Parties
No initial Video Download, but expect 700KB -1MB
additional JavaScript on page load
Third Parties: Facebook
HTTPArchive
Third Parties: Facebook
Summary
•Video files are big!
Best Practices
1. Resize Videos Appropriately for screen:
1. Quality
2. Bitrate
3. Dimensions/DPR
Respect your Mobile Users’ data plans!
Best Practices
1.
2. If Video will be hidden…Don’t Download it.
3. Avoid preload = Auto.
1. Be careful with preload=metadata.
4. For Silent Movies: Strip out audio track.
5. Don’t duplicate Video Traffic.
Respect your Mobile Users’ data plans!
Best Practices
3. Avoid preload = Auto.
1. Be careful with preload=metadata.
4. For Silent Movies: Strip out audio track.
5. Don’t duplicate Video Traffic.
6. Streaming: Start at lower bitrate for faster startup
7. Streaming: Start at middle bitrate for better
startup quality.
8. Even bitrate changes to prevent stalls
9. Use correct bitrates in manifest to optimize
delivery
10. One video at a time for best quality
11. Audit any third party hosting for performance.
Respect your Mobile Users’ data plans!
Thank You
Respect your Mobile Users’ data plans!
https://www.smashingmagazine.com/2018/10/video-playback-on-the-web-part-1/
https://www.smashingmagazine.com/2018/10/video-playback-on-the-web-part-2/
https://dougsillars.com/2018/08/21/excess-video-download-on-embedded-facebook-pages/
NodeJS Edinburgh Video Killed My Data Plan
NodeJS Edinburgh Video Killed My Data Plan
NodeJS Edinburgh Video Killed My Data Plan
NodeJS Edinburgh Video Killed My Data Plan
Video Stats: Top Mobile Domains (over 1k
served)
Video Streaming: Video Size
HTTPArchive: Sites with Video 7/15/2018
Video Streaming: Video Size
HTTPArchive: Sites with Video 7/15/2018

More Related Content

PPTX
Video performance snowcamp
PPTX
T3fest video
PPTX
Video Killed My Data Plan: Helsinki
PPTX
Video performance glasgow
PPTX
Video performance barcelona-js_coders
PPTX
Video performance munichfrontend
PPTX
Frontcon video
PPTX
Rija js video
Video performance snowcamp
T3fest video
Video Killed My Data Plan: Helsinki
Video performance glasgow
Video performance barcelona-js_coders
Video performance munichfrontend
Frontcon video
Rija js video

What's hot (20)

PPTX
Video js zagreb
PPTX
Warsawclouddays video
PPTX
Corkgdg video
PPTX
Armadajs video
PPTX
Vilnius py video
PPTX
Gdg lublin video
PPTX
Krakow video
PPTX
Portogdg video
POTX
Its timetostopstalling gdg_hamburg
POTX
Its timetostopstalling swp_munich
POTX
Its timetostopstalling mot_paris
PPTX
Its timetostopstalling pentabar
POTX
Its timetostopstalling gdgdusseldorf
POTX
Its timetostopstalling limerick
POTX
Mobile App Performance, Dublin MOT
PPTX
Fastandbeautiful porto
PPTX
Fastandbeautiful full stackporto
PPTX
Fastandbeautiful dublin php
PPTX
Fastandbeautiful full stacklondon
PPTX
Edi react fastandbeautiful
Video js zagreb
Warsawclouddays video
Corkgdg video
Armadajs video
Vilnius py video
Gdg lublin video
Krakow video
Portogdg video
Its timetostopstalling gdg_hamburg
Its timetostopstalling swp_munich
Its timetostopstalling mot_paris
Its timetostopstalling pentabar
Its timetostopstalling gdgdusseldorf
Its timetostopstalling limerick
Mobile App Performance, Dublin MOT
Fastandbeautiful porto
Fastandbeautiful full stackporto
Fastandbeautiful dublin php
Fastandbeautiful full stacklondon
Edi react fastandbeautiful
Ad

Similar to NodeJS Edinburgh Video Killed My Data Plan (18)

PPTX
Stop Stalling: Video Delivery Best Practices
PDF
Vkmdp cologne
POTX
Its timetostopstalling barcelonajs
PPTX
Webcamp fastandbeautiful
PPTX
Ux connect london_fastandbeautiful
PPTX
Fast and Beautiful Images and Video
PPTX
Hamburg web perf meetup
POTX
Its timetostopstalling sw_mobile_bristol
PPTX
Its Time To Stop Stalling: Mobile App and Video Performance
PPTX
Mcr fredfastvideoandimages
PPTX
Perf ug fastandbeautiful
POTX
Mobile web perf Amsterdam Tech Tips
PPTX
Монетизация сетевой инфраструктуры
PPTX
Mobixell pipeline webinar_june_20_2012
POTX
Its Time To Stop Stalling Bucharest
PPTX
Cologne webperf
PPTX
Cork ux Meetup
POTX
Android Network Performance
Stop Stalling: Video Delivery Best Practices
Vkmdp cologne
Its timetostopstalling barcelonajs
Webcamp fastandbeautiful
Ux connect london_fastandbeautiful
Fast and Beautiful Images and Video
Hamburg web perf meetup
Its timetostopstalling sw_mobile_bristol
Its Time To Stop Stalling: Mobile App and Video Performance
Mcr fredfastvideoandimages
Perf ug fastandbeautiful
Mobile web perf Amsterdam Tech Tips
Монетизация сетевой инфраструктуры
Mobixell pipeline webinar_june_20_2012
Its Time To Stop Stalling Bucharest
Cologne webperf
Cork ux Meetup
Android Network Performance
Ad

More from Doug Sillars (20)

PPTX
Fastandbeautiful belfast
PPTX
Fastandbeautiful gdg sacremento
PPTX
Fastandbeautiful gd glittlerock
PPTX
Fastandbeautiful webinale
PPTX
Ai powered images-pythonljubjana
PPTX
Fastandbeautiful zagrebtechsauna
PPTX
Ai powered images-gdgtirana
PPTX
A rt gallery pantalks
PPTX
Ai powered images-sarajevo
PPTX
A rt gallery hub387
PPTX
Ai powered images-zurichpydata
PPTX
Fastandbeautiful vienna
PPTX
Ai powered images-opieaivienna
PPTX
A rt gallery devfestlondon
PPTX
Fastandbeautiful devfest london
PPTX
A rt gallery cardiff
PPTX
Ai powered images-mobileera
PPTX
Fastandbeautiful oredev
PPTX
A rt gallery oredev
PPTX
A rt gallery webcamp-zg
Fastandbeautiful belfast
Fastandbeautiful gdg sacremento
Fastandbeautiful gd glittlerock
Fastandbeautiful webinale
Ai powered images-pythonljubjana
Fastandbeautiful zagrebtechsauna
Ai powered images-gdgtirana
A rt gallery pantalks
Ai powered images-sarajevo
A rt gallery hub387
Ai powered images-zurichpydata
Fastandbeautiful vienna
Ai powered images-opieaivienna
A rt gallery devfestlondon
Fastandbeautiful devfest london
A rt gallery cardiff
Ai powered images-mobileera
Fastandbeautiful oredev
A rt gallery oredev
A rt gallery webcamp-zg

Recently uploaded (20)

PPTX
Tartificialntelligence_presentation.pptx
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
Spectroscopy.pptx food analysis technology
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
cuic standard and advanced reporting.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
1. Introduction to Computer Programming.pptx
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Empathic Computing: Creating Shared Understanding
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Electronic commerce courselecture one. Pdf
PDF
NewMind AI Weekly Chronicles - August'25-Week II
PDF
Approach and Philosophy of On baking technology
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPT
Teaching material agriculture food technology
Tartificialntelligence_presentation.pptx
Dropbox Q2 2025 Financial Results & Investor Presentation
gpt5_lecture_notes_comprehensive_20250812015547.pdf
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Spectroscopy.pptx food analysis technology
A comparative analysis of optical character recognition models for extracting...
cuic standard and advanced reporting.pdf
Group 1 Presentation -Planning and Decision Making .pptx
1. Introduction to Computer Programming.pptx
“AI and Expert System Decision Support & Business Intelligence Systems”
Empathic Computing: Creating Shared Understanding
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
Electronic commerce courselecture one. Pdf
NewMind AI Weekly Chronicles - August'25-Week II
Approach and Philosophy of On baking technology
20250228 LYD VKU AI Blended-Learning.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Teaching material agriculture food technology

NodeJS Edinburgh Video Killed My Data Plan

Editor's Notes

  • #59: www.kidzania.com
  • #60: www.kidzania.com
  • #61: www.kidzania.com
  • #62: www.kidzania.com
  • #63: www.depend.com
  • #64: www.depend.com
  • #65: www.depend.com
  • #66: www.depend.com
  • #68: www.depend.com
  • #69: www.govisland.com
  • #70: www.govisland.com
  • #71: www.govisland.com
  • #72: www.govisland.com
  • #73: www.govisland.com
  • #74: www.govisland.com
  • #75: www.govisland.com
  • #76: www.govisland.com
  • #104: www.govisland.com
  • #105: www.govisland.com
  • #106: www.govisland.com
  • #107: www.govisland.com