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