From Briki
Jump to: navigation, search

Compiling from SVN

MythTV Core/Backend

For ubuntu (gutsy), ensure the following packages are installed:

  • gcc
  • g++
  • make
  • linux-headers
  • libfreetype6-dev
  • libqt3-mt-dev
  • liblame-dev
  • libxv-dev
  • libxxf86vm-dev

Maybe also?

  • qt3-dev-tools
  • libqt3-mt-mysql


  • libmad0-dev
  • libid3tag0-dev
  • libvorbis-dev
  • libflac-dev
  • libcdaudio-dev
  • libcdparanoia0-dev
  • libtiff4-dev
  • kdelibs4-dev
  • libexif-dev
  • fftw3-dev
  • libsdl1.2-dev
  • libfaad2-dev
  • libmysqlclient15-dev

MythTV frontend (Install and run only)

To install and run a mythtv frontend (previously compiled on a different machine), you need:

  • g++
  • libartsc0-dev
  • libasound2-dev
  • liblame-dev
  • libqt3-mt-dev
  • libqt3-mt-mysql
  • libxv-dev
  • libxvmc-dev
  • libxxf86vm-dev
  • qt3-dev-tools


Create as /etc/init.d/mythbackend-svn and ensure executable:

# /etc/init.d/mythbackend-svn  --  script to start and stop mythbackend.

test -x /opt/mythtv-svn/bin/mythbackend || exit 0

#CMDARGS="--daemon --logfile /var/log/mythtv/${NAME}.log"
CMDARGS="--daemon --logfile /var/log/mythtv/${NAME}.log -v record,file"
#CMDARGS="--daemon --logfile /var/log/mythtv/${NAME}.log -v all"

if [ -f /etc/mythtv/mythbackend ]; then
        . /etc/mythtv/mythbackend

case "$1" in
        echo -n "Starting ${DESC}: ${NAME}"
        start-stop-daemon --start --quiet --chuid ${USER}:${GROUP} --exec ${BINARY} --pidfile ${PIDFILE} -- ${CMDARGS}
        echo "."
        echo -n "Stopping ${DESC}: ${NAME}"
        start-stop-daemon --stop --quiet --oknodo --exec ${BINARY}
        echo "."
    reload | force-reload | restart)
        $0 stop
        $0 start
        echo "Usage: /etc/init.d/$0 {start|stop|reload|force-reload|restart}"
        exit 1

exit 0

To ensure it starts/stops on machine reboot:

sudo update-rc.d mythbackend-svn start 40 2 3 4 5 . stop 15 0 1 6 .

Errors and Solutions

tv_grab_uk_rt - Undefined argument in option spec

Edit /usr/bin/tv_grab_uk_rt and remove days and offset args from GetOptions variable list, and replace with:

       'offset'        => \ my $opt_offset,
       'days'          => \ my $opt_days,


QMYSQL3 driver not loaded

  • apt-get install libqt3-mt-mysql

Missing menu items

  • apt-get install msttcorefonts

Opening DVB frontend device failed. eno: Permission denied (13)

/dev/video* is by default only read/writable by root:video:

[email protected]:~$ ls -l /dev/video*
crw-rw---- 1 root video 81, 0 2007-11-03 16:12 /dev/video0
crw-rw---- 1 root video 81, 1 2007-11-03 16:12 /dev/video1

To fix: sudo adduser mythtv video

Zero sized recorded program images in mythweb


Scheduler log output (meaning of "S C I T N" etc)

Title - Subtitle 
should be pretty obvious!
actual channel number
channel ID in mythtv database
day in month of recording
start time of recording
end time of recording
sourceID - ID of source of programs as defined by mythtv-setup (eg. UK Freeview)
cardID - ID of card to be used for recording. 0 if not to be recorded.
inputID - ID of input (combination of source and card). 0 if not to be recorded.
recording type
  • S - SingleRecord
  • T - TimeslotRecord
  • W - WeekslotRecord
  • C - ChannelRecord
  • A - AllRecord
  • F - FindOneRecord
  • d - FindOneDailyRecord
  • w - FindOneWeeklyRecord
  • O - OverrideRecord/DontRecord
recording status:
  • A - Aborted
  • R - Recorded
  • n - Recording/WillRecord on CardID
  • X - DontRecord
  • P - PreviousRecording
  • R - CurrentRecording
  • E - EarlierShowing
  • T - TooManyRecordings
  • c - Cancelled
  • M - Missed
  • C - Conflict
  • L - LaterShowing
  • r - Repeat
  • x - Inactive
  • K - LowDiskSpace
  • B - TunerBusy
  • N - NotListed
  • V - NeverRecord
recording priority

MythTV and LIRC

Using the Ctrl key in config lines

Contrary to some sources, the required format for the config line is config=Ctrl+X. For example:

    prog = mythtv
    button = TV
    config = Ctrl+2

Repairing broken MythTV tables

  1. Stop MythTV and MySQL
  2. cd /var/lib/mysql/mythconverg
  3. myisamchk *.MYI
  4. Identify broken tables
  5. myisamchk -r brokenTable.MYI
  6. Restart MythTV and MySQL

Slow mythfrontend menu transitions

This will often happen if (with an nVidia driver), the nVidia libglx file has been overwritten by an xserver upgrade. To check for this, run glxinfo | grep direct - if the driver is working the direct rendering should be on. If not, check the /var/log/Xorg.0.log for:

(EE) NVIDIA(0): Failed to initialize the GLX module...

In this case, it's possible to reinstall the latest nvidia linux driver, or alternatively, simply (as root):

mv /usr/X11R6/lib/modules/extensions/ /usr/X11R6/lib/modules/extensions/
ln -s /usr/X11R6/lib/modules/extensions/<nvidia ver> /usr/X11R6/lib/modules/extensions/


Not yet possible to play this in MythTV yet, as far as I'm aware. However, you can save it to a file, and play it back (slowly, on anything but very powerful hardware).

  • Grab latest x264, ffmpeg and mplayer from svn, and compile manually.
  • Add the following to your channels.conf:
  • Tune to the channel, and check you're getting lock with tzap "BBC HD1"
  • Grab a portion of the stream with dvbstream -o 8192 > myfile.ts (Note the use of dummy PID 8192 - this tells dvbstream to record the entire transport stream, rather than just selected program streams).
  • Playback the stream with mplayer myfile.ts. MPlayer should tell you there are two program streams - an H264 video on pid 1502, and an a52 audio stream on pid 1505. Sample mplayer log snippet below:
Playing myfile.ts.
TS file format detected.
VIDEO H264(pid=1502) AUDIO A52(pid=1505) NO SUBS (yet)!  PROGRAM N. -28604
FPS seems to be: 25.000000