Cardinput table

From MythTV Official Wiki
Revision as of 21:20, 5 March 2007 by Newbury (talk | contribs)

Jump to: navigation, search

The cardinput table contains a row for each input listed in the capturecard table. It uses the videosource table as a reference. For example, a video capture card can have an RF input, an S-Video input and a composite video input. This table also stores the binding between a Video Source and an input -- if the RF input is direct analog cable and the S-video input is digital cable through a box, this is where that information will live.

Field Type NULL Default
cardinputid int(10)
cardid int(10) 0
sourceid int(10) 0
inputname varchar(32)
externalcommand varchar(128) YES NULL
preference int(11) YES NULL
shareable char(1) YES N
tunechan varchar(5)
startchan varchar(5)

EXAMPLE SETUP: DIGITAL CABLE, ATSC QAM_256 mysql> select * from cardinput where cardid = 1;

| cardinputid | cardid | sourceid | inputname | externalcommand | preference | shareable | tunechan | startchan | freetoaironly | diseqc_port | diseqc_pos | lnb_lof_switch | lnb_lof_hi | lnb_lof_lo | displayname | radioservices | childcardid | dishnet_eit | recpriority |

| 1 | 1 | 2 | DVBInput | NULL | 0 | N | NULL | 108 | 0 | NULL | NULL | 11700000 | 10600000 | 9750000 | HD3000 Digital | 0 | 0 | 0 | 0 |

Only the 'displayname' field (in this case 'HD3000 Digital') is user supplied freeform text. The 'startchan' is also the last channel tuned on this card. If the card gets set to a channel it cannot actually tune, this field may have to be re-set in Mysql to a usable channel number.

The following will work as a command script to re-set the channel number. It's not pretty, but I cannot remember how to pipe command line input into mysql (which is possible but tricky). Remember to chmod to make it executable. Set the startchannel to something which works on your system and select the correct cardinputid for your DVB card.


  1. !/bin/bash

echo 'update cardinput set startchan = '108' where cardinputid = 1;' > /var/tmp/startchan-fix

mysql -u mythtv -pmythtv mythconverg < /var/tmp/startchan-fix