SlideShare una empresa de Scribd logo
1 de 43
Things Developers Believe About Video Files
(Proven Wrong by User Uploads)
derekb@vimeo.com
@daemon404
Derek Buitenhuis
5 October 2017
San Francisco, USA
/whois derekb
15 October 2017
• Senior Video Encoding Engineer at Vimeo
• Distributed chunk transcoder
• On-the-fly image service (before it was cool)
• HLS/DASH on-the-fly packager
• Open Source Multimedia Troll^WDeveloper
• FFmpeg, L-SMASH, FFMS2, x264, etc.
• Daemon404 @ FreeNode
• VideoLAN Non-Profit Association Member
Everything’s Great Until Users Show Up
25 October 2017
Everything’s Great Until Users Show Up
25 October 2017
• Most users are well behaved (H.264 + AAC in MOV/MP4)
Everything’s Great Until Users Show Up
25 October 2017
• Most users are well behaved (H.264 + AAC in MOV/MP4)
• Others…
• In the last 90 or so days:
• 119 Video Codecs
• 73 Audio Codecs
• 39 Container
• N Combinations of the above
Everything’s Great Until Users Show Up
25 October 2017
• Most users are well behaved (H.264 + AAC in MOV/MP4)
• Others…
• In the last 90 or so days:
• 119 Video Codecs
• 73 Audio Codecs
• 39 Container
• N Combinations of the above
• Observation: Users with the worst files tend to complain the loudest
Everything’s Great Until Users Show Up
25 October 2017
• Most users are well behaved (H.264 + AAC in MOV/MP4)
• Others…
• In the last 90 or so days:
• 119 Video Codecs
• 73 Audio Codecs
• 39 Container
• N Combinations of the above
• Observation: Users with the worst files tend to complain the loudest
• Fixing the worst files has lead to a much more robust all around product
The “Obvious” Ones
35 October 2017
The “Obvious” Ones
35 October 2017
The “Obvious” Ones
35 October 2017
The “Obvious” Ones
35 October 2017
• That properties cannot change between frames
Things Change…
3.55 October 2017
• Pixel packing format
• Color family
• Color primaries
• Transfer function
• Color matrix
• Resolution
• Frame rate (more on this later!)
• Color range
• Codec
• Sampling rate
• Aspect ratio
• Bit depth
• Whether it’s interlaced or not
• Whether it’s telecined or not
• Field order
• Chroma location
• Number of audio channels
• Channel layout
• Audio sample format
• About 10 billion more!
The “Obvious” Ones
35 October 2017
• That properties cannot change between frames
The “Obvious” Ones: Mostly Timestamps
35 October 2017
• That properties cannot change between frames
• That you’ll have a frame rate at all (variable framerate)
The “Obvious” Ones: Mostly Timestamps
35 October 2017
• That properties cannot change between frames
• That you’ll have a frame rate at all (variable framerate)
• That non-constant timestamps mean you don’t have a framerate
• Oscillating timestamps due to use of 90kHz time base
• Insane android “constant” frame rate based off camera timings (?)
The “Obvious” Ones: Mostly Timestamps
35 October 2017
• That properties cannot change between frames
• That you’ll have a frame rate at all (variable framerate)
• That non-constant timestamps mean you don’t have a framerate
• Oscillating timestamps due to use of 90kHz time base
• Insane android “constant” frame rate based off camera timings (?)
• That even when you do have a constant frame rate, that you play at that rate
• mvhd rate and edts media_rate in ISOBMFF / MOV
The “Obvious” Ones: Mostly Timestamps
35 October 2017
• That properties cannot change between frames
• That you’ll have a frame rate at all (variable framerate)
• That non-constant timestamps mean you don’t have a framerate
• Oscillating timestamps due to use of 90kHz time base
• Insane android “constant” frame rate based off camera timings (?)
• That even when you do have a constant frame rate, that you play at that rate
• mvhd rate and edts media_rate in ISOBMFF / MOV
• That you don’t need to do rate conversion
• Example: sub-1fps slideshow videos → bad seeking, bad subtitles
The “Obvious” Ones: Mostly Timestamps
35 October 2017
• That properties cannot change between frames
• That you’ll have a frame rate at all (variable framerate)
• That non-constant timestamps mean you don’t have a framerate
• Oscillating timestamps due to use of 90kHz time base
• Insane android “constant” frame rate based off camera timings (?)
• That even when you do have a constant frame rate, that you play at that rate
• mvhd rate and edts media_rate in ISOBMFF / MOV
• That you don’t need to do rate conversion
• Example: sub-1fps slideshow videos → bad seeking, bad subtitles
• That every frame will have a timestamp
The “Obvious” Ones: Mostly Timestamps
35 October 2017
• That properties cannot change between frames
• That you’ll have a frame rate at all (variable framerate)
• That non-constant timestamps mean you don’t have a framerate
• Oscillating timestamps due to use of 90kHz time base
• Insane android “constant” frame rate based off camera timings (?)
• That even when you do have a constant frame rate, that you play at that rate
• mvhd rate and edts media_rate in ISOBMFF / MOV
• That you don’t need to do rate conversion
• Example: sub-1fps slideshow videos → bad seeking, bad subtitles
• That every frame will have a timestamp
• That discontinuous timestamps are invalid
• OGG, MPEG-TS
45 October 2017
• That you shouldn’t display negative timestamped samples
• AllF entry in udta atom
Yes, Timestamps Are Pain, Have Some More
45 October 2017
• That you shouldn’t display negative timestamped samples
• AllF entry in udta atom
• That you don’t need sample durations
• Duration of the last frame + sub-1fps slideshows
Yes, Timestamps Are Pain, Have Some More
45 October 2017
• That you shouldn’t display negative timestamped samples
• AllF entry in udta atom
• That you don’t need sample durations
• Duration of the last frame + sub-1fps slideshows
• That you’ll have sample durations
• Looking at you, Matroska
Yes, Timestamps Are Pain, Have Some More
45 October 2017
• That you shouldn’t display negative timestamped samples
• AllF entry in udta atom
• That you don’t need sample durations
• Duration of the last frame + sub-1fps slideshows
• That you’ll have sample durations
• Looking at you, Matroska
• That these will match the timestamp deltas
Yes, Timestamps Are Pain, Have Some More
Less Obvious: That Was a Fun Day of Debugging
55 October 2017
Less Obvious: That Was a Fun Day of Debugging
55 October 2017
• That you can seek in the input without pre-indexing every packet
• IPPPPPPP
• Periodic Intra Refresh
Less Obvious: That Was a Fun Day of Debugging
55 October 2017
• That you can seek in the input without pre-indexing every packet
• IPPPPPPP
• Periodic Intra Refresh
• That coded samples match what should be displayed
• Edit lists, ordered chapters
Less Obvious: That Was a Fun Day of Debugging
55 October 2017
• That you can seek in the input without pre-indexing every packet
• IPPPPPPP
• Periodic Intra Refresh
• That coded samples match what should be displayed
• Edit lists, ordered chapters
• That you only need to display what’s in the file
• Audio silence gap-filling, post-stream black frames
Less Obvious: That Was a Fun Day of Debugging
55 October 2017
• That you can seek in the input without pre-indexing every packet
• IPPPPPPP
• Periodic Intra Refresh
• That coded samples match what should be displayed
• Edit lists, ordered chapters
• That you only need to display what’s in the file
• Audio silence gap-filling, post-stream black frames
• That you should display every packet/sample
• VP8, VP9, AV1
Less Obvious: That Was a Fun Day of Debugging
55 October 2017
• That you can seek in the input without pre-indexing every packet
• IPPPPPPP
• Periodic Intra Refresh
• That coded samples match what should be displayed
• Edit lists, ordered chapters
• That you only need to display what’s in the file
• Audio silence gap-filling, post-stream black frames
• That you should display every packet/sample
• VP8, VP9, AV1
• That you only need to play one track of a kind at once
• Multiple default-on MOV tracks
Less Obvious: That Was a Fun Week of Debugging
65 October 2017
• That packets will be well interleaved
Less Obvious: That Was a Fun Week of Debugging
65 October 2017
• That packets will be well interleaved
• That packets will even be interleaved at all
Less Obvious: That Was a Fun Week of Debugging
65 October 2017
• That packets will be well interleaved
• That packets will even be interleaved at all
• That packets will even be vaguely in-order
Less Obvious: That Was a Fun Week of Debugging
65 October 2017
• That packets will be well interleaved
• That packets will even be interleaved at all
• That packets will even be vaguely in-order
• That you should use the bitstream color properties
• That you should use the container color properties
Less Obvious: That Was a Fun Week of Debugging
65 October 2017
• That packets will be well interleaved
• That packets will even be interleaved at all
• That packets will even be vaguely in-order
• That you should use the bitstream color properties
• That you should use the container color properties
• That you shouldn’t use both
Less Obvious: That Was a Fun Week of Debugging
65 October 2017
• That packets will be well interleaved
• That packets will even be interleaved at all
• That packets will even be vaguely in-order
• That you should use the bitstream color properties
• That you should use the container color properties
• That you shouldn’t use both
• That the color properties will even map to some existing standard
• MOV’s embedded ICC profile in the colr atom
“multimedia is basically neverending pain”
75 October 2017
— wm4, mpv-player lead
75 October 2017
• That file actually has an end
• Segment linking or dref atom loop (A → B → A → B → …)
• LOOP entry in udta atom
“multimedia is basically neverending pain”
— wm4, mpv-player lead
75 October 2017
• That file actually has an end
• Segment linking or dref atom loop (A → B → A → B → …)
• LOOP entry in udta atom
• That the video track is even a video “codec”
• PowerPoint-in-MOV, FIRE, VNC commands, RAR in MKV
“multimedia is basically neverending pain”
— wm4, mpv-player lead
75 October 2017
• That file actually has an end
• Segment linking or dref atom loop (A → B → A → B → …)
• LOOP entry in udta atom
• That the video track is even a video “codec”
• PowerPoint-in-MOV, FIRE, VNC commands, RAR in MKV
• That you can easily downmix or play a stereo track on a mono speaker
• Phase cancellation is great fun
“multimedia is basically neverending pain”
— wm4, mpv-player lead
85 October 2017
• Non-bit-exact IDCT in MPEG-2 and MPEG-4
“multimedia is basically neverending pain”
— wm4, mpv-player lead
85 October 2017
• Everything is MP3:
“multimedia is basically neverending pain”
— wm4, mpv-player lead
Tools, Sources, etc.
85 October 2017
• ffprobe: http://git.videolan.org/?p=ffmpeg.git
• boxdumper: https://github.com/l-smash/l-smash
• bxd: https://github.com/dwbuiten/bxd
• Beyond Compare is great as well
• ffms2: https://github.com/FFMS/ffms2/
• dvbsnoop: http://dvbsnoop.sourceforge.net/
• JPEG/MP3 sample epic bug report:
• https://github.com/mpv-player/mpv/issues/3973
• Source of IDCT Images:
• https://guru.multimedia.cx/the-mpeg124-and-h26123-idct
95 October 2017
Thanks!
Questions (or 🍅)?

