Video audio basic knowledge

  1. Codec(code + decode)

Because of the video file is very big, so need code(compress) the file to it smaller. when playing the file, decode the video to play. Common video encoding format: H264, VP8, mpeg4, msmpeg4v2… Common audio encoding format: aac, ac3, DTS, mp3, vorbis…

  1. Container

a file format store codeced file, can contain multi streams(video stream, audio stream, subtitle stream). Common video format: mkv, mp4, webm, mov, flv, avi… Common audio format: mp3, aac, ac3, ogg, wma…

  1. Demux/Mux

Demux: use demuxer parse the different stream from container. Mux: use muxer into the different stream according to rules to container.

  1. Playback

    • access
    • demux
    • decode
    • output