View Single Post
luca's Avatar
Posts: 1,137 | Thanked: 402 times | Joined on Sep 2007 @ Catalunya
#11
The format of the recording itself is mpeg-pes, mplayer/mencoder deals with it just fine (I'm still having problems transcoding with 770-encode.pl, but I manually transcoded with mencoder and played on the n800, but after adding vdr to the list of extensions I at least see the thumbnails just fine).
What's peculiar in vdr is the directory structure: each recording is in a subdirectory named

name_of_the_recording/date_time.priority.rec, e.g.

Donnie_Darko/2007-09-08.22.30.50.99.rec

(a recording made the 8th of september 2007, at 22:30:50, with priority 99, the priority it's only for vdr internals).

if episodes names are in use, there's an additional directory:

The_Avengers/Mission_Highly_Improbable/2007-08-02.21.08.50.99.rec

If it's a deleted recording, instead of .rec it will end in .del and shouldn't be shown in mediacenter

Inside each recording there's a bunch of files.
I'm copypasting from vdr.5 man page:

Code:
   AUDIO/VIDEO DATA
       The files 001.vdr...255.vdr are the actual recorded MPEG data files. In
       order  to  keep  the  size of an individual file below a given limit, a
       recording is split into several files. The contents of these  files  is
       Packetized  Elementary  Stream  (PES)  and contains ES packets with ids
       0xE0...0xEF for video (only one of these may actually occur in a file),
       0xC0...0xDF  for audio 1...32 (up to 32 audio tracks may occur).  Dolby
       Digital data is stored in packets with ids 0xBD  ("Private  Stream  1")
       and substream ids 0x80...0x87.

   INDEX
       The  file  index.vdr (if present in a recording directory) contains the
       (binary)  index  data  into   each   of   the   the   recording   files
       001.vdr...255.vdr.  It  is  used during replay to determine the current
       position within the recording, and to implement skipping and fast  for‐
       ward/back  functions.   See  the definition of the cIndexFile class for
       details about the actual contents of this file.
   INFO
       The file info.vdr (if present in  a  recording  directory)  contains  a
       description  of  the  recording, derived from the EPG data at recording
       time (if such data was available). The Aux field of  the  corresponding
       timer  (if given) is copied into this file, using the '@' tag.  This is
       a plain ASCII file and contains tagged lines like  the  EPG  DATA  file
       (see  the  description  of  the epg.data file). Note that the lowercase
       tags ('c' and 'e') will not appear in an info.vdr file.   Lines  tagged
       with  '#'  are ignored and can be used by external tools to store arbi‐
       trary information.

   RESUME
       The file resume.vdr (if present in a recording directory) contains  the
       position  within  the recording where the last replay session left off.
       The data is a four byte (binary) integer value and  defines  an  offset
       into the file index.vdr.

  MARKS
       The  file  marks.vdr (if present in a recording directory) contains the
       editing marks defined for this recording.  Each line contains the defi‐
       nition of one mark in the following format: (omitted)

  EPG DATA
       The  file  epg.data contains the EPG data in an easily parsable format.
       The first character of each line defines what kind of  data  this  line
       contains.

       The following tag characters are defined:
 
       C   <channel id> <channel name>
       E   <event id> <start time> <duration> <table id> <version>
       T   <title>
       S   <short text>
       D   <description>
       X   <stream> <type> <language> <descr>
       V   <vps time>
       e
       c
basically you only need the [0-9][0-9][0-9].vdr files and info.vdr to extract the information.
Instead of having the user drill down to the directory and show all the file, you should just give the directory name (and eventually the episode name).
This is an example info.vdr (as per the EPG DATA section above)

Code:
C S28.2E-2-2045-6316 BBC FOUR
E 41995 1186081800 3000 0 FF
T The Avengers
S Mission Highly Improbable
D Steed and Emma investigate a professor's ability to make things disappear.
X 2 03 eng
X 2 03 NAR