DESMISTIFICANDO 
OS CODECS 
GUILHERME ALBUK
Guilherme Albuk 
Fundador e diretor da 
N-PIX | Escola online de artes digitais 
http://n-pix.com 
Formado em Audiovisual na USP 
Artista de VFX e motion graphics 
Na área desde 2003 
Atuação em longas e curtas-metragens nacionais e internacionais, televisão e 
publicidade.
PROBLEMAS DIÁRIOS
Arquivos gigantes para mandar pela Internet 
WRITE YOUR SUBITTLE HERE. 
Arquivos que não abrem no computador do cliente 
Roda no Windows e não no Mac (e vice-versa) 
Baixa qualidade 
Desperdício de hardware e pessoal 
Vídeo lento em programas de edição e composição
CODECS SÃO DIFERENTES 
RESPOSTAS PARA UM 
PROBLEMA: 
ARMAZENAR E TRANSMITIR 
SEQUÊNCIAS DE IMAGENS DE 
FORMA EFICIENTE
CONCEITOS
CODECS x 
CONTAINERS
CODECS 
Compressão 
Algoritmo 
CONTAINER 
Formato de arquivo 
Forma de organizar a informação 
MPEG-2 
DV 
H:264 
H:265 
Apple ProRes 
ZIP 
JPEG / JPEG2000 
.mov 
.avi 
.mp4 
.tif 
.wmv 
Formatos RAW
= 
1 1 1 1 
1 0 0 1 
1 0 0 1 
1 1 1 1
= 
1 1 1 1 
1 0 0 1 
1 0 0 1 
1 1 1 1
= 
4x1 
1 2x0 1 
1 2x0 1 
4x1 
1 1 1 1 
1 0 0 1 
1 0 0 1 
1 1 1 1 
FilmePEG-1 
RLE 
Run-length encoding
= 
4x1 
1 2x0 1 
repete anterior 
repete primeira 
1 1 1 1 
1 0 0 1 
1 0 0 1 
1 1 1 1 
FilmePEG-2
= 
4x1 
1 2x0 1 
repete tudo 
ivnertendo 
1 1 1 1 
1 0 0 1 
1 0 0 1 
1 1 1 1 
FilmePEG-4 
Compressão espacial
BITRATE 
DADOS ARMAZENADOS POR 
SEGUNDO DE VÍDEO
Kb 
Mb 
KB 
MB
Kb 
Mb 
KB 
MB
Kb 
Mb 
KB 
MB
0 
0000 
1111 
=
BITRATE 
DADOS ARMAZENADOS POR 
SEGUNDO DE VÍDEO 
8 Mbps = 1 MB por segundo 
60 MB por minuto 
KB 3.6 GB por hora 
MB
QUANTO MAIOR O BITRATE, 
MELHOR A QUALIDADE DO VÍDEO? 
NÃO NECESSARIAMENTE 
KB 
MB
0.5 
0.4 
0.3 
0.1 
0. 
Mpixel/Mbps 
DV 
720x480 
25 Mbps 
EFICIÊNCIA 
= 
QUALIDADE 
BITRATE 
MPEG-2 HDV 
1920x1080 
25 Mbps 
H:264 
1920x1080 
8 Mbps 
H:265 HEVC 
1920x1080 
5 Mbps
DESCONSTRUINDO 
UM CODEC
I-FRAMES 
Intra-coded frames 
Frames independentes 
Somente há compressão espacial 
Alto bitrate
P-FRAMES 
Predictive frames 
Baseia-se em frames anteriores 
Baixo bitrate 
Frame 1 P2 
P1 
Frame 2 
+ =
B-FRAMES 
Bi-predictive frames 
Frame 1 Frame 3 
Baseia-se em frames anteriores e 
posteriores 
Beixíssimo bitrate 
Produzido em 2-pass encodings 
+ + 
Frame 2
COMPRESSÃO TEMPORAL
LOSSY x 
LOSSLESS
CBR x 
VBR (QR?)
BIT DEPTH
captação intermediação exibição 
RAW 
Apple ProRes 
AVCHD (H:264) 
Quicktime (H:264) 
CinemaDNG 
Apple ProRes 
Avid DNxHD / DNxHR 
DPX 
TIFF (ZIP) 
OpenEXR (multicanal e 
multicompressão - PIZ) 
H:264 (container .mp4) 
x264 (QR 22-20) 
H:265 
JPEG2000 (DCP) 
Emissoras têm regras 
específicas 
I-Frames I-Frames Master I, P e B-Frames
OBRIGADO :) 
@albuk /gui.albuk

Desmistificando os Codecs - Guilherme Albuk - FilmeCon