Independent guides to games and computersNot affiliated with any game or hardware company
Allxrs

Software & Tips

File Formats Explained: Images, Video and Audio

The letters after the dot in a file name tell a computer how the contents are arranged and which program should open them. For media files there are dozens of these extensions, and choosing the wrong one has real effects: a screenshot with smeared text, a video that will not play on a television, or a music folder several times larger than it needs to be.

There is no need to memorize every format. A handful of ideas explain nearly all of them, and once those are clear the common extensions fall into a few groups with obvious uses.

Compression: lossy and lossless

Raw media is large. An uncompressed photo stores a color value for every pixel, and uncompressed video stores that many values again for every frame. Compression makes files practical to store and send, and it comes in two kinds.

Lossless compression reorganizes the data so it takes less room and can be rebuilt exactly, in the same way a compressed archive returns the original documents. Nothing is thrown away, so the saving is moderate.

Lossy compression discards detail that people are less likely to notice, such as subtle color changes or very quiet sounds hidden behind loud ones. The saving is much larger, and the result can be hard to tell from the original at sensible settings. The removed detail is gone for good, though. Each time a lossy file is opened, edited and saved again as lossy, a little more is lost. This is called generation loss, and it is the reason to keep an original copy of anything you plan to edit.

Image formats and what each suits

Most still images are raster images, meaning a grid of colored pixels. The common raster formats differ mainly in how they compress.

  • JPEG is lossy and designed for photographs. It handles smooth gradients and natural scenes well and produces small files. It does poorly with sharp edges and text, where it leaves fuzzy halos, and it does not support transparency.
  • PNG is lossless and supports transparency. It suits screenshots, interface graphics, pixel art and anything with text or flat color. Photographs saved as PNG are accurate but large.
  • GIF is an old format limited to a small palette of colors. It survives because it supports simple animation, though short video files usually look better at a smaller size.
  • WebP and AVIF are newer formats built for the web. They offer both lossy and lossless modes, transparency and animation, typically at smaller sizes than older formats. Support in current browsers is broad, while some older programs cannot open them.
  • RAW files hold the unprocessed data from a camera sensor. They are large and need special software, and they give photographers the most room to adjust exposure and color afterward.

Vector images work differently. A format such as SVG stores shapes, lines and curves as instructions, so the picture can be scaled to any size without blurring. That makes vectors a natural fit for logos, icons and diagrams, and a poor fit for photographs.

Video: containers and codecs

Video is where file names mislead most often, because a video file has two layers. The container is the wrapper that holds the video track, one or more audio tracks, subtitles and timing information. The codec is the method used to compress each track. The extension tells you only the container.

Common containers include MP4, which is the most widely accepted by phones, televisions, browsers and sharing sites; MKV, which is flexible and popular for recordings because it can hold many tracks and survives an interrupted recording better; and WebM, an open format designed for the web.

Common video codecs include H.264, which plays on nearly everything; H.265, also called HEVC, which reaches similar quality at a lower bitrate but is not supported everywhere; and AV1, a newer open codec that is efficient and increasingly supported by recent hardware and browsers. Newer codecs generally need more processing power to encode, and smooth playback may depend on the device having hardware decoding for them.

This two-layer design explains a common puzzle. Two files that both end in the same extension can behave differently, with one playing and the other showing a black screen with sound, because the codecs inside are different. When a video will not play, the codec is the thing to check, using the file properties or a media information tool.

Audio formats

Audio formats divide along the same lossy and lossless line.

  • WAV and AIFF usually hold uncompressed audio. They are large and exact, and are used for recording and editing.
  • FLAC is lossless compression for audio. It keeps every detail of the original at a noticeably smaller size and is common for music archives.
  • MP3 is the long-established lossy format that plays on almost any device.
  • AAC is a later lossy format, widely used inside video files and by streaming services, and generally more efficient than MP3 at the same bitrate.
  • Opus, often stored in an Ogg container, is an open lossy codec that performs well at low bitrates and is widely used for voice chat and streaming.

Resolution, bitrate and file size

Format is only one of the things that set quality and size. Resolution is the number of pixels in an image or video frame, such as 1920 by 1080. Frame rate is how many frames are shown each second. Bitrate is the amount of data used per second of video or audio, and it has the largest influence on both quality and file size for lossy media.

A high resolution with a starved bitrate looks worse than a lower resolution given enough data, which is why a recording can be sharp when the picture is still and blocky during fast movement. Audio has matching settings: sample rate and bit depth describe how precisely the sound was captured, and bitrate describes how much data the compressed version keeps. Raising any of these beyond what the source contains makes the file bigger without making it better.

Converting without losing more than necessary

Converting between formats is routine, and a few principles keep the damage low.

  • Keep the original file. Convert a copy and store the source somewhere safe.
  • Converting lossy to lossless does not restore detail. An MP3 saved as FLAC is a bigger file with the same sound.
  • Avoid chains of lossy conversions. Go from the original to the final format in one step where possible.
  • Changing only the container, known as remuxing, moves the tracks into a new wrapper without recompressing them, so no quality is lost. Many video tools offer this.
  • Renaming the extension does not convert anything. It only confuses the programs that try to open the file.
  • Be cautious with online converter sites for private material, since the file is uploaded to someone else's server. Converters that run on your own computer avoid that.

A quick guide to choosing a format

When saving or exporting, ask where the file is going and whether it will be edited again. These rules of thumb cover most everyday cases, and the help pages of the site or device you are sending to will list what it accepts.

  1. Photograph for sharing: JPEG, or a newer web format if the destination supports it.
  2. Screenshot, diagram or image with text or transparency: PNG.
  3. Logo or icon that must scale: SVG.
  4. Video for sharing or uploading: an MP4 container with H.264 video and AAC audio is the most compatible choice.
  5. Long recording you will edit later: a container that tolerates interruption, converted or remuxed afterward.
  6. Music or voice for listening: a lossy format at a moderate bitrate.
  7. Anything you will edit again, or want to archive: a lossless format, plus the original.

Informational content only. Allxrs is an independent publication and is not affiliated with any game, hardware or software company. We do not sell products and nothing here is a recommendation to buy. Products, features and prices change: confirm current details on the manufacturer's or platform's own pages, and follow the device manual before opening or modifying any hardware.

Keep reading