Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Compressed Video Quality


Published on

Presentation at IASA 2017 conference, Berlin, September 2017.

Published in: Technology
  • Be the first to comment

Compressed Video Quality

  1. 1. @iainvcodex Compressed Video Quality IASA 2017 Iain Richardson @iainvcodex
  2. 2. @iainvcodex Agenda 1. Compressed video 2. Video quality – what is it? 3. Video quality – how can we measure it? 4. Walk-throughs 5. What to remember 6. Resources
  3. 3. @iainvcodex Compressed video
  4. 4. @iainvcodex Video Source Decompress (Decode) Compress (Encode) Video Display Coded video Encoder + Decoder = CODEC
  5. 5. @iainvcodex Container Coded video Coded audio Video format .264, .265, VP9… Container format MP4, MOV, WebM, MXF… Audio format .aac, .ogg, .mp3…
  6. 6. @iainvcodex 1990 2000 2010 Early concepts MPEG1 MPEG2 H.264 HEVC VC-1 VP8 VP9 MPEG4 AO Media FVC 2017
  7. 7. @iainvcodex Video quality
  8. 8. @iainvcodex We know it when we see it…
  9. 9. @iainvcodex The spectrum of visual quality Perfect (Lossless) Awful Visually Lossless? Good enough?
  10. 10. @iainvcodex What affects visual quality? (1) Compression ratio Computation Delay Codec type Codec version Transmission errors SYSTEM ISSUES
  11. 11. @iainvcodex What affects visual quality? (2) Detail Motion Masking CONTENT ISSUES
  12. 12. @iainvcodex Spatial masking
  13. 13. @iainvcodex What affects visual quality? (3) Environment Attention Experience HUMAN ISSUES Task
  14. 14. @iainvcodex Attention
  15. 15. @iainvcodex Saccades: Yarbus, 1967
  16. 16. @iainvcodex Change blindness The “door” experiment:
  17. 17. @iainvcodex
  18. 18. @iainvcodex
  19. 19. @iainvcodex Source: “Directed visual attention and the dynamic control of information flow”, Encyclopedia of Visual Attention, 2005 The visual world Unlimited Retina >100Bn bits/sec Optic nerve ~3M bits/sec Attention <10k bits/sec Long term memory <10 bits/sec How much do we really see?
  20. 20. @iainvcodex Honoré Daumier “Advice to a young artist”
  21. 21. @iainvcodex Measuring video quality
  22. 22. @iainvcodex Video quality measurement Subjective Objective
  23. 23. @iainvcodex Video quality measurement Subjective Objective Goldeneye Multiple viewers Absolute Comparison
  24. 24. @iainvcodex Absolute Category Rating Bad Poor Fair Good Excellent
  25. 25. @iainvcodex Pair-wise comparison A B
  26. 26. @iainvcodex Mean Opinion or Goldeneye?
  27. 27. @iainvcodex Video quality measurement Subjective Objective Full reference Reduced reference No reference Distortion based Model based Hybrid
  28. 28. @iainvcodex Objective metrics • Peak Signal to Noise Ratio (PSNR) • Structural Similarity Index (SSIM) • Just Noticeable Difference (JND) • … and many more.
  29. 29. @iainvcodex Walk-throughs • Encoding at multiple quality / bitrate levels • Visual comparison • Objective comparison • Building a rate-distortion curve
  30. 30. @iainvcodex Rate-Distortion curves Increasing Quality Increasing Bitrate Video A, Codec A, Bitrate A
  31. 31. @iainvcodex Increasing Quality Increasing Bitrate Video A, Codec A
  32. 32. @iainvcodex Increasing Quality Increasing Bitrate Video A, Codec A
  33. 33. @iainvcodex Increasing Quality Increasing Bitrate Video A, Codec A Video A, Codec B
  34. 34. @iainvcodex Increasing Quality Increasing Bitrate Video A, Codec A Video A, Codec B Video B, Codec A Video B, Codec B VIDEO A VIDEO B
  35. 35. @iainvcodex The trade-offs New codecs (HEVC, VP9) Higher bitrate Larger file sizes Slower encoding Better quality originals Old codecs (MP2, H264) Lower bitrate Smaller file sizes Faster encoding Worse quality originals
  36. 36. @iainvcodex What to remember • ‘Perfect’ video quality doesn’t really exist • Visually lossless may be good enough • Video quality measurement is NOT an exact science • There is always a trade-off • Every vendor says that their product has the ‘best’ quality.
  37. 37. @iainvcodex Do: Assess multiple different videos Assess multiple bitrates or file sizes Don’t: Rely on a vendor’s video or test Rely on a single quality measurement
  38. 38. @iainvcodex
  39. 39. @iainvcodex Resources • : Link to these slides • : Tutorials and resources • : Web-based video ingest and sharing • : Raw video files • Handbrake : User-friendly video coding and decoding • FFMpeg : Not-so-user-friendly video coding and decoding • VLC : Multi-standard video player (among other things) • Vooya : .Y4M comparison tool • Command lines for testing
  40. 40. @iainvcodex FFMPEG command lines • Encoding y4m with H.264 video codec, MP4 container, 2Mbps bitrate, PSNR measurement: ffmpeg -i source .y4m -codec h264 -b 2000000 destination.mp4 –psnr (Other codecs: -codec mpeg2video , -codec hevc, -codec vp9, …) • Decoding from coded media file (any) to y4m: ffmpeg -i source.mp4 destination.y4m