Más contenido relacionado

La actualidad más candente

How to Optimize Dynamic Adaptive Video Streaming? Challenges and Solutions
How to Optimize Dynamic Adaptive Video Streaming? Challenges and SolutionsHow to Optimize Dynamic Adaptive Video Streaming? Challenges and Solutions
How to Optimize Dynamic Adaptive Video Streaming? Challenges and Solutions
Alpen-Adria-Universität
 
Versatile Video Coding – Video Compression beyond HEVC: Coding Tools for SDR ...
Versatile Video Coding – Video Compression beyond HEVC: Coding Tools for SDR ...Versatile Video Coding – Video Compression beyond HEVC: Coding Tools for SDR ...
Versatile Video Coding – Video Compression beyond HEVC: Coding Tools for SDR ...
Förderverein Technische Fakultät
 
カラーチャートを用いた複数の再撮モニタ とカメラの最適色補正論文
カラーチャートを用いた複数の再撮モニタ とカメラの最適色補正論文カラーチャートを用いた複数の再撮モニタ とカメラの最適色補正論文
カラーチャートを用いた複数の再撮モニタ とカメラの最適色補正論文
doboncho
 

La actualidad más candente (20)

Image interpolation
Image interpolationImage interpolation
Image interpolation
 
Faster R-CNN
Faster R-CNNFaster R-CNN
Faster R-CNN
 
