Difference between revisions of "MythTV"

From Briki
Jump to: navigation, search
(Compiling from SVN)
 
(16 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
== Compiling from SVN ==
 
== Compiling from SVN ==
  
=== MythTV Core ===
+
=== MythTV Core/Backend ===
For ubuntu, ensure the following packages are installed:
+
For ubuntu (gutsy), ensure the following packages are installed:
  
 
* gcc
 
* gcc
 
* g++
 
* g++
 
* make
 
* make
* linux-headers-''version'' (also ln -s /usr/src/linux-headers-''version'' /usr/src/linux)
+
* linux-headers
 +
* libfreetype6-dev
 +
* libqt3-mt-dev
 
* liblame-dev
 
* liblame-dev
 +
* libxv-dev
 +
* libxxf86vm-dev
 +
 +
Maybe also?
 
* qt3-dev-tools
 
* qt3-dev-tools
* lirc
 
* liblircclient-dev
 
* libasound2-dev
 
* libxvmc-dev
 
* libqt3-mt-dev
 
* libxxf86vm-dev
 
 
* libqt3-mt-mysql
 
* libqt3-mt-mysql
 
To fix freetype headers not being found, simply:
 
<pre>
 
sudo ln -s /usr/include/freetype2/freetype /usr/include/freetype
 
</pre>
 
  
 
=== MythPlugins ===
 
=== MythPlugins ===
Line 37: Line 32:
 
* libsdl1.2-dev
 
* libsdl1.2-dev
 
* libfaad2-dev
 
* libfaad2-dev
 +
* libmysqlclient15-dev
  
 
+
=== MythTV frontend (Install and run only) ===
=== MythTV Frontend (Install and run only) ===
 
 
To install and run a mythtv frontend (previously compiled on a different machine), you need:
 
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-dev
 +
* libqt3-mt-mysql
 +
* libxv-dev
 +
* libxvmc-dev
 +
* libxxf86vm-dev
 
* qt3-dev-tools
 
* qt3-dev-tools
 +
 +
== /etc/init.d ==
 +
 +
Create as /etc/init.d/mythbackend-svn and ensure executable:
 +
<pre>
 +
#!/bin/sh
 +
#
 +
# /etc/init.d/mythbackend-svn  --  script to start and stop mythbackend.
 +
 +
test -x /opt/mythtv-svn/bin/mythbackend || exit 0
 +
 +
DESC=mythbackend
 +
NAME=mythbackend
 +
BINARY="/opt/mythtv-svn/bin/mythbackend"
 +
#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"
 +
PIDFILE=/var/run/mythbackend.pid
 +
USER=mythtv
 +
GROUP=${USER}
 +
HOME=/var/lib/mythtv
 +
 +
if [ -f /etc/mythtv/mythbackend ]; then
 +
        . /etc/mythtv/mythbackend
 +
fi
 +
 +
case "$1" in
 +
    start)
 +
        echo -n "Starting ${DESC}: ${NAME}"
 +
        start-stop-daemon --start --quiet --chuid ${USER}:${GROUP} --exec ${BINARY} --pidfile ${PIDFILE} -- ${CMDARGS}
 +
        echo "."
 +
        ;;
 +
    stop)
 +
        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
 +
        ;;
 +
esac
 +
 +
exit 0
 +
</pre>
 +
 +
To ensure it starts/stops on machine reboot:
 +
<pre>
 +
sudo update-rc.d mythbackend-svn start 40 2 3 4 5 . stop 15 0 1 6 .
 +
</pre>
  
 
== Errors and Solutions ==
 
== Errors and Solutions ==
Line 59: Line 116:
  
 
* apt-get install libqt3-mt-mysql
 
* 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:
 +
<pre>
 +
andrew@colorado:~$ 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
 +
</pre>
 +
To fix: '''sudo adduser mythtv video'''
 +
 +
=== Zero sized recorded program images in mythweb ===
 +
See http://svn.mythtv.org/trac/ticket/3217
  
 
== Scheduler log output (meaning of "S C I  T N" etc) ==
 
== Scheduler log output (meaning of "S C I  T N" etc) ==

Latest revision as of 10:22, 10 June 2008

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

MythPlugins

  • 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

/etc/init.d

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

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

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

DESC=mythbackend
NAME=mythbackend
BINARY="/opt/mythtv-svn/bin/mythbackend"
#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"
PIDFILE=/var/run/mythbackend.pid
USER=mythtv
GROUP=${USER}
HOME=/var/lib/mythtv

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

case "$1" in
    start)
        echo -n "Starting ${DESC}: ${NAME}"
        start-stop-daemon --start --quiet --chuid ${USER}:${GROUP} --exec ${BINARY} --pidfile ${PIDFILE} -- ${CMDARGS}
        echo "."
        ;;
    stop)
        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
        ;;
esac

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,

See: https://sourceforge.net/tracker/?func=detail&atid=424135&aid=1440322&group_id=39046

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:

andrew@colorado:~$ 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

See http://svn.mythtv.org/trac/ticket/3217

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

Title - Subtitle 
should be pretty obvious!
Chan 
actual channel number
ChID 
channel ID in mythtv database
Day 
day in month of recording
Start 
start time of recording
End 
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.
T
recording type
  • S - SingleRecord
  • T - TimeslotRecord
  • W - WeekslotRecord
  • C - ChannelRecord
  • A - AllRecord
  • F - FindOneRecord
  • d - FindOneDailyRecord
  • w - FindOneWeeklyRecord
  • O - OverrideRecord/DontRecord
N
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
Pri 
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:

begin
    prog = mythtv
    button = TV
    config = Ctrl+2
end


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/libglx.so /usr/X11R6/lib/modules/extensions/libglx.so.orig
ln -s /usr/X11R6/lib/modules/extensions/libglx.so.<nvidia ver> /usr/X11R6/lib/modules/extensions/libglx.so

BBC HD

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:
BBC HD1:554000000:INVERSION_AUTO:BANDWIDTH_8_MHZ:FEC_2_3:FEC_1_2:QAM_64:TRANSMISSION_MODE_8K:GUARD_INTERVAL_1_32:HIERARCHY_NONE:1502:1505:36932
  • 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