Tvheadend NTSC » History » Version 1
chris1h1 -, 2010-05-27 04:26
1 | 1 | chris1h1 - | |
---|---|---|---|
2 | == Analogue NTSC with HTS-Tvheadend == |
||
3 | |||
4 | Tvheadend does not work "out of the box" with analogue NTSC, rather it is necessary to compile tvheadend from source. This guide is aimed at relative Linux novices, and reflects the steps that I took myself when starting with a fresh installation of XBMC Live. Credit is due to Hein (who in turn credited Ram) from the tvheadend mailing list for getting me off on the right track. |
||
5 | |||
6 | First, make sure you have the packages installed that are required to build tvheadend: |
||
7 | |||
8 | {{{ |
||
9 | sudo aptitude install build-essential libavahi-client-dev subversion |
||
10 | }}} |
||
11 | |||
12 | Now create the following directory. This is where we'll download the source code to and eventually build the application: |
||
13 | |||
14 | {{{ |
||
15 | mkdir -p /opt/tvheadend/src |
||
16 | }}} |
||
17 | |||
18 | Now you need to check out the Tvheadend source code using svn: |
||
19 | |||
20 | {{{ |
||
21 | svn co svn://svn.lonelycoder.com/hts/trunk/tvheadend /opt/tvheadend/src/ |
||
22 | }}} |
||
23 | |||
24 | We need to make a small edit to a file to switch analogue support from PAL to NTSC: |
||
25 | |||
26 | {{{ |
||
27 | cd /opt/tvheadend/src/src |
||
28 | nano v4l.c |
||
29 | }}} |
||
30 | |||
31 | Press Cntl + W to perform a search in this file. Search for the following: |
||
32 | |||
33 | {{{ |
||
34 | v4l2_std_id |
||
35 | }}} |
||
36 | |||
37 | Change: |
||
38 | |||
39 | {{{ |
||
40 | v4l2_std_id std = 0xff; |
||
41 | }}} |
||
42 | |||
43 | To: |
||
44 | |||
45 | {{{ |
||
46 | v4l2_std_id std = V4L2_STD_NTSC; |
||
47 | }}} |
||
48 | |||
49 | Cntl + X to close, Y to save, Enter/Return to save with the existing file name. |
||
50 | |||
51 | Run the configuration script: |
||
52 | |||
53 | {{{ |
||
54 | cd .. |
||
55 | ./configure --prefix=/opt/tvheadend --release |
||
56 | }}} |
||
57 | |||
58 | If all went well you can compile the Tvheadend source code: |
||
59 | |||
60 | {{{ |
||
61 | make |
||
62 | }}} |
||
63 | |||
64 | If the source is compiled with no errors you can install the compiled source: |
||
65 | |||
66 | {{{ |
||
67 | make install |
||
68 | }}} |
||
69 | |||
70 | Stop the existing version of tvheadend, in order to copy the new files over the existing ones. Find the PID of everything running that includes "tvheadend" in the name: |
||
71 | |||
72 | {{{ |
||
73 | ps aux | grep tvheadend |
||
74 | }}} |
||
75 | |||
76 | The PID is the first number, after "hts". Kill it (replace PID with the actual number from the previous command): |
||
77 | |||
78 | {{{ |
||
79 | sudo kill PID |
||
80 | }}} |
||
81 | |||
82 | Make sure tvheadend is not running any longer by trying to access the web ui - you should get a "not responding" style error. |
||
83 | |||
84 | Copy the new files over the existing ones (the "-i" will prompt you to make sure you want to overwrite the files that already exist at the new location. This is just to give feedback that the paths are correct): |
||
85 | |||
86 | {{{ |
||
87 | cp -i /opt/tvheadend/bin/tvheadend /usr/bin/tvheadend |
||
88 | cp -i /opt/tvheadend/share/man1/tvheadend.1 /usr/share/man1/tvheadend.1 |
||
89 | }}} |
||
90 | |||
91 | Run tvheadend with no username or password prompt, in order to set these credentials from within the web ui: |
||
92 | |||
93 | {{{ |
||
94 | cd /usr/bin |
||
95 | ./tvheadend -C |
||
96 | }}} |
||
97 | |||
98 | Go to the web ui and set an admin username and password in the "Configuration > Access Control" area. Confirm that you're now running a version from SVN by visiting the "About" tab. |
||
99 | |||
100 | Restart the computer. Since the executable is at the same path and has the same name, the existing script in /etc/init.d/ should start tvheadend upon boot (assuming you're using a recent version of XBMC Live). |
||
101 | |||
102 | Note: If XBMC starts up with just a small grey error message in the middle of the screen complaining about OpenGL, issue the following command and say "yes" to everything once it finishes the long download stage: |
||
103 | |||
104 | {{{ |
||
105 | sudo nvidia-installer --update |
||
106 | }}} |