DESCRIPTION

mythtvfs is a ``filesystem in userspace'' (FUSE) interface to the MythTV Personal Video Recorder (PVR) software, that allows you to interact with mythtv as if it were a file system. It creates an overlay filesystem that encodes recording metadata (title, episode, description, etc.) into a filename so that systems that do not natively talk to MythTV can still get information about a given show. This allows use of standard UNIX programs (ls, grep, cut, sort) to search and select programs, and permits running video software like mplayer directly from the command line rather than via the normal MythTV GUI frontend.

The value of this is that it enables scripting of MythTV interactions using any scripting language, through standard file system type operations. Examples could include: a bash script for grepping through the listings to find a show and play it with mplayer; a Perl script to encode and copy episodes of your favorite television shows onto a video iPod; a Python script that downsamples/compresses recordings of a given tv series more than a month old to save disk space; a Ruby program to generate an alternate GUI interface to list available recordings and allow playing them via mplayer.

This may also be useful for users wishing to access mythtv and play recordings from systems that cannot run mythtv (such as if they're running different Linux distros).

A design goal is to provide compatibility with the in-filename metadata extraction capabilities in Galleon. See Filename Structure below.

Usage

After installing the FUSE libraries and kernel modules, mythtvfs can be built using the standard `./configure && make`.

Unless your MythTV backend is running locally, you will also need to enable NFS on the backend, export the MythTV video repository (typically /var/lib/mythtv) and establish an NFS mount locally (at, say, /srv/myth).

Filename Structure

Filenames in the MythTVfs filesystem default to being named based on their TV Program's metadata. The elements are contained by the brace symbols (``{}'') and have the original filename embedded, and then end with ``.mpg''.

Where ``RECORD_DATE'' has the format ``Sat Jan 24 22:58:00 2009'', and ``AIR_DATE'' has the format ``2005-03-31''. ``DURATION'' is measured in seconds, and ``CHANNEL'' is the shortened channel ``callsign''. ``FILE'' is the original MythTV filename for storage (e.g. ``1013_20051207210000_20051207220000.nuv''). The file ends with ``.mpg'' because Galleon will only recognize file extensions that it expects the TiVo to be able to play.

If you dislike the default filename format, you can change it using the ``format'' option.

Hooking to Galleon

You'll need a version of Galleon that understands this file format layout. A patch against 2.1.0 is available on the MythTVfs homepage. Just add a ``GoBack'' path that matches your MythTVfs mount point, and it will automatically extract all the metadata from the filename.

OPTIONS

-h, --help

Prints a synopsis of program usage and exits.

-V, --version

Prints the program version and exits.

-d, -o debug

Enable debug output (implies -f)

-f

Foreground operation

-s

disable multi-threaded operation

-ooption[=value]

-o host=HOST MythTV backend hostname

-o port=PORT MythTV backend port number

-o format=FORMAT Format to use for filenames. Defaults to ``{%T}{%a}{%S}{%s}{%c}{%d}{%D}%f.mpg''. See below for what the various tags mean.

2007-11-11 The Cheetah Orphans
2007-11-04 In the Valley of the Wolves
2007-10-28 Silence of the Bees
2007-02-11 Supersize Crocs
2005-02-13 From Orphan to King
2005-01-09 Violent Hawaii
2004-02-08 Diamonds

SEE ALSO

ERRORS

No listings in /media/mythtvfs, but files present in /myth/recordings

myhost: Connection timed out

Doublecheck that the second argument to mythtvfs is a valid hostname that is network accessible. Try running `ping myhost`.

fuse: bad mount point `/media/mythtvfs': Transport endpoint is not connected

Something appears to have killed the mythtvfs process or mythtvfs has otherwise died (perhaps due to a bug you should report?) rendering its mount point unavailable. Try umount'ing the mount point, killing the mythtvfs process (if it's hung), and re-establishing the mythtvfs process. In the worst case, it may be required to reboot the system to get things back to normal.

umount: /media/mythtvfs: device is busy

A process is still accessing the mythtvfs file system, preventing it from being unmounted. Try running `lsof | grep mythtvfs` to find processes that may have open file handles in the file system.

BUGS

Please report bugs directly to the author.

HISTORY

mythtvfs was written initially with the motivation to connect mythtv into Galleon.

COPYRIGHT AND LICENSE

Copyright (C) 2005-2008 by Kees Cook

mythtvfs is free software; you can redistribute it and/or modify it under the terms of the GPL.

Manpage Copyright (C) 2007 by Bryce Harrington (licensed under the same terms as mythtvfs itself).

Format support based on work by Morty Abzug, and licensed under the same terms as mythtvfs itself.