~registry/hyberia/0.2

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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
touei README
============

Version  : 0.1
Revision : 43

1) Authors and thanks
---------------------

* Mathieu Charron  (LP: elwillow)
* Jamie Nadeau     (LP: james2432)
* Martin Samson    (LP: pyrolian)

contribution from:

* No one yet.

Thanks to:

The MPlayer project for their outstanding player
Matroska for their great container that doesn't suck.

2) Licensing
------------

Eiffel Forum License, version 2

1. Permission is hereby granted to use, copy, modify and/or
   distribute this package, provided that:
      * copyright notices are retained unchanged,
      * any distribution of this package, whether modified or not,
        includes this license text.
2. Permission is hereby also granted to distribute binary programs
   which depend on this package. If the binary program depends on a
   modified version of this package, you are encouraged to publicly
   release the modified version of this package.

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT WARRANTY. ANY EXPRESS OR
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE TO ANY PARTY FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THIS PACKAGE.

3) Requirements
---------------

* Python 2.6
* C compiler (gcc)
* C++ compiler (g++)
* mkvtoolnix
* MPlayer with demuxer for you video files
* Custom xorg configuration (optional)
* Your video file with specific filename
* Enough of disk space for the video muxing

@TODO: Missing how to configure xorg and initrc
@TODO: add source for software

There is NO check if those programs are installed. You should make sure they are.

4) Prerequisites
----------------

** filename pattern **

First you need to rename your file according to a specific pattern:
- The first 4 characters are the time the video will be played in
  24 military hours format (4h00 PM = 1600).
  Minutes need to comply with a modulus 5, meaning must be a multiple of 5. 1604 is invalid.

- A dot "."

- The name of the video. it will be used for the subtitling of the
  introduction video. It NEEDS to be unique.
  NO SPACE. Use underscores, they will be replaced by space. Also, don't
  worry about the case, it will be `Title` for the intro video.

- The ".mkv" string for extension.

If you want to play "Higurashi no Naku Koro ni" at 3h45 PM the filename
will be:

   1545.Higurashi_no_Naku_Koro_ni.mkv

** File structure **

The file structure is simple, inside the folder in the LOCATION config
entry you will need one folder for each day. The name of the folder is a
zero padded day of the month(04 for the 4th of the month,10 for the 10th of the month).
If the location does not exist, the script will die.
The script will also create the folder structure in the TMP-LOCATION.
If you are not sure what is the structure delete the TMP-LOCATION folder
and it will be recreated.

Since the default is in the /tmp you shouldn't worry to much, as it is wiped
at each reboot. Just make sure there is enough space for the intro videos.


5) Installation
---------------

Until there is a better way to install this setup, follow these instructions:

- Execute as root:
    ./install.sh
  It will build and install toueid and readconfig then execute setup.py.
  
  This accepts the fallowing arguments: install, uninstall, clean

  -install: This option is selected by default, and will build and install the application
  -uninstall: This will uninstall the application
  -clean: cleans the temporary files created during build

- Now run toueid and check if there is any error in the logs
  Just hit ctrl+c when you're done (toueid will send SIGTERM to mplayer and
  touei_run. touei_run does not output anything to the console. You should
  run a `tail -f` in the log file (default is /tmp/touei_main.log)

- Set whatever script you will use to monitor the status of toueid
  (The inittab is a good location).

- Enjoy

***** WARNING WARNING ******
THIS IS A BETA, WE ARE NOT RESPONSABLE IF YOUR MACHINE EXPLODES.
PLEASE BE AWARE THAT IT IS NOT PRODUCTION READY.
We hope 0.2 will be.

6) Configuration
----------------

Please see the touei.conf.sample for the configuration instruction.

The default location is /etc/touei.conf. You can set a different path
in the touei_run file (located in /usr/local/bin) but it will break the
daemon. touei_run can also be run manually if you also start mplayer manually.

Log file are located in /tmp by default. Be aware that they are deleted at
reboot. You should change that behavior. I wanted to place them in /var
but a regular user doesn't have write access.


7) Reference
-----------

Subtitle: http://www.matroska.org/technical/specs/subtitles/ssa.html
Video Container: http://www.matroska.org/node/46


# EOF