5.1. 使用数字电视框架¶
5.1.1. 简介¶
数字电视和模拟电视之间一个重要的区别是,粗心的人(像我一样)应该考虑的是,虽然 DVB-T 卡的组件结构与模拟电视卡基本相似,但它们的功能方式却大不相同。
模拟电视的目的是接收和显示模拟电视信号。模拟电视信号(也称为复合视频)是对一系列图像帧(欧洲每秒 25 帧)的模拟编码,这些图像帧使用隔行扫描技术进行光栅化。隔行扫描需要两个场来表示一个帧。因此,PC 的模拟电视卡具有以下用途
调整接收器以接收广播信号
解调广播信号
解复用模拟视频信号和模拟音频信号。
注意
一些国家/地区使用嵌入在调制复合模拟信号中的数字音频信号 - 使用 NICAM 信号。
数字化模拟视频信号,并将生成的数据流提供给数据总线。
来自模拟电视卡的数字数据流由卡上的电路生成,并且通常以未压缩的形式呈现。对于以 768x576 24 位彩色像素的分辨率编码的 PAL 电视信号,每秒 25 帧 - 生成相当多的数据,必须由 PC 处理才能在视频监视器屏幕上显示。PC 的一些模拟电视卡具有板载 MPEG2 编码器,允许以编码和压缩的形式将原始数字数据流呈现给 PC - 类似于数字电视中使用的形式。
一个简单的低成本数字电视卡(DVB-T、C 或 S)的目的是
调整接收以接收广播信号。 * 从广播信号中提取编码的数字数据流。
将编码的数字数据流 (MPEG2) 提供给数据总线。
两者之间的显著区别在于,模拟电视卡上的调谐器输出模拟信号,而数字电视卡上的调谐器输出压缩编码的数字数据流。由于信号已经数字化,因此将此数据流以最少的额外处理传递到 PC 数据总线是微不足道的,然后提取数字视频和音频数据流,将它们传递到适当的软件或硬件进行解码和查看。
5.1.2. 使卡启动¶
Linux 下 DVB 的设备驱动程序 API 将通过 devfs 文件系统提供以下设备节点
/dev/dvb/adapter0/demux0
/dev/dvb/adapter0/dvr0
/dev/dvb/adapter0/frontend0
/dev/dvb/adapter0/dvr0
设备节点用于读取 MPEG2 数据流,/dev/dvb/adapter0/frontend0
设备节点用于调整前端调谐器模块。/dev/dvb/adapter0/demux0
用于控制将接收哪些节目。
根据卡的功能集,设备驱动程序 API 还可以公开其他设备节点
/dev/dvb/adapter0/ca0
/dev/dvb/adapter0/audio0
/dev/dvb/adapter0/net0
/dev/dvb/adapter0/osd0
/dev/dvb/adapter0/video0
/dev/dvb/adapter0/ca0
用于解码加密频道。其他设备节点仅在使用 av7110 驱动程序的设备上找到,该驱动程序现已过时,以及此类设备使用的额外 API。
5.1.3. 接收数字电视频道¶
本节试图解释它是如何工作的,以及这如何影响数字电视卡的配置。
在这个例子中,我们正在考虑在澳大利亚墨尔本地区收看 DVB-T 频道。
丹德农山发射器广播的频率目前为
表 1. 发射机频率 丹德农山,维多利亚州,澳大利亚。
广播公司 |
频率 |
---|---|
七号 |
177.500 兆赫 |
SBS |
184.500 兆赫 |
九号 |
191.625 兆赫 |
十号 |
219.500 兆赫 |
ABC |
226.500 兆赫 |
31 频道 |
557.625 兆赫 |
数字电视扫描实用程序(如 dvbv5-scan)对各个国家和地区使用一组编译的默认值。这些目前作为单独的软件包提供,名为 dtv-scan-tables。它的 git 树位于 LinuxTV.org
如果没有合适的表,可以在命令行上指定一个包含转发器频率的数据文件。这是上面频道转发器的示例文件,采用旧的“频道”格式
# Data file for DVB scan program
#
# C Frequency SymbolRate FEC QAM
# S Frequency Polarisation SymbolRate FEC
# T Frequency Bandwidth FEC FEC2 QAM Mode Guard Hier
T 177500000 7MHz AUTO AUTO QAM64 8k 1/16 NONE
T 184500000 7MHz AUTO AUTO QAM64 8k 1/8 NONE
T 191625000 7MHz AUTO AUTO QAM64 8k 1/16 NONE
T 219500000 7MHz AUTO AUTO QAM64 8k 1/16 NONE
T 226500000 7MHz AUTO AUTO QAM64 8k 1/16 NONE
T 557625000 7MHz AUTO AUTO QPSK 8k 1/16 NONE
如今,我们更喜欢使用更新的格式,该格式更详细且更易于理解。使用新格式,表示“七号”频道转发器的数据如下
[Seven]
DELIVERY_SYSTEM = DVBT
FREQUENCY = 177500000
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = AUTO
CODE_RATE_LP = AUTO
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
INVERSION = AUTO
有关完整表的更新版本,请参阅
当数字电视扫描实用程序运行时,它将输出一个文件,其中包含每个频道的转发器中存在的所有音频和视频节目的信息,该卡的后端可以锁定这些信息。(即,任何在您的天线处信号足够强的。)
这是从墨尔本进行的频道扫描中 dvbv5 工具的输出
[ABC HDTV]
SERVICE_ID = 560
VIDEO_PID = 2307
AUDIO_PID = 0
DELIVERY_SYSTEM = DVBT
FREQUENCY = 226500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 3/4
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[ABC TV Melbourne]
SERVICE_ID = 561
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 226500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 3/4
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[ABC TV 2]
SERVICE_ID = 562
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 226500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 3/4
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[ABC TV 3]
SERVICE_ID = 563
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 226500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 3/4
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[ABC TV 4]
SERVICE_ID = 564
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 226500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 3/4
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[ABC DiG Radio]
SERVICE_ID = 566
VIDEO_PID = 0
AUDIO_PID = 2311
DELIVERY_SYSTEM = DVBT
FREQUENCY = 226500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 3/4
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN Digital]
SERVICE_ID = 1585
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN Digital 1]
SERVICE_ID = 1586
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN Digital 2]
SERVICE_ID = 1587
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN Digital 3]
SERVICE_ID = 1588
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN Digital]
SERVICE_ID = 1589
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN Digital 4]
SERVICE_ID = 1590
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN Digital]
SERVICE_ID = 1591
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN HD]
SERVICE_ID = 1592
VIDEO_PID = 514
AUDIO_PID = 0
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[TEN Digital]
SERVICE_ID = 1593
VIDEO_PID = 512
AUDIO_PID = 650
DELIVERY_SYSTEM = DVBT
FREQUENCY = 219500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[Nine Digital]
SERVICE_ID = 1072
VIDEO_PID = 513
AUDIO_PID = 660
DELIVERY_SYSTEM = DVBT
FREQUENCY = 191625000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[Nine Digital HD]
SERVICE_ID = 1073
VIDEO_PID = 512
AUDIO_PID = 0
DELIVERY_SYSTEM = DVBT
FREQUENCY = 191625000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[Nine Guide]
SERVICE_ID = 1074
VIDEO_PID = 514
AUDIO_PID = 670
DELIVERY_SYSTEM = DVBT
FREQUENCY = 191625000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 3/4
CODE_RATE_LP = 1/2
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/16
HIERARCHY = NONE
[7 Digital]
SERVICE_ID = 1328
VIDEO_PID = 769
AUDIO_PID = 770
DELIVERY_SYSTEM = DVBT
FREQUENCY = 177500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[7 Digital 1]
SERVICE_ID = 1329
VIDEO_PID = 769
AUDIO_PID = 770
DELIVERY_SYSTEM = DVBT
FREQUENCY = 177500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[7 Digital 2]
SERVICE_ID = 1330
VIDEO_PID = 769
AUDIO_PID = 770
DELIVERY_SYSTEM = DVBT
FREQUENCY = 177500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[7 Digital 3]
SERVICE_ID = 1331
VIDEO_PID = 769
AUDIO_PID = 770
DELIVERY_SYSTEM = DVBT
FREQUENCY = 177500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[7 HD Digital]
SERVICE_ID = 1332
VIDEO_PID = 833
AUDIO_PID = 834
DELIVERY_SYSTEM = DVBT
FREQUENCY = 177500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[7 Program Guide]
SERVICE_ID = 1334
VIDEO_PID = 865
AUDIO_PID = 866
DELIVERY_SYSTEM = DVBT
FREQUENCY = 177500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[SBS HD]
SERVICE_ID = 784
VIDEO_PID = 102
AUDIO_PID = 103
DELIVERY_SYSTEM = DVBT
FREQUENCY = 536500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[SBS DIGITAL 1]
SERVICE_ID = 785
VIDEO_PID = 161
AUDIO_PID = 81
DELIVERY_SYSTEM = DVBT
FREQUENCY = 536500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[SBS DIGITAL 2]
SERVICE_ID = 786
VIDEO_PID = 162
AUDIO_PID = 83
DELIVERY_SYSTEM = DVBT
FREQUENCY = 536500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[SBS EPG]
SERVICE_ID = 787
VIDEO_PID = 163
AUDIO_PID = 85
DELIVERY_SYSTEM = DVBT
FREQUENCY = 536500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[SBS RADIO 1]
SERVICE_ID = 798
VIDEO_PID = 0
AUDIO_PID = 201
DELIVERY_SYSTEM = DVBT
FREQUENCY = 536500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE
[SBS RADIO 2]
SERVICE_ID = 799
VIDEO_PID = 0
AUDIO_PID = 202
DELIVERY_SYSTEM = DVBT
FREQUENCY = 536500000
INVERSION = OFF
BANDWIDTH_HZ = 7000000
CODE_RATE_HP = 2/3
CODE_RATE_LP = 2/3
MODULATION = QAM/64
TRANSMISSION_MODE = 8K
GUARD_INTERVAL = 1/8
HIERARCHY = NONE