How to Optimize Dynamic Adaptive Video Streaming? Challenges and Solutions
How to Optimize Dynamic Adaptive Video Streaming? Challenges and SolutionsHow to Optimize Dynamic Adaptive Video Streaming? Challenges and Solutions
How to Optimize Dynamic Adaptive Video Streaming? Challenges and Solutions
 
量子コンピュータ時代の製造業におけるDXセミナー~生産工程効率化に向けた新たなご提案~
量子コンピュータ時代の製造業におけるDXセミナー~生産工程効率化に向けた新たなご提案~量子コンピュータ時代の製造業におけるDXセミナー~生産工程効率化に向けた新たなご提案~
量子コンピュータ時代の製造業におけるDXセミナー~生産工程効率化に向けた新たなご提案~
 
Introduction to H.264 Advanced Video Compression
Introduction to H.264 Advanced Video CompressionIntroduction to H.264 Advanced Video Compression
Introduction to H.264 Advanced Video Compression
 
Versatile Video Coding – Video Compression beyond HEVC: Coding Tools for SDR ...
Versatile Video Coding – Video Compression beyond HEVC: Coding Tools for SDR ...Versatile Video Coding – Video Compression beyond HEVC: Coding Tools for SDR ...
Versatile Video Coding – Video Compression beyond HEVC: Coding Tools for SDR ...
 
