Difference between revisions of "Repairing the Seektable"

From MythTV Official Wiki
Jump to: navigation, search
(Repairing the Seektable)
Line 9: Line 9:
 
== Repairing the Seektable==
 
== Repairing the Seektable==
 
=== Preparation===
 
=== Preparation===
 +
First, run the <code>optimize_mythdb.pl</code> script to ensure that the MySQL database is in good order.
 +
 +
For my Ubuntu Feisty machine, this is as simple as running the following command:
 +
sudo /usr/share/doc/mythtv-backend/contrib/optimize_mythdb.pl
 +
 +
This will iterate through each of the tables in the mythconverg database, 'optimizing' each one.  Once the <code>optimize_mythdb.pl</code> script has returned successfully, it is time to move on.
 +
 +
=== Using mythcommflag===
 +
mythcommflag is generally very successful and very efficient at rebuilding the seektable. 
 +
 +
For each recording that you wish to repair, run the following command:
 +
mythcommflag --file <infile> --rebuild
 +
 +
where <code><infile></code> is the path to a recording that exists in the Myth TV database.  There are other options that can be used to specify the input filename(s), refer to the [[mythcommflag]] page for further details.
 +
 +
  
 
=== Using mythtranscode===
 
=== Using mythtranscode===
Line 14: Line 30:
 
  mythtranscode --mpeg2 --showprogress --infile <path-to-file>  
 
  mythtranscode --mpeg2 --showprogress --infile <path-to-file>  
 
(where path-to-file represents a file listed in mythtv recordings)
 
(where path-to-file represents a file listed in mythtv recordings)
 
=== Using mythcommflag===
 
Use the <code>--rebuild</code> option.
 
  
 
== Possible Causes of a Corrupt Seektable==
 
== Possible Causes of a Corrupt Seektable==
 
* Editing a recording outside of the MythTV Frontend.
 
* Editing a recording outside of the MythTV Frontend.
 
* Excessive disk IO during recording could prevent invalid SQL updates to the [[Seektable]] (I think).
 
* Excessive disk IO during recording could prevent invalid SQL updates to the [[Seektable]] (I think).

Revision as of 12:28, 9 January 2008

It is possible to corrupt your seektable for one or more recordings, which can result in:

  • Being unable to skip forward and backward correctly, and
  • Recordings reporting the incorrect length.

mythcommflag and mythtranscode are two of the tools that can be used to rebuild the seektable.

Important.png Note: After rebuilding the seektable, any cutlist you have created for a recording will no longer be properly synced and should be recreated.

Repairing the Seektable

Preparation

First, run the optimize_mythdb.pl script to ensure that the MySQL database is in good order.

For my Ubuntu Feisty machine, this is as simple as running the following command:

sudo /usr/share/doc/mythtv-backend/contrib/optimize_mythdb.pl

This will iterate through each of the tables in the mythconverg database, 'optimizing' each one. Once the optimize_mythdb.pl script has returned successfully, it is time to move on.

Using mythcommflag

mythcommflag is generally very successful and very efficient at rebuilding the seektable.

For each recording that you wish to repair, run the following command:

mythcommflag --file <infile> --rebuild

where <infile> is the path to a recording that exists in the Myth TV database. There are other options that can be used to specify the input filename(s), refer to the mythcommflag page for further details.


Using mythtranscode

If you have trouble rebuilding a seektable with mythcommflag, try using mythtranscode as follows:

mythtranscode --mpeg2 --showprogress --infile <path-to-file> 

(where path-to-file represents a file listed in mythtv recordings)

Possible Causes of a Corrupt Seektable

  • Editing a recording outside of the MythTV Frontend.
  • Excessive disk IO during recording could prevent invalid SQL updates to the Seektable (I think).