forked from openatv/enigma2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFILEFORMAT
66 lines (45 loc) · 1.8 KB
/
FILEFORMAT
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
== TS FILES ==
TS files are plain recordings, including PMT and PAT.
They don't have a private header.
== .meta FILES ==
.meta files have currently up to 7 lines:
<service reference>
<name>
<description>
<recording time>
[<tags>]
[<length>]
[<filesize>]
The service reference contains the Service-ID of the recorded service. With
that ID, you can find the PMT and the elementary streams.
As a backup method, just find the first available PMT and use that.
Strings are always UTF-8 encoded.
tags is a space-delimited list of tags assigned to this movie.
length is the length of the recording, in PTS-units (1/90000s). filesize was
the filesize at the time the length was calculated, so you can validate if
this is still up-to-date or must be recalculated.
== .ap FILES ==
Stored offsets and PTS values. They are collected while recording. Only
GOP starts are stored.
File format is network-ordered (i.e. big endian), each entry contains
two 64 bit values (PTS, offset).
PTS values are not corrected (i.e. they aren't zero-based), offsets are
relative to the beginning of the file (or first file, when we implement
splitting)
== .cut FILES ==
Also network ordered, they contain a 64bit value (PTS) and 32bit value
(type) for each cut. (If you want file offsets, use the .ap file to look up
the PTS values.)
Type is:
0 - 'in' point
1 - 'out' point
2 - mark
If the first 'out'-point is not preceeded by an 'in'-point, there is an
implicit 'in' point at zero.
If the there is no final 'out' point, the end-of-file is an implicit
'out'-point.
Note that the PTS values are zero-based and continouus. If you want absolute
PTS values, you can either:
- use the .ap file, find discontinuities, and interpolate between the APs
- or just use the first PTS value as an offset, and work around PTS
wraparounds. (simple method)