summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/local-website/htdocs/mythtv-doc/mythtv-HOWTO-23.html
blob: 8b7439eeaf42892e05738d0526923b31be99d16c (plain)
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
<HTML>
<HEAD>
 <META NAME="GENERATOR" CONTENT="LinuxDoc-Tools 0.9.21">
 <TITLE>Installing and using MythTV: Miscellaneous. </TITLE>
 <LINK HREF="mythtv-HOWTO-24.html" REL=next>
 <LINK HREF="mythtv-HOWTO-22.html" REL=previous>
 <LINK HREF="mythtv-HOWTO.html#toc23" REL=contents>
</HEAD>
<BODY>
<A HREF="mythtv-HOWTO-24.html">Next</A>
<A HREF="mythtv-HOWTO-22.html">Previous</A>
<A HREF="mythtv-HOWTO.html#toc23">Contents</A>
<HR>
<H2><A NAME="s23">23.</A> <A HREF="mythtv-HOWTO.html#toc23">Miscellaneous. </A></H2>

<H2><A NAME="ss23.1">23.1</A> <A HREF="mythtv-HOWTO.html#toc23.1">I'd like to watch the files without using MythTV / I'd like to convert the files to some other format</A>
</H2>

<P>First, check if the <B>mytharchive</B> plugin does what you want.  If not, then
read on:</P>
<P>MythTV comes with a utility called <B>mythtranscode</B> which can
decode nuv files into raw format for use with other applications.  This
command-line utility was not designed to be used by the end-user, but
instead to be called by other applications or scripts.  Programs like
<B>nuvexport</B> (
<A HREF="http://forevermore.net/myth/">http://forevermore.net/myth/</A>) are better suited for the end user. 
However, since <B>mythtranscode</B> can be a useful tool, directions on
using it follow.</P>
<P><B>mythtranscode</B> creates raw streams, which means that they do not
contain any container information such as resolution, frame-rate, or audio
sampling rate.  In order to process the output, you must supply this
information to the processing utility.  <B>mythtranscode</B> provides the
relevant information on STDOUT.</P>
<P>There are two modes in which <B>mythtranscode</B> can create raw streams. 
The first has no synchronization and assumes that the processing utility
will read audio and video at a constant rate.  This method is useful when a
single application will be processing the raw output, such as
<B>mencoder</B> or <B>ffmpeg</B>.  The second method assumes that two
separate applications will be processing the audio and video streams
independently, and there is no rate control between them which means that
the two programs don't coordinate their efforts to maintain synchronization.</P>

<H3>mythtranscode example</H3>

<P>First, start <B>mythtranscode</B>.  You will need to determine the
channel and the start time manually.
<BLOCKQUOTE><CODE>
<PRE>
$ mythtranscode --chanid 1036 --starttime 2003-10-20T15:30:00 --profile \
autodetect --fifodir . &amp;
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>When <B>mythtranscode</B> begins executing, it will create two FIFOs
("audout" and "vidout") in the directory specified (in this case ".",
meaning the current directory) and will print out information about the
video stream.</P>
<P>The next step is to start the processing application.  The following assumes
that the stream is NTSC 640x480 with 32Kbps audio.</P>
<P>To use <B>mencoder</B> you would enter a command like:
<BLOCKQUOTE><CODE>
<PRE>
mencoder -audiofile audout -audio-demuxer 20 -rawaudio rate=32000 \
-rawvideo on:w=640:h=480:fps=29.97 -ovc lavc -oac mp3lame -o out.avi \
vidout
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>
<FIGURE>
<EPS FILE="stop.eps">
<IMG SRC="stop.png">
<CAPTION><B>NOTE</B>: You must use mencoder 1.0PRE1 or later. <B>mencoder</B>
version 0.9x <EM>WILL NOT WORK!</EM></CAPTION>
</FIGURE>

Using ffmepg:
<BLOCKQUOTE><CODE>
<PRE>
ffmpeg -f u16le -ar 32000 -ac 2 -i audout -f rawvideo -s 640x480 -r 29.97 \
-i vidout -vcodec mpeg4 -b 2000 -acodec mp3 -ab 128 out.avi
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Or to play directly using mplayer (again 1.0PRE1 or later is needed):
<BLOCKQUOTE><CODE>
<PRE>
mplayer -audiofile audout -audio-demuxer 20 -rawaudio rate=32000 \
-rawvideo on:w=640:h=480:fps=29.97 vidout
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>If you wanted to write the raw data to separate audio and video files for
later processing, the following would work (note the use of --fifosync
for rate-control):
<BLOCKQUOTE><CODE>
<PRE>
$ mythtranscode --chanid 1036 --starttime 2003-10-20T15:30:00 \
--profile autodetect --fifodir . --fifosync &amp;
$ cat audout > audio.raw &amp;
$ cat vidout > video.yuv
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="ss23.2">23.2</A> <A HREF="mythtv-HOWTO.html#toc23.2">Using a different window manager</A>
</H2>

<P>MythTV is not dependent on any particular window manager.  If you wish to
run a lightweight window manager, the <CODE>contrib/configfiles/</CODE> directory has an
example of a <CODE>.twmrc</CODE> and <CODE>.fvwmrc</CODE> file you may use.</P>

<H2><A NAME="capture_resolution_"></A> <A NAME="ss23.3">23.3</A> <A HREF="mythtv-HOWTO.html#toc23.3">What capture resolution should I use?  How does video work? </A>
</H2>

<P>While MythTV allows you to set various GUI and capture resolutions, not
all combinations make sense.</P>
<P>First, analog video signals have a defined vertical resolution.  In NTSC,
the video standard specifies that there are 525 vertical scan lines.  Once
the "extra" lines are removed (they're used to synchronize the video signal,
and encode closed captioning data), you have 480 horizontal lines stacked
vertically.</P>
<P>In PAL, there are 625 "raw" lines of resolution, with a net of 576
horizontal lines stacked vertically.</P>
<P>Horizontally, the maximum value allowed for a Bt8X8 chip is 720. However,
due to limitations in the chip and other limitations of broadcast
television, there may not be a noticeable improvement in image quality
beyond 400 or 500 pixels.</P>
<P>With this in mind, there are certain commonly accepted values for
resolution.  While other values may be accepted for the vertical
resolution, they will cause scan lines to be repeated or dropped.</P>
<P>From "best" to "worst", in NTSC:
<UL>
<LI>720x480 "DVD" resolution. ReplayTV High and medium resolution</LI>
<LI>704x480 DVD standalone recorder standard resolution</LI>
<LI>640x480 4:3</LI>
<LI>544x480 TiVo Best resolution</LI>
<LI>480x480 SuperVCD (SVCD) Video CD resolution, TiVo High resolution</LI>
<LI>352x480 ReplayTV "Standard" quality, TiVo Basic and Medium resolution, DVD "LP" resolution</LI>
<LI>320x480 </LI>
<LI>544x240</LI>
<LI>480x240 </LI>
<LI>352x240 Video CD (VCD) resolution</LI>
<LI>320x240</LI>
</UL>
</P>
<P>As you can see, the lower quality values are half of the better ones. 
720x240 is possible, but isn't a good tradeoff relative to the number of
vertical lines lost.  In a PAL country, the you would use values like
720x576 or x288.</P>
<P>The higher resolutions will be more CPU intensive if you're using software
encoding (PVR-250/350 will have minimal host CPU impact even if you're using
720x480). If the CPU is overtaxed, frames will be dropped causing uneven
motion. You will likely see the best results at resolutions which average at
least 10% CPU idle time.  You can use system tools such as <CODE>top</CODE> or
<CODE>sar</CODE> to check the CPU % idle while recording.  If the CPU average
usage is consistently exceeding 90%, frames will need to be dropped during
peak times when more than 100% of the available CPU would be needed to
process all of the frames.</P>
<P>If you'd like to read more on this, go to the vcdhelp website at 
<A HREF="http://www.vcdhelp.com/forum/userguides/94382.php">http://www.vcdhelp.com/forum/userguides/94382.php</A>.</P>

<H2><A NAME="ss23.4">23.4</A> <A HREF="mythtv-HOWTO.html#toc23.4">MythTV GUI and X Display Sizes</A>
</H2>

<P>MythTV is designed to be run as dedicated full screen TV application
but can also be run as a desktop application on a computer monitor. Here
are a few consideration for configuring sizes to best suit you needs.</P>

<H3>X Dimensions</H3>

<P>For output to a Television, common resolutions are 640x480, 800x600, and
some rare devices support 1024x768. Generally, higher resolutions are
better. However, you may find that you prefer the picture quality at one of
the lower resolutions. Everything in MythTV is scalable and should 'fit'
regardless of the resolution you choose.</P>
<P>Edit your X configuration file, usually <CODE>/etc/X11/XF86Config-4</CODE> for
XFree, or <CODE>/etc/X11/xorg.conf</CODE> for Xorg, so that the resolution you
want to use is listed first in the lists under "Screen". If this resolution
is higher than the resolutions supported by your output device, you will see
a 'panning' effect where moving the mouse to the edge will scroll around a
desktop area which is larger than the display size. If this happens, edit
your X configuration file to match the display size then restart X.</P>

<H3>MythTV Dimensions</H3>

<P>From "mythfrontend" go to Setup->Appearance.
The default for the height and width is "0" - this will cause
MythTV to automatically size itself to full screen.</P>
<P>If the MythTV GUI width and height are not 0, mythfrontend uses these GUI
dimensions and is anchored to the upper left corner of the X Desktop. If
the GUI X and/or Y are not 0, the upper left corner is positioned at the
specified coordinates. If the "Run the frontend in a window" box is checked,
the window will have a frame and can then be dragged to any position on the
desktop.</P>
<P>
<FIGURE>
<EPS FILE="stop.eps">
<IMG SRC="stop.png">
<CAPTION><B>NOTE</B>: When the GUI is full screen, you may see windows rapidly
flipping on top of each other. If this happens you will need to set your
window manager to 'Click to Focus' for windows to stack properly.</CAPTION>
</FIGURE>

The fonts for the GUI and OSD will scale to whatever sizes you use. Most
font sizes can be changed in setup selections or in the .xml files under
<CODE>/usr/local/share/mythtv/</CODE> . Make sure to use fonts large enough
to be read on a TV screen from a distance.</P>
<P>The full screen TV size is based on the X display size. For Xinerama, you
can specify a screen in Setup->General. The TV picture will be stretched
to fit the entire GUI area regardless of the 
<A HREF="#capture_resolution_">capture resolutions</A> used. However, during playback, the "W" key can
to used to correct differences between 16:9 and 4:3.</P>

<H3>Overscan Dimensions</H3>

<P>Because picture edges can be ragged and screen edges aren't straight,
Television is designed to project an image larger than the physical screen.
This is called "overscan". Underscan is fitting the entire image inside the
screen. Underscan is useful for computer monitors so that toolbars and
scrollbars at the edges can be seen.</P>
<P>For best results, match the X display area as close as possible to the edges
of the physical screen. This can only be adjusted by your tv-out device or
by the settings for the television set. Many sets have these adjustments in
a 'service mode'. If you cannot make these adjustments, there will be black
borders around the edges of the X desktop, MythTV GUI and TV playback.</P>
<P>MythTV has settings for "Overscan" in Setup->Playback. These can not, and do
not, cause the image to display beyond the edge of the X display area. The
purpose of these settings are to cut off rough edges and to expand the image
so that objects will appear to be the same size as a normal overscanned TV
picture.</P>

<H2><A NAME="backupdb"></A> <A NAME="ss23.5">23.5</A> <A HREF="mythtv-HOWTO.html#toc23.5">Saving or restoring the database </A>
</H2>

<P>See the <B>mysqldump</B> manpage for more information.
<BLOCKQUOTE><CODE>
<PRE>
$ mysqldump -u mythtv -pmythtv mythconverg -c > mythtv_backup.sql
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>To restore: (assuming that you've dropped the database)
<BLOCKQUOTE><CODE>
<PRE>
$ mysql -u root
mysql>create database mythconverg;
mysql>exit
$ mysql -u mythtv -pmythtv mythconverg &lt; mythtv_backup.sql
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>You may need to alter the MySQL permissions if this database is being shared
with multiple systems.  See the 
<A HREF="mythtv-HOWTO-6.html#modify_perm_mysql">Modifying access to the MySQL database for multiple systems</A> section for more
information.</P>

<H2><A NAME="ss23.6">23.6</A> <A HREF="mythtv-HOWTO.html#toc23.6">Deleting the MySQL database</A>
</H2>

<P>
<FIGURE>
<EPS FILE="stop.eps">
<IMG SRC="stop.png">
<CAPTION><B>NOTE</B>:  Performing this step will remove the entire database. You will lose all of your settings and will need to re-run the mc.sql script
to setup the database structure before running the mythtv-setup program.</CAPTION>
</FIGURE>

<BLOCKQUOTE><CODE>
<PRE>
$ mysql -u root
mysql> drop database mythconverg;
mysql> quit
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="ss23.7">23.7</A> <A HREF="mythtv-HOWTO.html#toc23.7">Moving your data to new hardware</A>
</H2>

<P>This assumes that you will be moving your data to newer / bigger hardware
and don't want to lose your programs.</P>
<P>The first step is to create a database backup as demonstrated in an earlier
section.</P>
<P>Next, you will extract only the data that is relevant to the programs:
<BLOCKQUOTE><CODE>
<PRE>
$ grep "INSERT INTO record "          mythtv_backup.sql > restore.sql
$ grep "INSERT INTO recorded "        mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO oldrecorded "     mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO recordedprogram " mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO recordedrating "  mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO recordedmarkup "  mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO recordedseek "    mythtv_backup.sql >> restore.sql
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P><B>NOTE</B>:  Newer versions of <B>mysqldump</B> place backticks around
the table names.  Backticks are not the same as apostrophes!  On a typical
North American keyboard, backticks are located to the left of the "1" key,
on the same key as the tilde.  Also, because the <B>bash</B> shell may try
to interpret the backticks, make sure you use a \ before each one.</P>
<P>If your <CODE>restore.sql</CODE> file is empty, you'll need to re-run the
commands like this:
<BLOCKQUOTE><CODE>
<PRE>
$ grep "INSERT INTO \`record\` "          mythtv_backup.sql > restore.sql
$ grep "INSERT INTO \`recorded\` "        mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`oldrecorded\` "     mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedprogram\` " mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedrating\` "  mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedmarkup\` "  mythtv_backup.sql >> restore.sql
$ grep "INSERT INTO \`recordedseek\` "    mythtv_backup.sql >> restore.sql
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Note the space after the table name and the ">>" to append to the file for
all but the first <B>grep</B>. "recordedmarkup" and "recordedseek" are
huge and there may be hundreds of thousands of lines if you had lots of
hours of recordings.</P>
<P>After you have moved the data files to the new hardware, configure MythTV
using the <B>mythtv-setup</B> program as you normally would with a
standard MythTV installation.</P>
<P>At this point we will restore the information about your programs back into
the database:
<BLOCKQUOTE><CODE>
<PRE>
$ mysql -u mythtv -pmythtv mythconverg &lt; restore.sql 
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>After successful insertion of the data you may delete the
<CODE>restore.sql</CODE> file.</P>

<H2><A NAME="btaudio"></A> <A NAME="ss23.8">23.8</A> <A HREF="mythtv-HOWTO.html#toc23.8">btaudio </A>
</H2>

<P>btaudio allows you to obtain the audio data from your tuner card directly
over the PCI bus without using a sound card.  This is useful if you would
like to use multiple tuner cards in a system without adding a sound card for
each one, or if your existing sound card is not capable of full-duplex
operation.</P>
<P>In order to use btaudio, your tuner card will need certain hardware
installed on it, and that hardware must be wired correctly.  The chip that
will allow you to use the btaudio module is the MSP34xx.  However, having a
MSP34xx is no guarantee that you will be able to use the btaudio module.</P>
<P>As of 2003-03-31, this is the current list of cards and their status:
Works with btaudio:</P>
<P>
<UL>
<LI>Hauppauge WinTV-radio with dbx-TV stereo, model 401</LI>
<LI>Hauppauge WinTV-Theater, model 495, 498 (Europe)</LI>
<LI>ATI TV Wonder</LI>
</UL>
</P>
<P>The following cards do not work:
<UL>
<LI>Pinnacle Studio PCTV Pro - note: this has a MSP34xx, but it's not
wired correctly to the BT878 chip.</LI>
<LI>ATI TV Wonder VE</LI>
<LI>Leadtek Winfast 2000 XP (PAL, UK and NTSC)</LI>
<LI>I/O Magic PC-PVR.  No MSP34xx chip.</LI>
</UL>
</P>
<P>The following cards have been reported to work, but have issues:
<UL>
<LI>Avermedia AVerTV Studio (no digital DSP output, "whiney noise" on
analog)</LI>
</UL>
</P>
<P>Once btaudio loads, it should register additional <CODE>/dev/dsp</CODE> and
<CODE>/dev/mixer</CODE> devices.  Typing <CODE>$ dmesg</CODE> will let you know
what's going on.</P>

<H2><A NAME="ss23.9">23.9</A> <A HREF="mythtv-HOWTO.html#toc23.9">Removing unwanted channels</A>
</H2>

<P>If <B>mythfilldatabase</B> grabbed a channel which you do not want to
include in your TV listings, you can remove the entries from the grabber
configuration and the MySQL database.  This often happens with premium
channels; for example, HBO or Showtime may be available on your cable TV
system, but is scrambled because you're not a subscriber to that channel. 
Since you can never watch it, you want to get rid of it.</P>
<P>If you are using the DataDirect service, login to your account at
<A HREF="http://labs.zap2it.com/">http://labs.zap2it.com/</A> to
modify your lineup. Uncheck the boxes for any unwanted channels, and they
will no longer be included in your download.</P>
<P>If you are using a grabber from XMLTV, comment out the channel from the
<CODE>~/.mythtv/&lt;sourcename&gt;.xmltv</CODE> file by inserting the word "not
" (including the space) in front of the unwanted entry. This will prevent
<B>xmltv</B> from grabbing future listings.</P>
<P>Next, delete the unwanted item from the channel table so that it will not
appear in the EPG or when changing channels.  To delete the data from the
database we need to perform some steps.  First, assuming that HBO is channel
15, we need to find out the internal <CODE>chanid</CODE> used by MySQL:
<BLOCKQUOTE><CODE>
<PRE>
$ mysql -u root mythconverg
mysql> select chanid from channel where channum=15;
+--------+
| chanid |
+--------+
|   1015 |
+--------+
1 row in set (0.00 sec)
mysql> delete from channel where chanid = 1015;
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Old program data will be removed over the course of a week. However, you may
want to immediately delete any current program listings for the channel that
has been removed:
<BLOCKQUOTE><CODE>
<PRE>
$ mysql -u root mythconverg
mysql> delete from program where chanid = 1015;
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="ss23.10">23.10</A> <A HREF="mythtv-HOWTO.html#toc23.10">NFS</A>
</H2>

<P>You may want to use a central server to store your files.  </P>
<P>On the host machine, (in this case, the hostname is "masterbackend") you'll
want to edit your <CODE>/etc/exports</CODE> file and use something like:
<BLOCKQUOTE><CODE>
<PRE>
/var/video (rw)
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>To export the <CODE>/var/video</CODE> directory with read / write privileges.</P>
<P>On the "slave" machine, you'll want to edit the <CODE>/etc/fstab</CODE> file and
add something like:
<BLOCKQUOTE><CODE>
<PRE>
masterbackend:/var/video /var/video nfs rsize=8192,wsize=8192,hard,intr,nfsvers=3,actimeo=0
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Then run <CODE># mount -a</CODE> to re-read the file to mount the file system.</P>
<P>In this case, the source is a machine called "masterbackend" which is
exporting the directory "/var/video", which we're mounting locally at
"/var/video".  The rsize and wsize options are used to increase the
performance of NFS; "hard,intr" is there because that's the recommendation
of the NFS-HOWTO, the nfsvers is required for filesizes over 2GB and actimeo
is used to turn off file attribute caching.  Attribute caching for a shared
media point causes problems; you always want to see the latest state of the
directory and files.  See 
<A HREF="http://www.mythtv.org/wiki/index.php/Optimizing_Performance">http://www.mythtv.org/wiki/index.php/Optimizing_Performance</A> for
additional information regarding performance optimization.</P>

<H2><A NAME="ss23.11">23.11</A> <A HREF="mythtv-HOWTO.html#toc23.11">Automatically starting mythfrontend at system boot time</A>
</H2>

<P>Here's an example submitted to the mythtv-dev list by Pat Pflaum
<A HREF="mailto:pat@netburp.com">mailto:pat@netburp.com</A> using fvwm:
<BLOCKQUOTE><CODE>
<PRE>
$ cat > .xinitrc
fvwm &amp;
mythfrontend
^D
$ cat > .fvwmrc
Style myth* NoTitle, NoHandles, Sticky, WindowListSkip, SloppyFocus, GrabFocus, BorderWidth 0
^D
$
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>The following also works with blackbox:
<BLOCKQUOTE><CODE>
<PRE>
$ cat > .xinitrc
xset -dpms s off &amp;
irxevent &amp;
mythfrontend &amp;
blackbox
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Make sure that your <CODE>.blackboxrc</CODE> file has:
<BLOCKQUOTE><CODE>
<PRE>
session.screen0.focusNewWindows:        True
session.screen0.focusModel:     SloppyFocus
</PRE>
</CODE></BLOCKQUOTE>
 in it.</P>
<P>
<A NAME="mythbackend_autostart"></A> </P>
<H2><A NAME="ss23.12">23.12</A> <A HREF="mythtv-HOWTO.html#toc23.12">Automatically starting mythbackend at system boot time</A>
</H2>

<H3>Red Hat And Mandriva</H3>

<P>Here's a method for automatically starting mythbackend submitted by Mike
Thomson (
<A HREF="mailto:linux@m-thomson.net">mailto:linux@m-thomson.net</A>) and Stu Tomlinson (
<A HREF="mailto:stu@nosnilmot.com">mailto:stu@nosnilmot.com</A>).</P>
<P>Copy the files from the MythTV <CODE>contrib</CODE> directory or from Mike's web
site (
<A HREF="http://m-thomson.net/mythtv/">http://m-thomson.net/mythtv/</A>) as follows:</P>
<P><CODE>etc.rc.d.init.mythbackend</CODE> should be made executable and copied to
<CODE>/etc/rc.d/init.d/</CODE>:
<BLOCKQUOTE><CODE>
<PRE>
$ cd contrib
$ su
# chmod a+x etc.rc.d.init.d.mythbackend
# cp etc.rc.d.init.d.mythbackend /etc/rc.d/init.d/mythbackend
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P><CODE>etc.sysconfig.mythbackend</CODE> should be copied to
<CODE>/etc/sysconfig/</CODE>:
<BLOCKQUOTE><CODE>
<PRE>
$ cd contrib
$ su
# cp etc.sysconfig.mythbackend /etc/sysconfig/mythbackend
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Edit <CODE>/etc/sysconfig/mythbackend</CODE> if you want to change the defaults
(the userid that should start mythbackend, location of the logfile and (if
required) the name and location of the mythbackend binary).</P>
<P>Use <B>chkconfig</B> to make sure the script is called when
entering runlevels 3, 4 or 5:
<BLOCKQUOTE><CODE>
<PRE>
$ su
# chkconfig --level 345 mythbackend on
# exit
$
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>
<A NAME="logrotate"></A> </P>
<H3>Log files </H3>

<P>By default, the log file for mythbackend will be written to
<CODE>/var/tmp/mythbackend.log</CODE>. This has been tested and is known to work
on Mandriva and Red Hat, but many people prefer to place logs under
<CODE>/var/log/</CODE>.</P>
<P>To do this, create a group called <CODE>mythtv</CODE> (or anything you prefer)
and add your usual MythTV users to that group. If you changed the user that
starts mythbackend from the default of root you <EM>must</EM> perform this
step.</P>
<P>Create the directory <CODE>/var/log/mythtv</CODE> and set its
permissions as follows:
<BLOCKQUOTE><CODE>
<PRE>
$ su
# mkdir /var/log/mythtv
# chown root:mythtv /var/log/mythtv
# chmod 0775 /var/log/mythtv
# exit
$ ls -ld /var/log/mythtv
drwxrwxr-x    2 root     mythtv       4096 Apr 28 21:58 /var/log/mythtv/
$
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Create a <CODE>mythtv</CODE> file in <CODE>/etc/logrotate.d</CODE>:
<BLOCKQUOTE><CODE>
<PRE>
$ su
# cat > /etc/logrotate.d/mythtv
# Set default values for all log files first...

# Rotate the logs once a week, or more frequently if they 
# exceed 10Mb in size (size is checked daily).
weekly
size 10M

# 'copytruncate' is used for logs generated by 
# currently-running programs that should not be restarted 
# (and can't be signalled to start a new log) after the 
# rotation.  It duplicates the existing log file and then 
# sets the length of the existing file to 0.  The only time 
# this would break would be if the program writing the log 
# was using lseek.
copytruncate

# After rotating the files, leave the most recent rotated 
# copy alone but gzip everything else to save space.
compress
delaycompress

# If a log isn't present then don't worry about it.
missingok

# Don't rotate an empty file.
notifempty

# end of the global options

/var/log/mythtv/mythbackend.log /var/log/mythtv/mythfrontend.log {
  # Keep logs until they are 2 months old or the number of 
  # logs reaches 12.  If the log files stay small, the age will 
  # kick in first and you'll only have 8 log files.  If they 
  # get larger than 10Mb then you won't keep all 60 days.
  rotate 12
  maxage 60
}

# Different options for mythfilldatabase:
/var/log/mythtv/mythfilldatabase.log {
  rotate 2
}
^D
#
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H3>Mandriva </H3>

<P>Mandriva adds one more twist in the form of the <CODE>msec</CODE> utility,
which runs regularly and (at the default or any higher security level) sets
permissions on many files, including those under <CODE>/var/log</CODE>.</P>
<P>To tell msec about the MythTV log files and their directory, you need to
edit the <CODE>/etc/security/msec/perm.local</CODE> file to include the
following:
<BLOCKQUOTE><CODE>
<PRE>
# /etc/security/msec/perm.local
# Local overrides to the msec program
#
# Full file path                user.group              permissions
/var/log/mythtv/                root.mythtv             775
/var/log/mythtv/*               root.mythtv             664
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>A copy of the above has been included in the contrib/ directory.  You may
add it by typing:
<BLOCKQUOTE><CODE>
<PRE>
$ cd contrib
$ su
# cat etc.security.msec.perm.local >> /etc/security/msec/perm.local
# exit
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Finally run the <CODE>msec</CODE> tool to check and implement your
changes.
<BLOCKQUOTE><CODE>
<PRE>
$ su
# msec
# exit
$
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>
<FIGURE>
<EPS FILE="stop.eps">
<IMG SRC="stop.png">
<CAPTION><B>NOTE</B>: msec can only <EM>reduce</EM> the permissions of files, so if
you don't get the results you expect, check that you're not asking
<CODE>msec</CODE> to add missing permissions to the files or directories you
created.</CAPTION>
</FIGURE>
</P>
<H3>Gentoo</H3>

<P>The portage file for MythTV has scripts that will allow you to run
mythbackend at startup.</P>
<P>To run mythbackend as a daemon which starts at boot time:
<BLOCKQUOTE><CODE>
<PRE>
# rc-update add mythbackend default
</PRE>
</CODE></BLOCKQUOTE>

To stop mythbackend as a daemon:
<BLOCKQUOTE><CODE>
<PRE>
# /etc/init.d/mythbackend stop
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>To obtain a list of options:
<BLOCKQUOTE><CODE>
<PRE>
# /etc/init.d/mythbackend
</PRE>
</CODE></BLOCKQUOTE>
</P>

<H2><A NAME="advanced_backend_config"></A> <A NAME="ss23.13">23.13</A> <A HREF="mythtv-HOWTO.html#toc23.13">Advanced Backend Configurations </A>
</H2>

<P>MythTV is flexible in the way that you define multiple backend tuner
configurations.  The only hard-and-fast rule is that the Master backend
<EM>must</EM> have a capture device defined, but shouldn't imply that the
capture device in the Master backend must be the first capture card defined in the
database.</P>
<P>One example of an advanced configuration is the round-robin scheme.  Rather
than defining all of the cards on the master, you could first go into
mythtv-setup on the master to define globals such as the general configuration
and the channel lineup but not the host-specific configuration item like the
capture card.  In this example, we will use a 4 tuner configuration, where two
slaves have one card each and the master has two.
<OL>
<LI>Add the first capture card on one of the slaves.  Complete the
configuration, connecting the input source to the card.  This will get
cardid #1 in the database.  Exit mythtv-setup.</LI>
<LI>Configure the first capture card on the master backend.  This will get
cardid #2 in the database.  Exit mythtv-setup.</LI>
<LI>Configure the first capture card on the second slave.  This will be
cardid #3 in the database.  Exit mythtv-setup.</LI>
<LI>Configure the second capture card on the master backend.  This will
get cardid #4 in the database.  Exit mythtv-setup.</LI>
</OL>
</P>
<P>Using this scheme, the master backend will not use both capture cards until
one of the following happens:
<UL>
<LI>There are four recordings scheduled for the same time</LI>
<LI>Both slaves are unavailable</LI>
</UL>
</P>
<P>The scheduler in MythTV checks whether an encoder is available; if a slave
backend isn't running, its encoder isn't available, so the scheduler will
look for the next available encoder.  This makes MythTV very flexible; slave
tuners can come and go, and as long as there are enough tuners for what
you'd like to record it doesn't matter which tuner in particular is going to
be used.</P>
<P>Using this round-robin scheme along with a shared storage directory like
NFS and enabling the Master Backend Override setting will allow you to view
content even if the slave backend that recorded a program is not available.</P>

<H2><A NAME="ss23.14">23.14</A> <A HREF="mythtv-HOWTO.html#toc23.14">Using the transcoder</A>
</H2>

<P>MythTV's built-in transcoder re-encodes recordings from one codec to
another.  The transcoder has three primary uses; it can transcode MPEG-2
files captured using a hardware encoder (PVR cards, DVB cards, ATSC HD,
etc.) to MPEG-4, it can be used to transcode RTjpeg files (usually only used
on systems that can not real-time encode to MPEG-4 using a framegrabber) to
MPEG-4, and finally it can be used to remove commercials from a MPEG-2 file
while leaving the file in MPEG-2 format.</P>
<P>When MythTV transcodes a file to MPEG-4 or RTjpeg the resulting file format
is NuppelVideo (nuv).  NuppelVideo is a container which provides a method of
keeping the audio and video in sync throughout the recording, which is why
it is used instead of the <CODE>.avi</CODE> format.  You may have difficulty
playing <CODE>.nuv</CODE> files in non-MythTV systems.</P>

<P>The original file is removed when the transcoding process is complete. 
Unless you're sure that you will be satisfied with the result you may want
to enable the <B>mythtv-setup</B> option which causes <B>mythbackend</B>
to keep the original file after transcoding.  This option is on the second
page of the General section in mythtv-setup.  Enabling this allows you to
compare the two files and restore the original if you like.  Outside of the
initial setup phase it usually isn't necessary to leave this option enabled.
A recording can be transcoded in two ways:</P>
<P>
<UL>
<LI>Automatically transcode the file once it has completed
recording.</LI>
<LI>Manually choosing to transcode a recording, usually after
importing a cutlist or manually marking commercials to be
removed.</LI>
</UL>
</P>
<P>The second method can be used on files that have already been transcoded (or
files which were are already in the desired format), so only the frames
immediately following a cut section will be re-encoded, resulting in a
minimal loss of quality when removing commercials with the added benefit of
being extremely quick.</P>
<P>The current transcoding system has a lot flexibility, but there are
a number of steps involved in setting it up.  In order to
automatically transcode a given recording you must do the following:
<OL>
<LI>Configure recording profile for your capture source and enable
transcoding on one or more profiles.</LI>
<LI>Configure one or more transcoding profiles.</LI>
<LI>Create or alter existing scheduled recordings to enable
transcoding for that recording.</LI>
</OL>
</P>

<H3>Configuring Recording Profiles to Allow Transcoding</H3>

<P>Enter the Utilities/Setup > Setup > TV Settings > Recording Profiles
section in <B>mythfrontend</B>.  Choose the option that corresponds to
your capture source (ignore the Transcoders for now.) Choose the quality
profile you are interested in using for transcoding.  Ensure that "Enable
auto-transcode after recording" is checked.  </P>

<H3>Configure Transcoding Profiles</H3>

<P>Enter the Recording Profiles > Transcoders menu.  There are three quality
settings to choose from and a two special Autodetect settings.  Later, when
scheduling recordings you'll have to choose one of Autodetect, High, Medium,
and Low Quality transcode settings in addition to the recording profile we
set up above.  If you choose the Autodetect transcoding profile for a
recording, MythTV will use the "Autodetect from RTjpeg/MPEG-4" profile for
recordings which are RTjpeg/MPEG-4 files.  Otherwise, it will use the
"Autodetect from MPEG-2" profile provided it's an MPEG-2 recording.  If you
choose one of the others (High, Medium, Low) it will use the settings in
that profile regardless of the codec of the original recording.</P>
<P>There are a number of options for transcoding but the simplest is to enable
lossless transcoding (the first option) which subsequently removes all other
options. Enabling lossless encoding simply removes commercials (if you've
marked them) and attempts to clean up MPEG-2 streams.  Note that with this
option MythTV will not apply any sort of filters and will only attempt to
normalize the stream into something cleaner and less likely to have trouble
with other less forgiving MPEG-2 hardware/software (including players, video
editors, etc.)</P>
<P>If you enable resizing of the recording the next page has the settings for
choosing the final resolution.  MythTV will scale the video as appropriate,
not crop it to this resolution.</P>
<P>The final two pages allow configuration of the video and audio codecs.
Although RTjpeg is an option for video codec there is no reason to transcode
<EM>to</EM> this format because it will produce larger files than MPEG-4 and
the recording will take <EM>more</EM> CPU power to play back.  The MPEG-4
settings are described in the documentation for the <B>ffmpeg</B> project
at 
<A HREF="http://ffmpeg.sourceforge.net/ffmpeg-doc.html">http://ffmpeg.sourceforge.net/ffmpeg-doc.html</A>.  It's a matter of
trial and error to discover which settings achieve a good compromise between
size and quality.</P>
<P>If you wish to return to the default settings, they are Bitrate: 2200-2500,
MaxQ: 2, MinQ: 15, MaxQDiff: 3, and "Scale bitrate for frame size" is
enabled.  The other options are unchecked.  </P>

<H3>Create/Alter Scheduled Recordings to Enable Transcoding</H3>

<P>Transcoding is actually enabled on a per-recording basis.  Two things
must be true before any given recording will be auto-transcoded, however. 
The first is that the recording must have been made with a recording profile
that has auto-transcode enabled. Under "Storage Options" for the recording
you must set the "Record using the "X" profile" to the profile you
configured in the first step.  In addition, under the "Post Recording
Options" section of the recording you must also set "Transcode new
recordings." This is also where you specify the Transcoding profile to use
(Auto, High, Medium, Low.)</P>
<P>It may not be obvious from above but the flexibility of this system is
primarily to make it possible to auto-transcode a show recorded via one
source (ie: pcHDTV 3000), and not transcode that same show if it's recorded
on another kind of card (ie: PVR-250.) There are other uses however.  You
could have a PVR-250 and a V4L card.  You may want to transcode the MPEG-2
from the PVR-250 but there is no need to transcode the recordings made with
the V4L card, as it's already likely to be MPEG-4.</P>
<P>As an example, you could configure the Default profile for "Hardware DVB
Encoders" (the profile group used for DVB cards, including ATSC cards like
the pcHDTV 3000) to "Enable auto-transcoding". In the Default profile for
MPEG-2 Encoders (PVR cards) you'd leave "Enable auto-transcoding" unchecked. 
For programs that are available on both kinds of cards you'd set the
recording profile to Default and enable auto-transcoding in the record
settings.  Then you pick your transcoding profile.  The result is that when
a program is recorded on your DVB card, it will get transcoded.  When it
plays on a channel available via your PVR card, it won't be.</P>

<H3>Manual Transcoding</H3>

<P>Manually transcoding is activated while watching a show by hitting 'x',
from the OSD menu by choosing the Transcode option, or by choosing Job
Options/Transcode from the info menu from the Watch or Delete
Recordings screens.</P>
<P>The transcoding profile used for manual transcoding is whatever was set when
the recording was originally configured, even if you didn't enable
auto-transcoding.  The only way to change what transcoding profile will be
used is to alter the transcoder column in the recorded table in the
database.  The transcoder column contains a number which corresponds with
the id column in the recordingprofiles table.  You can find out the id
number for each profile in the transcoder group with an SQL command like:</P>
<P>
<BLOCKQUOTE><CODE>
<PRE>
mysql> select r.* from recordingprofiles r,profilegroups p where p.name='Transcoders' and p.id=r.profilegroup;
+----+----------------+------------+------------+--------------+
| id | name           | videocodec | audiocodec | profilegroup |
+----+----------------+------------+------------+--------------+
| 21 | RTjpeg/MPEG4   | MPEG-4     | MP3        |            6 |
| 22 | MPEG2          | MPEG-4     | MP3        |            6 |
| 27 | High Quality   | MPEG-4     | MP3        |            6 |
| 28 | Medium Quality | MPEG-4     | MP3        |            6 |
| 29 | Low Quality    | MPEG-4     | MP3        |            6 |
+----+----------------+------------+------------+--------------+
5 rows in set (0.01 sec)

mysql>                                                                        
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>Armed with the knowledge of what the profile ID's are you can also choose to
run mythtranscode from the command line and explicitly specify the transcoder
profile.  Run <CODE>mythtranscode --help</CODE> for usage information.</P>

<H2><A NAME="ss23.15">23.15</A> <A HREF="mythtv-HOWTO.html#toc23.15">Changing your hostname</A>
</H2>

<P>If you need to change the name of the computers used with MythTV you'll
need to perform a sequence of steps.  There are a number of pieces of
information that MythTV keeps track of which are tied to the hostname of the
box, so changing the hostname involves altering the name in the
operating system and in the MySQL database.  In the examples below, the old
name of the system was "frontend1" and we're going to change it to
"kidsroom".</P>
<P>
<FIGURE>
<EPS FILE="stop.eps">
<IMG SRC="stop.png">
<CAPTION><B>NOTE</B>:  Changing the hostname using direct SQL update commands will
break things.  You <EM>MUST</EM> use this indirect method.</CAPTION>
</FIGURE>
 </P>
<P>1.  Stop all backends.  If you run <B>mythbackend</B> from a terminal
session, press control-c. If your backends are started with an init
script, you would do something like the following:
<BLOCKQUOTE><CODE>
<PRE>
$ su
# /etc/init.d/mythbackend stop
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>2.  Change the hostname.</P>
<P>For Red Hat and derived distributions, edit the
<CODE>/etc/sysconfig/network</CODE> file.  Look for
<CODE>HOSTNAME=frontend1</CODE> and change this to
<CODE>HOSTNAME=kidsroom</CODE> or whatever you'll be using.  For other
distributions, refer to the documentation, such as the
<PRE>
hostname(1)
</PRE>
 man page.</P>

<P>To alter the
hostname in the current session, run:
<BLOCKQUOTE><CODE>
<PRE>
# hostname kidsroom
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>3.  Dump the database.
<BLOCKQUOTE><CODE>
<PRE>
$ mysqldump -u mythtv -pmythtv mythconverg -c > mythtv_backup.sql
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>4.  Rename the host in the database.  First, ensure that the new hostname
you'll be using isn't already in the database.
<BLOCKQUOTE><CODE>
<PRE>
$ grep kidsroom mythtv_backup.sql
</PRE>
</CODE></BLOCKQUOTE>

Now we're actually going to change the name.  The following should all be
typed on the same line:
<BLOCKQUOTE><CODE>
<PRE>
$ cat mythtv_backup.sql | sed s/\'frontend1\'/\'kidsroom\'/g >> mythtv_restore.sql
</PRE>
</CODE></BLOCKQUOTE>

If you don't feel comfortable using <B>sed</B>, you can open the
<CODE>mythtv_backup.sql</CODE> file in a text editor and perform a global search
and replace.  When saving the file, make sure you use the new name,
<CODE>mythtv_restore.sql</CODE> or the rest of the steps below will fail.</P>
<P>5.  Drop and recreate the database.
<BLOCKQUOTE><CODE>
<PRE>
$ mysql -u root
mysql>drop database mythconverg;
mysql>create database mythconverg;
mysql>exit      
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>6.  Restore the database using your edited version.
<BLOCKQUOTE><CODE>
<PRE>
$ mysql -u mythtv -pmythtv mythconverg &lt; mythtv_restore.sql
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>If you are running slave backends or frontends, don't forget to re-enable
access as detailed in 
<A HREF="mythtv-HOWTO-6.html#modify_perm_mysql">Modifying access to the MySQL database for multiple systems</A>. </P>
<P>7.  Start the backends.  If you use init scripts, do the following, otherwise
start them from terminal consoles.
<BLOCKQUOTE><CODE>
<PRE>
# /etc/init.d/mythbackend start
</PRE>
</CODE></BLOCKQUOTE>
</P>
<P>8.  Quit and restart all frontends.  Delete the <CODE>mythtv_backup.sql</CODE>
and <CODE>mythtv_restore.sql</CODE> files.</P>

<H2><A NAME="ss23.16">23.16</A> <A HREF="mythtv-HOWTO.html#toc23.16">Can I run MythTV on my TiVo?</A>
</H2>

<H2><A NAME="ss23.17">23.17</A> <A HREF="mythtv-HOWTO.html#toc23.17">Can I run MythTV on my ReplayTV?</A>
</H2>

<P>No.</P>
<P>While it is true that the TiVo runs the Linux kernel, and TiVo has released
their changes to the kernel under the GPL, the TiVo is <EM>not</EM> a
general-purpose computer, and there is no programming information available
for the custom hardware contained within a TiVo.  TiVo is under no
obligation to release the source code to their <EM>application</EM>.</P>
<P>The ReplayTV runs VxWorks, a Real Time Operating System from Wind River
Systems.</P>
<H2><A NAME="ss23.18">23.18</A> <A HREF="mythtv-HOWTO.html#toc23.18">Can a wireless connection be used between the frontend and the backend?</A>
</H2>

<P>Yes, assuming that your wireless connection has sufficient bandwidth to
maintain the datarate between the frontend and the backend.  802.11b should
be sufficient if the encoded bitrate of the content is less than the
datarate of your wireless connection, which in the case of 802.11b would be
approximately 4 Mbps.  (The advertised rate of 11Mbps gives an actual
throughput of 4 Mbps.) 802.11a and 802.11g, if operating in their high-speed
modes, or proprietary 802.11b "Turbo" schemes should be adequate.  Multiple
wireless frontends, poor signal strength or other factors can severely
impact the viewing experience on the frontend.</P>

<H2><A NAME="ss23.19">23.19</A> <A HREF="mythtv-HOWTO.html#toc23.19">How can I burn shows that I have recorded to a DVD?</A>
</H2>

<P>Use the mytharchive plugin.</P>

<H2><A NAME="ss23.20">23.20</A> <A HREF="mythtv-HOWTO.html#toc23.20">Using the DBoxII within MythTV</A>
</H2>

<P>The configuration of the DBoxII for use within MythTV is tricky (as of
May 16 2005), that's why it's covered here. Your DBoxII has to be running
linux and the Neutrino GUI instead of the stock BetaNova firmware.  For
further information, please refer to 
<A HREF="http://www.tuxbox.org">http://www.tuxbox.org</A>. Additionally, you need to enable the SPTS
mode in Neutrino.</P>
<P>
<UL>
<LI>Add a new "Capture Card" in the setup. The "Card type" is "DBOX2 Input", 
the other values have to be adjusted according to your setup. 
The default values, except for the "DBOX2 host ip", should work fine.</LI>
<LI>Define a new video source. It doesn't need to be configured, 
you just need to define it. MythTV grabs the EPG from the DBoxII.</LI>
<LI>Connect the DBoxII to the newly defined input source in "input connections".</LI>
<LI>Since channel scanning is not implemented yet, you need to define channels 
in the "Channel Editor". Make sure that you use the same value for 
"Channel Name" as on the DBoxII. You can get a list of available 
channels from the web interface of Neutrino at http://ip-of-your-box:80/. 
Associate the channel with your new video source and repeat when needed.</LI>
</UL>
</P>
<P>You may leave the Setup now and proceed as usual.</P>

<H2><A NAME="ss23.21">23.21</A> <A HREF="mythtv-HOWTO.html#toc23.21">What do the icons on the Watch Recordings screen mean?</A>
</H2>

<P>Press "1" or F1 to get a popup.</P>
<H2><A NAME="ss23.22">23.22</A> <A HREF="mythtv-HOWTO.html#toc23.22">What do the letters mean when I change channels?</A>
</H2>

<P>These letters let you know what's going on with the backend as it tries
to tune to a channel.</P>
<P>Lower case = seen</P>
<P>Upper Case = seen &amp; good
<UL>
<LI>l/L = Lock  : This could be seen by PVR-250/BTTV users</LI>
<LI>a/A = PAT   : Any recording transmitted in MPEG </LI>
<LI>m/M = PMT   : Any recording transmitted in MPEG </LI>
<LI>g/G = MGT   : ATSC only</LI>
<LI>v/V = VCT   : ATSC only</LI>
<LI>n/N = NIT   : DVB only</LI>
<LI>s/S = SDT   : DVB only</LI>
</UL>
</P>
<H2><A NAME="ss23.23">23.23</A> <A HREF="mythtv-HOWTO.html#toc23.23">What is the difference between the various Hauppauge PVR models?</A>
</H2>

<P>This is covered in the hardware section, and extensively covered on the
Hauppauge website.  (
<A HREF="http://www.hauppauge.com/pages/compare_pvr.html">http://www.hauppauge.com/pages/compare_pvr.html</A>) Please check the
Hauppauge website for the most accurate information.</P>
<P>A PVR-150 comes in a number of versions:
<UL>
<LI>The PVR-150 (Model 1045) is the retail kit.  It comes with a remote
control and an IR Blaster.  It does not have a radio tuner.</LI>
<LI>The PVR-150 MCE (Model 1042) will usually come in a plain white box and is
sold as an OEM device.  It does not come with a remote control, since it's
usually used as the second, third, etc capture device.</LI>
<LI>The PVR-150 MCE Kit (Model 1062) does not have a radio tuner and
comes with a Microsoft Media Center remote control instead of Hauppauge's.</LI>
<LI>The PVR-150 low profile (Model 1086) is a low-profile card. It has a
radio tuner and is approximately half the height of a standard card. 
However, it comes with a low-profile PCI bracket, so it is not suitable for
use in a standard PCI slot without removing the bracket, which may not be
worth the trouble.</LI>
</UL>
</P>
<P>A PVR-250 (Model 980) is a retail kit which comes with an IR receiver and a
remote control.</P>
<P>The PVR-250 MCE (Model 975) contains a FM radio tuner.  The PVR-250 MCE does
not contain a IR receiver or a remote.</P>
<P>The PVR-250 Rev 1 contained an MPEG-2 decoder.  However, this function was
not connected to any output jacks, and there doesn't appear to be any way to
pull decoded video from the card, so it's a fairly useless feature.</P>
<P>The PVR-350 (model 990) has the features of the PVR-250 as well as being
able to decode MPEG-2.  The encode and decode functions may be used
simultaneously.  The MPEG-2 decoder function gives superior video quality
compared to what you'll find on a standard video card.  However, the decoder
function is only available once Linux has started, so you will not see any
boot-time messages.  Also, the card is not capable of resolutions higher
than 720x480, so it cannot be used with HDTV.  Make a conscious decision
(and ask for advice on the mailing list) that you want to tradeoff potential
HDTV use in the future compared to video quality.</P>
<P>The X-driver for the PVR-350 support playback using Xv efficiently but does
not support any other 2D or 3D acceleration. For some application this may
place a large load on the host CPU, some will run without any problem and
others (mplayer, xine, xmame etc.) should be configured to utilize the Xv
interface.</P>
<P>Note that for the PVR-350 there are some 
<A HREF="mythtv-HOWTO-3.html#PVR-350">considerations</A>
regarding the way audio is handled.</P>
<P>The PVR-500 is a dual-encoder version of the PVR-150 card, so you can
simultaneously record two different programs at the same time, because there
are two encoder chips on the PCI card.  Hauppuage has also installed an
onboard splitter, so you can use one COAX to feed both tuners.  Current
versions of the PVR-500 should come with an adapter to allow you to connect
a second S-Video or composite input, but this will take up a second PCI
slot.  Early adopters may need to purchase this item separately.</P>

<H2><A NAME="ss23.24">23.24</A> <A HREF="mythtv-HOWTO.html#toc23.24">Changing channels on an external Set Top Box</A>
</H2>

<P>If you need to use an external Set Top Box (STB), such as for satellite
TV or for digital cable you will need some way for MythTV to tell the STB to
switch to a new channel.  There are several methods:
<OL>
<LI>Use an IR blaster.  An IR blaster is an infrared transmitter connected
to your computer.  When MythTV needs to change channels it will send IR
pulses, thereby emulating a remote control.</LI>
<LI>Use a direct serial connection.  Some STB's have a serial port on the
back, although it may not look like a serial port.  It may look like a phone
jack, or a strange VGA connector.  It may be labeled "Low Speed Data".  A
direct serial connection is more reliable than an IR blaster.  Not all STB's
that have a Low Speed Data port have it enabled; you may need to convince
your service provider to turn it on.  Stating that you have a Tivo may help;
the Tivo has a direct-connect capability.</LI>
<LI>Use a firewire connection.  There is a <CODE>6200ch.c</CODE> in the MythTV
contrib directory which may work for you.</LI>
</OL>
</P>
<H2><A NAME="ss23.25">23.25</A> <A HREF="mythtv-HOWTO.html#toc23.25">Configuring one machine to flag all commercials</A>
</H2>

<P>Commercial flagging can be CPU intensive.  By default, the backend that
created a recording is the one which will flag commercials.  You may wish to
use a different machine to run commercial flagging.</P>
<P>On the slower machine:</P>
<P>Start the mythtv-setup program.  Advance through the pages until you get to
the Job Queue page.  Turn off the setting that says "Allow Commercial
Detection jobs", thereby preventing any commercial flagging jobs from
running on this machine.</P>
<P>Next, make sure that "Run Jobs only on original recording host" is turned
OFF so that new jobs are allowed to run anywhere.</P>
<P>Restart <B>mythbackend</B> since it only reads this setting when it starts
up.</P>
<P>On the faster machine:</P>
<P>Start the <B>mythtv-setup</B> program.  Advance through the pages until
you get to the Job Queue page.  Ensure that "Allow Commercial Detection
jobs" is turned ON for this machine.</P>
<P>Run <B>mythjobqueue</B>.  <B>mythjobqueue</B> will examine the JobQueue
and run any jobs it finds.  <B>mythjobqueue</B> should be left running so
that it will pick up any new commercial flagging jobs that are added to the
queue, otherwise new jobs will be added to the queue and your programs won't
be flagged until you run manually run <B>mythjobqueue</B>.</P>
<P>Using this technique it's possible to add commercial flagging machines as
needed, even on systems that aren't running a backend.  It's also possible
to run the commercial flagger in a virtual machine environment such as
VMWare.</P>

<HR>
<A HREF="mythtv-HOWTO-24.html">Next</A>
<A HREF="mythtv-HOWTO-22.html">Previous</A>
<A HREF="mythtv-HOWTO.html#toc23">Contents</A>
</BODY>
</HTML>