JTV节目指南格式

Creative Commons
本作品采用知识共享署名

在TV的节目指南常用EPG, xmltv, jtv三种格式标准,本文简要介绍JTV格式

JTV格式

JTV格式的节目指南首次出现在波兰运营商Yaroslav Kowalski的电视节目中。 JTV是一种二进制格式,JTV电视节目指南的数据通常是ZIP或RAR存档,其中打包了每个电视频道的节目指南文件对(带有NDX和PDT扩展名)。 JTV是互联网上流行的格式。

PDT文件:

文件开头是JTV 3.x TV Program Data 字符串
后面跟3个0x0A
从偏移0x1A开始,重复记录:
{
描述字符长度2字节
program name string
}

NDX文件

文件最开始2字节是program number
后面是连续的记录,每个记录12个字节
每个记录前2字节为0
后面8字节的FILETIME, 记录了program的起始时间

The FILETIME structure is a 64-bit value representing the number of 100-nanosecond intervals since January 1, 1601.

typedef struct _FILETIME { // ft
DWORD dwLowDateTime;
DWORD dwHighDateTime;
} FILETIME;
Members
dwLowDateTime - Specifies the low-order 32 bits of the file time. dwHighDateTime - Specifies the high-order 32 bits of the file time.

参考

http://epgservice.ru/company/format.php
https://github.com/tataranovich/jtv2xmltv/blob/master/docs/JTV.md#pdt