File formats:
Quality & Size

Peter Bubestinger-Steindl
(peter @ ArkThis.com)

October 2022

Filesize (still) matters

Type Duration Bitrate Filesize Usage
Video 1 hour 210 Mb/s 92 GB Preservation
50 Mb/s 22 GB Preservation
25 Mb/s 11 GB Preservation / Production
1,5 Mb/s 1 GB Access
Audio 1 hour 4,6 Mb/s 2 GB Preservation
128 kb/s 56 MB Access

Bitrate = Data per Time

How many bytes may your encoder spend on the quality of the material?

  • Higher bitrate:
    Better quality / larger files
  • Better codec:
    Better quality at same size

Bitrate & Quality

“Your initial bitrate will inform the quality of all subsequent footage that comes from that video data. Aim for the highest practical bitrate.” — Source: Adobe.com

Format Bitrate
DVCPro50 (SD) 50 Mbps
DVCPro HD 100 Mbps
DVD (max) 9.8 Mbps
720p 5 Mbps
1080p 8 Mbps
4K 35-45 Mbps

Bitrate = Data per Time

  • Mbps / 8 = MB / second
  • MB/s * 60 = MB / minute
  • MB/min * 60 = MB / hour
  • MB / 1024 = GB / 1024 = TB

Bitrate: Constant vs Variable

  • CBR: Constant BitRate
    Fixed value of data-per-time.
    Great to calculate/estimate size/bandwidth.
    Not optimized for saving space.

  • VBR: Variable BitRate
    Encoder increases/decreases bitrate, depending on complexity of AV content.
    Common to define min/max boundaries.
    Smaller files, but hard(er) to estimate size/bandwidth.

Size

  • Bitrate = Size vs Quality
    (bitrate as parameter exists only for lossy encoding)
  • Uncompressed > lossless > lossy
  • Larger = less processing power, but:
    More disk/net I/O bandwidth required.

Performance

Often a tradeoff between:

Processing power (CPU/RAM)
(format/algorithm complexity, smaller files)
I/O bandwidth (disk/network)
(data size)

Format Examples

Video Audio in Container
Preservation:
  • V210
  • FFV1, J2K
  • High-bitrate lossy
  • DPX/TIFF
  • PCM (WAV)
  • FLAC
  • MOV
  • MKV
  • MXF
  • Folder (film)
Production:
  • ProRes
  • H.264
  • DVCPRO50
Access:
  • H.264
  • VP9
  • DVD
  • BluRay
  • MP3
  • AAC
  • Opus
  • MP4 (M4V)
  • MKV (WebM)
  • MPG

Quality & Compression

Lossy, Lossless, Uncompressed?

  • “AV compression is most-commonly lossy.” (nowadays)
  • “If you can define bitrate as encoding parameter, it is definitely a lossy format.”
  • “Uncompressed is the most dead simple to reverse engineer in the future, but has no error-resilience mechanisms.”
  • “Non-lossy allows fully-auto-validated format migrations. bit-proof.”

Visually lossless = lossy 😇

Zlad! Elektronik Supersonik

Generation Loss

Lossless

“It’s like ZIP for film!”

  • No generation loss
  • Way larger than lossy
  • but: Smaller than uncompressed

Uncompressed

  • No generation loss
  • Dead simple (=preserves well)
  • The largest possible version
  • Uncompressed != Uncompressed?
    There’s more than just 1 “uncompressed”
    (Ex: RGB, BGR, UYVY, YUY2, V210, etc)

Uncompressed - Think of it as:

First pixels of RGB Lines/Frame (8bpc)

RGB RGB RGB RGB ...       (4 pixel * 3 Byte)  = 12 Bytes)
= 24 bit/px

Same with alpha (transparency) channel

RGBA RGBA RGBA RGBA ...       (4 pixel * 4 Byte)  = 16 Bytes)
= 32 bit/px

Quality Tips

  • Avoid generation loss. (if possible)
  • Avoid resizing. (=rescaling)
  • Don’t invent more bits. (e.g. DV as v210)
  • Preserve colorspace / bit-depth, etc.
  • More headroom for lower quality. (e.g. 24bit/96kHz for Shellack)
  • Select high enough bitrate. (lossy)
    (Or proper “Constant Rate Factor (CRF)”)

Default Formats

Video:
  • Image: Default = lossy encoding
  • Audio: production = PCM, consumer = AAC
  • Metadata: Often embedded. Sometimes sidecar.
Film:
  • Image: DPX / TIFF files
  • Audio: PCM in WAV
  • Metadata: Mostly sidecar, some MD in image files.

Questions?

Comments?

Calculating Size

Filesize

Uncompressed Image

  • Width(px) x Height(px)
  • x Bits-Per-Pixel(bpp)
  • x FPS
  • / 8 = 1 second (in Byte)

Filesize

Uncompressed Audio

  • Samplerate x Bit-depth
  • x channels (even if silence!)
  • / 8 = 1 second (in Byte)

Exercise:

  • How large is an 8bpc SD PAL minute (720x576px, @25fps) minute?
    with 4 channels audio at SDI standard (48kHz/16bit)?
  • Or a 2k 16bpc(!) scan (including 6 channels audio at 48kHz/24bit)?
  • Or 74min. of audio CD (red-book standard: 44.1kHz/16bit, stereo)?
  • 60min 50MBit video (in GB)?