H.264 video standard
H.264 video standardH.264 video standard
H.264 video standard
 
Imagen: Photorealistic Text-to-Image Diffusion Models with Deep Language Unde...
Imagen: Photorealistic Text-to-Image Diffusion Models with Deep Language Unde...Imagen: Photorealistic Text-to-Image Diffusion Models with Deep Language Unde...
Imagen: Photorealistic Text-to-Image Diffusion Models with Deep Language Unde...
 
20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation 20200826 AWS Black Belt Online Seminar AWS CloudFormation
20200826 AWS Black Belt Online Seminar AWS CloudFormation
 
カラーチャートを用いた複数の再撮モニタ とカメラの最適色補正論文
カラーチャートを用いた複数の再撮モニタ とカメラの最適色補正論文カラーチャートを用いた複数の再撮モニタ とカメラの最適色補正論文
カラーチャートを用いた複数の再撮モニタ とカメラの最適色補正論文
 
失敗から学ぶAWSの監視
失敗から学ぶAWSの監視失敗から学ぶAWSの監視
失敗から学ぶAWSの監視
 
H.264 video compression standard.
H.264 video compression standard.H.264 video compression standard.
H.264 video compression standard.
 
20200930 AWS Black Belt Online Seminar Amazon Kinesis Video Streams
20200930 AWS Black Belt Online Seminar Amazon Kinesis Video Streams20200930 AWS Black Belt Online Seminar Amazon Kinesis Video Streams
20200930 AWS Black Belt Online Seminar Amazon Kinesis Video Streams
 
建設シミュレータOCSの開発 / OCS・VTC on Unity におけるROS対応機能について
建設シミュレータOCSの開発 / OCS・VTC on Unity におけるROS対応機能について建設シミュレータOCSの開発 / OCS・VTC on Unity におけるROS対応機能について
建設シミュレータOCSの開発 / OCS・VTC on Unity におけるROS対応機能について
 
AWS Black Belt Online Seminar 2017 AWSへのネットワーク接続とAWS上のネットワーク内部設計
AWS Black Belt Online Seminar 2017 AWSへのネットワーク接続とAWS上のネットワーク内部設計AWS Black Belt Online Seminar 2017 AWSへのネットワーク接続とAWS上のネットワーク内部設計
AWS Black Belt Online Seminar 2017 AWSへのネットワーク接続とAWS上のネットワーク内部設計
 
視覚と対話の融合研究
視覚と対話の融合研究視覚と対話の融合研究
視覚と対話の融合研究
 
計算力学シミュレーションに GPU は役立つのか?
計算力学シミュレーションに GPU は役立つのか?計算力学シミュレーションに GPU は役立つのか?
計算力学シミュレーションに GPU は役立つのか?
 
Introduction to HEVC
Introduction to HEVCIntroduction to HEVC
Introduction to HEVC
 
Chainer で Tensor コア (fp16) を使いこなす
Chainer で Tensor コア (fp16) を使いこなすChainer で Tensor コア (fp16) を使いこなす
Chainer で Tensor コア (fp16) を使いこなす
 
Deep Residual Learning (ILSVRC2015 winner)
Deep Residual Learning (ILSVRC2015 winner)Deep Residual Learning (ILSVRC2015 winner)
Deep Residual Learning (ILSVRC2015 winner)
 

