Skip to content

Instantly share code, notes, and snippets.

View vvtam's full-sized avatar
🚴‍♂️
Focusing

tam vvtam

🚴‍♂️
Focusing
  • nowhere
  • ct
View GitHub Profile
一、为什么会产生field概念
二、MBAFF
一、为什么会产生field概念
人眼可察觉到的电视视频图像刷新中的闪烁为0.02秒,即当电视系统的帧率低于50帧/秒,人眼可感觉得出画面的闪烁。常规如PAL制式电视系统帧率为25帧/秒、NTSC制式的则为30帧/秒,如果采用逐行扫描将不可避免地在视频刷新时产生闪烁现象。而另一方面如果单纯的提高帧率达到避免闪烁刷新效果,则会增加系统的频带宽度。
这便引出了隔行扫描技术及field的概念。
在隔行扫描中,每一帧包含两个场(top field和bottom field),其中每个field包含一帧中一半数量的水平线(top field包含所有奇数线,bottom field则包含所有偶数线)。则在电视显示过程中,电子枪每发射一行隔一行---先发射奇数行13579…(top field)回头再发射2468…(bottom field)利用两次扫描来完成一幅图像,因为视觉的滞留性,我们看到的效果是差不多的。如在 NTSC 视频中frame的频率为30次/秒-àfield的频率则为60次/秒,大于了人眼可察觉闪烁的频率。
@vvtam
vvtam / shell and python
Last active January 16, 2018 02:54
shell and python
#!/bin/bash
OLD_IFS="$IFS"
IFS=$'\x0A'
for i in $(cat slist); do
find $i -size +2M >> video.list
done
IFS=$OLD_IFS
@vvtam
vvtam / ffmpeg
Last active May 22, 2018 01:35
ffmpeg
/usr/local/ffmpeg/bin/ffmpeg -y -i "input" \
-vcodec h264 -x264-params "nal-hrd=cbr" -b:v 8M -minrate 8M -maxrate 8M -bufsize 2M \
-s 1920x1080 -aspect "16:9" -r 25 \
-acodec aac -b:a 192K -ar 48000 ./"output"
# 4:3 into 16:9
ffmpeg \
-i input_file \
-filter:v "pad=ih*16/9:ih:(ow-iw)/2:(oh-ih)/2" \
-c:a copy \