Similar a Things Developers Believe About Video Files (Proven Wrong by User Uploads)

London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...
Kieran Kunhya
 
London devops logging
London devops loggingLondon devops logging
London devops logging
Tomas Doran
 
Message:Passing - lpw 2012
Message:Passing - lpw 2012Message:Passing - lpw 2012
Message:Passing - lpw 2012
Tomas Doran
 

Similar a Things Developers Believe About Video Files (Proven Wrong by User Uploads) (20)

London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...London Video Tech - Adventures in cutting every last millisecond from glass-t...
London Video Tech - Adventures in cutting every last millisecond from glass-t...
 
WordCamp Lightning Talk: Podcasting and Live Streaming with WordPress
WordCamp Lightning Talk: Podcasting and Live Streaming with WordPressWordCamp Lightning Talk: Podcasting and Live Streaming with WordPress
WordCamp Lightning Talk: Podcasting and Live Streaming with WordPress
 
ProjectTox: Free as in freedom Skype replacement
ProjectTox: Free as in freedom Skype replacementProjectTox: Free as in freedom Skype replacement
ProjectTox: Free as in freedom Skype replacement
 
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)
Glitch-Free A/V Encoding (CocoaConf Boston, October 2013)
 
Every Solution is Wrong: Normalizing Ambiguous, Broken, and Pants-on-Head Cra...
Every Solution is Wrong: Normalizing Ambiguous, Broken, and Pants-on-Head Cra...Every Solution is Wrong: Normalizing Ambiguous, Broken, and Pants-on-Head Cra...
Every Solution is Wrong: Normalizing Ambiguous, Broken, and Pants-on-Head Cra...
 
File Types
 File Types File Types
File Types
 
AWS Webcast - What's New with Amazon Elastic Transcoder
AWS Webcast - What's New with Amazon Elastic TranscoderAWS Webcast - What's New with Amazon Elastic Transcoder
AWS Webcast - What's New with Amazon Elastic Transcoder
 
Image and Video formates
Image and Video formatesImage and Video formates
Image and Video formates
 
Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021Can WebRTC help musicians? @ FOSDEM 2021
Can WebRTC help musicians? @ FOSDEM 2021
 
WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21WebRTC, RED and Janus @ ClueCon21
WebRTC, RED and Janus @ ClueCon21
 
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
What is Kafka & why is it Important? (UKOUG Tech17, Birmingham, UK - December...
 
FFMS2: Indexing, Edge Cases, and Insanity
FFMS2: Indexing, Edge Cases, and InsanityFFMS2: Indexing, Edge Cases, and Insanity
FFMS2: Indexing, Edge Cases, and Insanity
 
A Progressive Approach to the Past: Ensuring Backwards Compatability Through ...
A Progressive Approach to the Past: Ensuring Backwards Compatability Through ...A Progressive Approach to the Past: Ensuring Backwards Compatability Through ...
A Progressive Approach to the Past: Ensuring Backwards Compatability Through ...
 
London devops logging
London devops loggingLondon devops logging
London devops logging
 
Spotify architecture - Pressing play
Spotify architecture - Pressing playSpotify architecture - Pressing play
Spotify architecture - Pressing play
 
Optimizing HTML5 Video
Optimizing HTML5 VideoOptimizing HTML5 Video
Optimizing HTML5 Video
 
Podcasting
PodcastingPodcasting
Podcasting
 
Distributed "Web Scale" Systems
Distributed "Web Scale" SystemsDistributed "Web Scale" Systems
Distributed "Web Scale" Systems
 
Message:Passing - lpw 2012
Message:Passing - lpw 2012Message:Passing - lpw 2012
Message:Passing - lpw 2012
 
Working with LOG Footage & Creating Your Own Lookup Tables
Working with LOG Footage & Creating Your Own Lookup TablesWorking with LOG Footage & Creating Your Own Lookup Tables
Working with LOG Footage & Creating Your Own Lookup Tables
 

Más de Derek Buitenhuis

Más de Derek Buitenhuis (8)

Are Video Codecs... Done?
Are Video Codecs... Done?Are Video Codecs... Done?
Are Video Codecs... Done?
 
Colorspace: Useful For More Than Just Color? - SF Video Tech Meetup - 27 May ...
Colorspace: Useful For More Than Just Color? - SF Video Tech Meetup - 27 May ...Colorspace: Useful For More Than Just Color? - SF Video Tech Meetup - 27 May ...
Colorspace: Useful For More Than Just Color? - SF Video Tech Meetup - 27 May ...
 
Opening up Open Source
Opening up Open SourceOpening up Open Source
Opening up Open Source
 
I Wrote an FFV1 Decoder in Go for Fun: What I Learned Going from Spec to Impl...
I Wrote an FFV1 Decoder in Go for Fun: What I Learned Going from Spec to Impl...I Wrote an FFV1 Decoder in Go for Fun: What I Learned Going from Spec to Impl...
I Wrote an FFV1 Decoder in Go for Fun: What I Learned Going from Spec to Impl...
 
Let's Be HAV1ng You - London Video Tech October 2019
Let's Be HAV1ng You - London Video Tech October 2019Let's Be HAV1ng You - London Video Tech October 2019
Let's Be HAV1ng You - London Video Tech October 2019
 
Vimeo and Open Source (SMPTE Forum 2015)
Vimeo and Open Source (SMPTE Forum 2015)Vimeo and Open Source (SMPTE Forum 2015)
Vimeo and Open Source (SMPTE Forum 2015)
 
Let's Write a JPEG Decoder (Vimeo Lunch Talks)
Let's Write a JPEG Decoder (Vimeo Lunch Talks)Let's Write a JPEG Decoder (Vimeo Lunch Talks)
Let's Write a JPEG Decoder (Vimeo Lunch Talks)
 
Multimedia Buzzword Bingo: Translating to English
 Multimedia Buzzword Bingo: Translating to English Multimedia Buzzword Bingo: Translating to English
Multimedia Buzzword Bingo: Translating to English
 

Último

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Último (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 

Things Developers Believe About Video Files (Proven Wrong by User Uploads)

  • 1. Things Developers Believe About Video Files (Proven Wrong by User Uploads) derekb@vimeo.com @daemon404 Derek Buitenhuis 5 October 2017 San Francisco, USA
  • 2. /whois derekb 15 October 2017 • Senior Video Encoding Engineer at Vimeo • Distributed chunk transcoder • On-the-fly image service (before it was cool) • HLS/DASH on-the-fly packager • Open Source Multimedia Troll^WDeveloper • FFmpeg, L-SMASH, FFMS2, x264, etc. • Daemon404 @ FreeNode • VideoLAN Non-Profit Association Member
  • 3. Everything’s Great Until Users Show Up 25 October 2017
  • 4. Everything’s Great Until Users Show Up 25 October 2017 • Most users are well behaved (H.264 + AAC in MOV/MP4)
  • 5. Everything’s Great Until Users Show Up 25 October 2017 • Most users are well behaved (H.264 + AAC in MOV/MP4) • Others… • In the last 90 or so days: • 119 Video Codecs • 73 Audio Codecs • 39 Container • N Combinations of the above
  • 6. Everything’s Great Until Users Show Up 25 October 2017 • Most users are well behaved (H.264 + AAC in MOV/MP4) • Others… • In the last 90 or so days: • 119 Video Codecs • 73 Audio Codecs • 39 Container • N Combinations of the above • Observation: Users with the worst files tend to complain the loudest
  • 7. Everything’s Great Until Users Show Up 25 October 2017 • Most users are well behaved (H.264 + AAC in MOV/MP4) • Others… • In the last 90 or so days: • 119 Video Codecs • 73 Audio Codecs • 39 Container • N Combinations of the above • Observation: Users with the worst files tend to complain the loudest • Fixing the worst files has lead to a much more robust all around product
  • 11. The “Obvious” Ones 35 October 2017 • That properties cannot change between frames
  • 12. Things Change… 3.55 October 2017 • Pixel packing format • Color family • Color primaries • Transfer function • Color matrix • Resolution • Frame rate (more on this later!) • Color range • Codec • Sampling rate • Aspect ratio • Bit depth • Whether it’s interlaced or not • Whether it’s telecined or not • Field order • Chroma location • Number of audio channels • Channel layout • Audio sample format • About 10 billion more!
  • 13. The “Obvious” Ones 35 October 2017 • That properties cannot change between frames
  • 14. The “Obvious” Ones: Mostly Timestamps 35 October 2017 • That properties cannot change between frames • That you’ll have a frame rate at all (variable framerate)
  • 15. The “Obvious” Ones: Mostly Timestamps 35 October 2017 • That properties cannot change between frames • That you’ll have a frame rate at all (variable framerate) • That non-constant timestamps mean you don’t have a framerate • Oscillating timestamps due to use of 90kHz time base • Insane android “constant” frame rate based off camera timings (?)
  • 16. The “Obvious” Ones: Mostly Timestamps 35 October 2017 • That properties cannot change between frames • That you’ll have a frame rate at all (variable framerate) • That non-constant timestamps mean you don’t have a framerate • Oscillating timestamps due to use of 90kHz time base • Insane android “constant” frame rate based off camera timings (?) • That even when you do have a constant frame rate, that you play at that rate • mvhd rate and edts media_rate in ISOBMFF / MOV
  • 17. The “Obvious” Ones: Mostly Timestamps 35 October 2017 • That properties cannot change between frames • That you’ll have a frame rate at all (variable framerate) • That non-constant timestamps mean you don’t have a framerate • Oscillating timestamps due to use of 90kHz time base • Insane android “constant” frame rate based off camera timings (?) • That even when you do have a constant frame rate, that you play at that rate • mvhd rate and edts media_rate in ISOBMFF / MOV • That you don’t need to do rate conversion • Example: sub-1fps slideshow videos → bad seeking, bad subtitles
  • 18. The “Obvious” Ones: Mostly Timestamps 35 October 2017 • That properties cannot change between frames • That you’ll have a frame rate at all (variable framerate) • That non-constant timestamps mean you don’t have a framerate • Oscillating timestamps due to use of 90kHz time base • Insane android “constant” frame rate based off camera timings (?) • That even when you do have a constant frame rate, that you play at that rate • mvhd rate and edts media_rate in ISOBMFF / MOV • That you don’t need to do rate conversion • Example: sub-1fps slideshow videos → bad seeking, bad subtitles • That every frame will have a timestamp
  • 19. The “Obvious” Ones: Mostly Timestamps 35 October 2017 • That properties cannot change between frames • That you’ll have a frame rate at all (variable framerate) • That non-constant timestamps mean you don’t have a framerate • Oscillating timestamps due to use of 90kHz time base • Insane android “constant” frame rate based off camera timings (?) • That even when you do have a constant frame rate, that you play at that rate • mvhd rate and edts media_rate in ISOBMFF / MOV • That you don’t need to do rate conversion • Example: sub-1fps slideshow videos → bad seeking, bad subtitles • That every frame will have a timestamp • That discontinuous timestamps are invalid • OGG, MPEG-TS
  • 20. 45 October 2017 • That you shouldn’t display negative timestamped samples • AllF entry in udta atom Yes, Timestamps Are Pain, Have Some More
  • 21. 45 October 2017 • That you shouldn’t display negative timestamped samples • AllF entry in udta atom • That you don’t need sample durations • Duration of the last frame + sub-1fps slideshows Yes, Timestamps Are Pain, Have Some More
  • 22. 45 October 2017 • That you shouldn’t display negative timestamped samples • AllF entry in udta atom • That you don’t need sample durations • Duration of the last frame + sub-1fps slideshows • That you’ll have sample durations • Looking at you, Matroska Yes, Timestamps Are Pain, Have Some More
  • 23. 45 October 2017 • That you shouldn’t display negative timestamped samples • AllF entry in udta atom • That you don’t need sample durations • Duration of the last frame + sub-1fps slideshows • That you’ll have sample durations • Looking at you, Matroska • That these will match the timestamp deltas Yes, Timestamps Are Pain, Have Some More
  • 24. Less Obvious: That Was a Fun Day of Debugging 55 October 2017
  • 25. Less Obvious: That Was a Fun Day of Debugging 55 October 2017 • That you can seek in the input without pre-indexing every packet • IPPPPPPP • Periodic Intra Refresh
  • 26. Less Obvious: That Was a Fun Day of Debugging 55 October 2017 • That you can seek in the input without pre-indexing every packet • IPPPPPPP • Periodic Intra Refresh • That coded samples match what should be displayed • Edit lists, ordered chapters
  • 27. Less Obvious: That Was a Fun Day of Debugging 55 October 2017 • That you can seek in the input without pre-indexing every packet • IPPPPPPP • Periodic Intra Refresh • That coded samples match what should be displayed • Edit lists, ordered chapters • That you only need to display what’s in the file • Audio silence gap-filling, post-stream black frames
  • 28. Less Obvious: That Was a Fun Day of Debugging 55 October 2017 • That you can seek in the input without pre-indexing every packet • IPPPPPPP • Periodic Intra Refresh • That coded samples match what should be displayed • Edit lists, ordered chapters • That you only need to display what’s in the file • Audio silence gap-filling, post-stream black frames • That you should display every packet/sample • VP8, VP9, AV1
  • 29. Less Obvious: That Was a Fun Day of Debugging 55 October 2017 • That you can seek in the input without pre-indexing every packet • IPPPPPPP • Periodic Intra Refresh • That coded samples match what should be displayed • Edit lists, ordered chapters • That you only need to display what’s in the file • Audio silence gap-filling, post-stream black frames • That you should display every packet/sample • VP8, VP9, AV1 • That you only need to play one track of a kind at once • Multiple default-on MOV tracks
  • 30. Less Obvious: That Was a Fun Week of Debugging 65 October 2017 • That packets will be well interleaved
  • 31. Less Obvious: That Was a Fun Week of Debugging 65 October 2017 • That packets will be well interleaved • That packets will even be interleaved at all
  • 32. Less Obvious: That Was a Fun Week of Debugging 65 October 2017 • That packets will be well interleaved • That packets will even be interleaved at all • That packets will even be vaguely in-order
  • 33. Less Obvious: That Was a Fun Week of Debugging 65 October 2017 • That packets will be well interleaved • That packets will even be interleaved at all • That packets will even be vaguely in-order • That you should use the bitstream color properties • That you should use the container color properties
  • 34. Less Obvious: That Was a Fun Week of Debugging 65 October 2017 • That packets will be well interleaved • That packets will even be interleaved at all • That packets will even be vaguely in-order • That you should use the bitstream color properties • That you should use the container color properties • That you shouldn’t use both
  • 35. Less Obvious: That Was a Fun Week of Debugging 65 October 2017 • That packets will be well interleaved • That packets will even be interleaved at all • That packets will even be vaguely in-order • That you should use the bitstream color properties • That you should use the container color properties • That you shouldn’t use both • That the color properties will even map to some existing standard • MOV’s embedded ICC profile in the colr atom
  • 36. “multimedia is basically neverending pain” 75 October 2017 — wm4, mpv-player lead
  • 37. 75 October 2017 • That file actually has an end • Segment linking or dref atom loop (A → B → A → B → …) • LOOP entry in udta atom “multimedia is basically neverending pain” — wm4, mpv-player lead
  • 38. 75 October 2017 • That file actually has an end • Segment linking or dref atom loop (A → B → A → B → …) • LOOP entry in udta atom • That the video track is even a video “codec” • PowerPoint-in-MOV, FIRE, VNC commands, RAR in MKV “multimedia is basically neverending pain” — wm4, mpv-player lead
  • 39. 75 October 2017 • That file actually has an end • Segment linking or dref atom loop (A → B → A → B → …) • LOOP entry in udta atom • That the video track is even a video “codec” • PowerPoint-in-MOV, FIRE, VNC commands, RAR in MKV • That you can easily downmix or play a stereo track on a mono speaker • Phase cancellation is great fun “multimedia is basically neverending pain” — wm4, mpv-player lead
  • 40. 85 October 2017 • Non-bit-exact IDCT in MPEG-2 and MPEG-4 “multimedia is basically neverending pain” — wm4, mpv-player lead
  • 41. 85 October 2017 • Everything is MP3: “multimedia is basically neverending pain” — wm4, mpv-player lead
  • 42. Tools, Sources, etc. 85 October 2017 • ffprobe: http://git.videolan.org/?p=ffmpeg.git • boxdumper: https://github.com/l-smash/l-smash • bxd: https://github.com/dwbuiten/bxd • Beyond Compare is great as well • ffms2: https://github.com/FFMS/ffms2/ • dvbsnoop: http://dvbsnoop.sourceforge.net/ • JPEG/MP3 sample epic bug report: • https://github.com/mpv-player/mpv/issues/3973 • Source of IDCT Images: • https://guru.multimedia.cx/the-mpeg124-and-h26123-idct