Difference between revisions of "Video Library"

From MythTV Official Wiki
Jump to: navigation, search
(Fixed error in openSUSE 11.1.)
(Remove freenode and trac references)
 
(77 intermediate revisions by 20 users not shown)
Line 1: Line 1:
{|
+
{{Note box|MythVideo has been merged with core MythTV as of .25It is no longer a separate plugin.}}
|{{Important}}
 
|'''The information on this page pertains to 0.21If upgrading to 0.22, see [[MythVideo .22 Transition Guide]] for a large explination of changes.'''
 
|}
 
  
[[MythVideo]] allows for cataloging and playback of a variety of video file formats.  It can perform automatic meta data look ups on [[Tmdb.pl|themoviedb.org]] or IMDB as well as retrieve poster artwork.  You can also add your own Meta data to your own videos and add custom poster artwork to videos.
 
  
It features three different "views" on your collection:
+
= Synopsis =
* Browse view - Shows a single video on screen at once with its metadata.
 
* Tree view - Presents your videos in a view similar to the watch recordings screen.  This view can be configured to show file/subdirectories.
 
* Gallery - Presents you with numerous titles at once laid out in a view similiar to [[MythGallery]].
 
  
[[MythVideo]] can use MythTV's [[Internal player|internal media player]], to play back the video files, by specifying "Internal" as the player. Optionally, it can be configured to use external players such as Xine or mplayer.
+
The video library allows for cataloguing and playback of a variety of video file formats.  It can perform automatic metadata look ups on [[Tmdb.pl|themoviedb.org]] or [[Ttvdb.py|The TV DB]] as well as retrieve poster, fanart, banner, and screenshot artwork. You can also add your own Meta data to your own videos and add custom poster artwork to videos.
  
= Installation =
+
= Configuration =
  
MythVideo is a plugin module for MythTV. It is installed by default with Myth focused distributions like MythBuntu.  If you install MythTV manually, the plugin modules are not automatically installed. You can see that MythVideo is not installed because the 'Watch Videos' menu item is missing from the Media Library sub menu.  Also 'Optical Disks' is missing from the main menu and 'Video Manager' is missing from Utilities / Setup menu.
+
== Setting up Video and Image Folders ==
  
== Instructions For Specific Distributions ==
+
===Storage Groups===
  
=== Debian derived (Ubuntu etc) ===
+
Videos in Myth can now be stored on the backend and streamed to the frontend without a NFS or Samba mount. It is critical to note that the Storage Group implementation is ''not'' complete, and to take that into consideration when weighing whether to move to Video Storage Groups.
  
From a command shell or konsole window, type or paste this command
+
====Advantages====
  
  sudo apt-get install mythvideo
+
* Adding new frontends means zero configuration for videos, recordings, and metadata images.
 +
* Can dynamically add space to your video library without using RAID or LVM. Loss of one drive does not mean loss of the entire library.
 +
* Can spread video hosting across many/all backends.
 +
* No need to set up network mounts of any kind.
  
 +
====Disadvantages====
  
Then restart MythTV. It should load available modules.
+
* External Video Players (mplayer, xine, VLC) will '''not work''' with videos hosted on an SG.
 +
* ISOs played back via storage group must be unencrypted.
 +
* (0.24 and previous) The UPnP server takes its configuration from the old local video definitions.
  
=== openSUSE 11.1 ===
+
====Setting Up Video/Image Storage Groups====
  
* Add the packman repository if you haven't already (this should have been done to install MythTV though).
+
# On the backend that will host the videos, stop the backend process and run mythtv-setup.
 +
# In Storage Group configuration, set up directories for each of the following: '''Videos, Trailers, Fanart, Banners, Screenshots, and Coverart'''.
 +
# ''Optional Step:''  If you would like to use a combination of Storage Group and locally hosted video, you can do the following.  On the frontends, go to Utilities/Setup->Setup->Media Settings->Video Settings->General.  Change "Directories that hold videos" to point at a directory that is '''not the same''' as the one the Storage Group points at.  If the local video setting and the Storage Group setting point at the same path, unpredictable results may occur.  While the system will attempt to prefer the Storage Group path and ignore the local one, there have been reports of complete loss of this functionality when both the frontend and backend settings are set to the same paths (MythTV Trac Ticket {{ticket|8608}}).
 +
# Enter the video library.  Press the "M" (MENU) key and choose "Scan For Changes."
  
  zypper addrepo http://packman.mirrors.skynet.be/pub/packman/suse/11.1 Packman
+
===Local Video Storage===
  
* Install it:
+
If you choose not to use Storage Groups then simply don't define any of the above mentioned Storage Groups and set up your directories for videos and artwork on each individual frontend.  On remote frontends the directories will need to be mounted locally via NFS or Samba.  As always, the mount points need to be identical on all frontends.  Then go to Utilities/Setup->Setup->Media Settings->Video Settings->General and point to the appropriate directories for Videos, Trailers, Fanart, Banners, Screenshots, and Coverart.
  
  zypper install mythvideo
+
== Folder Images ==
 
 
* Create the movie poster directory. '''NOTE''':  ''tv'' is the name I have chosen for the user who will be running mythfrontend, substitute whatever user ID you will use.
 
  
  mkdir ~''tv''/.mythtv/MythVideo;chown -R ''tv'' ~''tv''/.mythtv
+
You can place a file named folder.(png | gif | jpg) into a folder that is accessible to the backend and it will be used when the gallery view is displayed instead of a plain folder icon.  As a fallback, you can place any image in the folder and it will be used.  In absence of one of these images, Myth will descend into the directory and find the first valid poster on an item contained within and use it as the folder image.
  
== Common Instructions ==
+
The video library will also descend into folders looking for valid metadata to assign when a folder is highlighted.  By default, it will descend one level in this search, but will descend up to twice if the intermediate directory contains folders starting with the (translated) word "Season" and the items inside those folders have titles which '''exactly''' match the grandparent folder's title.  So a folder structure like "Stargate/Season 1/" with Items called "Stargate: SG-1" will fail to descend twice, but "Stargate: SG-1/Season 1" with items called "Stargate: SG-1" will produce imagery from the top level.
  
Now read [[MTD]], which you'll also need.
+
== Scanning for Videos ==
  
= Configuration =
+
When you add new videos to your storage directories, you can trigger a scan from any library view by choosing MENU->Scan For Changes. (Press the [[Keybindings|menu key]] on your keyboard/remote to bring up the menu).
  
== Selecting Folders ==
+
In versions of MythTV prior to .22, it was necessary to enter the Video Manager screen to initiate a scan.  This is no longer the case.
In the MythVideo setup (Settings-> Videos Settings-> General Settings), you can enter your video directories as a colon separated list.
 
  
All video files must be readable as part of the local filesystem.  This means if you have a separate frontends and backends, you must share the directories remotely as described in [[Mediashares]] (perhaps with NFS).
+
You can trigger an update from the command line by calling:
  
== Folder Images ==
+
<pre>
You can place a file named folder.(png | gif | jpg) into a folder that is accessible to MythVideo and it will be used when the gallery view is displayed instead of a plain folder icon.
+
mythutil --scanvideos
 +
</pre>
  
== Internal Player ==
+
== Parental Controls ==
The MythTV [[Internal player]] is the recommended player for Video and DVD playback from 0.21 onwards. It will also play DVDs and DVD isos will full menu and subtitle support. It uses the same OSD, settings, remote bindings and audio configuration as playback of recordings making it much easier to setup and use than an external player. It supports almost all video formats and content including High Definition and in addition a wide range of easily accessible features including configurable aspect ratios, picture fill modes, timestretch, bookmarks, video editing, automatic locale based or manual selection of subtitle and audio streams and much, much more.
 
  
To use the [[Internal player]] in "File Extensions" set:
+
Configuration of Parental controls is found at Utilities/Setup->Setup->Media Settings->Video Settings->General.
* Type in file suffix (eg mpeg or avi...)
 
* File Type to: "Internal" or ''blank''
 
* Default player is unticked
 
The [[Internal player]] uses ffmpeg so all supported codecs are documented on the [http://ffmpeg.mplayerhq.hu/ffmpeg-doc.html#TOC16 ffmpeg project site ].
 
Playback decoding is controlled by the MythTV TV playback settings
 
  
=== Rebuild seek table ===
+
The video library supports the ability to limit what videos maybe viewed without a password/pin. There are 4 different levels to choose from. You can select a default level and a password/pin for each level.  Any videos/files at or below the current level will show up in the list.  You can modify Parental Levels on-the-fly from within the Edit Metadata menu in the UI itself.  Note that if you set the parental level to a high value, when someone enters the library, even if they fail the PIN prompt, they will get that parental level.  Thus, it is best to set the parental level to the lowest level you want publicly accessible.
  
Some mp4s don't seek correctly, so you might have to build a seek table using a command like so:
+
To change parental level within the UI, Press the numeric value of the level, from 1-4.  If you have set a PIN for that value, you will be prompted it at that time.
mythcommflag --video myvideo.mp4
 
  
The symptoms are the internal player not displaying the correct time in the OSD, seeking being "weird" such as going 1-2 minutes forward in time when you hit 'rewind'.
+
The video library remembers that you entered the pin for 2 minutes, so once you've entered the pin for a given level, you can freely switch between that level and all lower levels without a pin until that two minutes is up, after which you'll need to enter a pin again to switch to a higher level.
  
=== Rebuild Index ===
+
== Internal Player ==
  
If your movies stutter and speed up near the end (around the last 20 minutes or so), an easy fix is to run mencoder on the movie file to fix it. A few minutes of computing time and your movies will be good as new. Visit this link for more information, as well as a script to run after ripping movies to make sure they're good before you watch them.
+
The MythTV [[Internal player]] is the default (and recommended) player for Video and DVD. It will also play DVDs and DVD isos with full menu and subtitle support. It uses the same OSD, settings, remote bindings and audio configuration as playback of recordings making it much easier to setup and use than an external player. It supports almost all video formats and content including High Definition and in addition a wide range of easily accessible features including configurable aspect ratios, picture fill modes, timestretch, bookmarks, video editing, automatic locale based or manual selection of subtitle and audio streams and much, much more.
  
[http://www.summet.com/blog/2008/04/28/mythtv-mythdvd-movie-ripping-problem/ Jay's Technical Talk -- MythTV / MythDVD movie ripping / playback problem (Solved!) ]
+
=== Rebuild seek table ===
  
== Importing DVDs ==
+
Some files require a seektable in order to skip/seek properly.  If the Internal player is behaving strangely, please try building a seektable before resorting to an external player. To create a seektable, run the following command on the file:
There are multiple ways to import DVD's to your MythTV system.
 
  
===Importing with Frontend===
+
<pre>
To import a DVD using you frontend system, click on "Import DVD" from your "Optical Disks" item on the MythFrontend Front Page. For more information see the [[MythDVD#Usage|MythDVD]] page.
+
mythcommflag --rebuild --video filename.ext
 +
</pre>
  
===Importing with Networked Computer===
+
The symptoms are the internal player not displaying the correct time in the OSD, not seeking at all, partially corrupt playback, or restarting playback on any attempt to seek.
[[MythDVD]] can rip DVDs into your MythVideo folders but it does tie up a frontend. You may wish to rip DVDs on other machines on your network e.g. your fileserver. I've found the following procedure works well:
 
* Run ''lsdvd'' to find the largest DVD title, it's usually 1.
 
* Run ''vlc'', pick ''File/Open Disc'' and select that title.
 
* Check VLC plays the programme you want and gets to the end credits (skip forward).
 
* Stop playback and pick ''File/Open Disc'' again, select the track and click ''Stream/Save'' and then ''Settings...'' ([[Media:VLCrip.png|screen shot]])
 
* In the ''Stream output'' dialog click ''File'' in the ''Outputs'' box and fill in the ''Filename'', select ''MPEG PS'' and ''Select all elementary streams''.
 
* Click ''OK'' and VLC will rip the track into the chosen file.
 
* Test the rip with something else like ''mplayer''.
 
 
At this point MythVideo can see the file but you might want to go into the VideoManager on a frontend so you can fix the metadata, grab a poster etc.
 
  
If you're using an external player you're finished but if you're using the Internal player you won't be able to skip forward or backward until you add a seektable for the file. To do this I run
+
== External Player Configuration ==
 
 
[[mythtranscode]] --mpeg2 --video --buildindex --infile "<Movie>.mpg"
 
  
It may leave a zero length file called ''<Movie>.tmp'' which you can remove.
+
Configuration of Parental controls is found at Utilities/Setup->Setup->Media Settings->Video Settings->General.
  
The [[mythcommflag]] man page indicates it can also do this but it fails dismally for me, maybe because DVD MPEG streams can (and do) change characteristics midstream.
+
''Location:  Utilities/Setup->Setup->Media Settings->Video Settings->Player Settings''
Other DVD ripping methods are available but VLC has given me the best results. Simply copying the DVD files or using ''vobcopy'' doesn't work well.
 
  
=== Wrong audio track on playback ===
+
This screen is largely self-explanatory.  You can configure default players for Videos, DVDs, VCDs, as well as (optionally) an alternate video player.  To use the Internal player as your default player, simply enter "Internal" (without quotes) as the string.
''Select all elementary streams'' in a VLC rip will grab all the audio tracks available. The Internal player can switch among them from the OSD but you may get annoyed at having to do this every time. You can trim out the offending tracks permanently with
 
  
ffmpeg -i Movie.mpg
+
== Trailer Playback ==
mv Movie.mpg Movie.mpg.bak
 
mpegdemux --remux --stream 0xe0/0xbd --substream <audio> Movie.mpg.bak Movie.mpg
 
  
''ffmpeg -i'' will list out the streams, the stream numbers you want are the numbers in square brackets starting with 0x., they usually start at 0x80. The ''--substream'' option to ''mpegdemux'' selects which audio streams to include. It can take the form ''0x81/0x82/0x83'' as a list, ''0x81-0x83'' as a range or ''-0x80'' as an exclusion.
+
The video library can both associate a single trailer with a film as well as play a user-specified number of trailers before all films.
  
You will have to [[Repairing the Seektable|rebuild the seektable]] if using the Internal player.
+
To configure a film's specific trailer, open the [[Video_Library#Editing_Video_Metadata|edit metadata]] screen and click on the trailer button.  Select the trailer you want to associate with the film.  Once you have done so, to play a film's trailer, highlight the item and choose INFO->Play...->Play Trailer.
  
== Parental Controls ==
+
To set up randomized trailer playback, navigate to Utilities/Setup->Setup->Media Settings->Video Settings->Metadata Settings
MythVideo supports the ability to limit what videos maybe viewed without a password/pin. There are 4 different levels that a
 
video/file can be set at. From within the configuration you can select a default level and a password/pin for each level. Any videos/files at or below the current level will show up in the list. Use Video Manger to change the level of any particular video (must be done on a video-by-video case, or with a hack like [[Automatic_Parental_Control_Settings_-_Mythvideo_hack/feature_request|this one]]).
 
  
MythVideo will only stay at that level until you try to change the level (by hitting keys 1-4 in the Browse or List screens), or exit out of MythVideo to the main frontend menu. Changing to a level which has a password/pin set will require the pin to be entered. MythVideo remembers that you entered the pin for 2 minutes, so once you've entered the pin for a given level, you can freely switch between that level and all lower levels without a pin until that two minutes is up, after which you'll need to enter a pin again to switch to a higher level.
+
Within these settings, you can enable randomized trailer playback before a film.  For a Theater-like experience, enable this option and select the number of trailers to see before the film. With this setting enabled, you will see the specified number of trailers when pressing the SELECT key on a movie, as well as having the option INFO->Play...->Play with Trailers.
  
== External Player Configuration ==
+
== Editing Video Metadata ==
  
To choose an external player (mplayer, Xine, etc.), you will need to delve into your [[MythVideo]] setup.
+
To edit video metadata, highlight any item in your library. Then press INFO->Change Video Details->Edit Details.
  
At the main screen, scroll down to '''Setup''', then '''Video Settings''', then '''Player Settings'''. Here you'll see a box which contains the command line [[MythFrontend]] will launch your video file with. '''%s''' is a variable which corresponds to the file path and name of the file you're going to play. All you need to do is edit this command line to run whatever player you like''The %s string expansion appears to be broken in version 0.20; it no longer contains the entire path, but only the file name.''
+
For films that have no listings, home movies, or films whose metadata simply needs some "massaging," the video library provides an Edit Metadata screenWhich options are offered will vary slightly by theme, but editing basic metadata is possible in all themes.  
  
Please note that if you use [[MythVideo]] to launch external players, you ''must'' have a window manager configured and running so that window focus can change from [[MythFrontend]] to the media player. Compatible window managers include those built into KDE and Gnome, [[Ratpoison]], [[Fluxbox]], and I imagine many more.
+
The edit metadata screen is fairly simple.  It provides a series of text edits, spinboxes, and button lists to modify the metadata for the selected item.  You can also enter a specific player command for an item if necessary, a file to play afterwards, toggle whether an item is visible, and toggle the items watched status.
  
=== mplayer Configuration ===
+
Change the metadata as you wish, and select "OK" or "Done" (varies by theme) to commit your changes.  If you wish to cancel, press Escape of the Back key on your remote.
  
The default configuration uses mplayer
+
== Metadata Lookup ==
  mplayer -fs -zoom -quiet -vo xv %s
 
  
If you have audio sync problems, try changing the audio system to OSS
+
The video library includes numerous grabber scripts for handling both Film and Television content.  these scripts download plot, length, cast, and other textual information, as well as provide access to high quality poster, fanart, banner, and screenshot images.  Note that not all scripts provide all image types.  The default grabber scripts are [[Tmdb.py]] for movies and [[Ttvdb.py]] for television.
  mplayer -fs -zoom -quiet -ao oss -vo xv %s
 
  
{{Tip box
+
The video library parses as much information as it can from a file's filename.  Under ideal conditions, MythTV will parse the Title, Subtitle, Season, and Episode (where applicable) of a file.  New users will want to read [[MythVideo File Parsing|about filename parsing]] to see the acceptable naming conventions for files.  File naming traditionally associated with pirated material will prevent parsing from working properly, and will prevent metadata lookup from succeeding.  Additionally, it is the position of the project developers that pirated material is unwelcome and unsupportedPlease don't open bugs because MythTV doesn't parse stolen material properly.
|msg=If you want to disable xscreensaver while you're watching a video with mplayer add this to /home/mythuser/.mplayer/config
 
  stop-xscreensaver=1
 
}}
 
  
==== Mplayer Playlists ====
+
The video scanner determines whether something is film or television material based on the season and episode values.  If the scanner does not find an season or episode number while parsing a file, and the user does not set one, the movie grabber will be used.  If the season or episode are greater than 0, the television grabber will be used.
  
You can create a playlist containing a list of video files to play continuously one after another.  This is great for music videos at a party or combining movies downloaded in several parts.
+
When you are ready to perform a metadata lookup, multiple options are available.  You can highlight an item and press the DOWNLOADDATA keybinding, which is "W" by default.  This will automatically start a metadata query for the selected item.  This same query can be started from the menu, by selecting INFO->Change Video Details->Retrieve Details.
  
There's no way to create the playlist from within mythtv, so you'll have to log in and do it from the shell.  Use any text editor to create playlist files with 1 filename per line and use the extension .pls.  You can also pipe a directory listing to a file.  Mplayer doesn't seem to like spaces in filenames so you'll need to rename files or they will be skipped over.  -EDIT- The playlist feature of mplayer chokes on filenames that have escaped spaces.  Remove the backslashes from the list of filenames in the playlist by using a text editor like vi and they won't be skipped.
+
===Metadata Grabbing with Storage Group Files===
  dir * > all_videos.pls
 
  
At the main screen, scroll down to '''Utilities/Setup''', then '''Setup''', then '''Media Settings''', then '''Video Settings''', then '''File Types'''.  You'll need to add a new file association for playlists and provide the command to play them.
+
Doing a metadata lookup on a Storage Group homed file will work.  It will download the images to the Fanart/Banner/Screenshot/Cover Storage Groups on the backend that hosts the video in question, so they '''must''' be definedIf they are not defined, the images will be downloaded to the Video Storage Group instead.
  
Select '''New''', then enter '''pls''' (without a period) and select '''Create new extension'''. 
+
===Metadata Grabber Troubleshooting===
Select the '''Command''' box and enter
 
  mplayer -fs -zoom -quiet -vo xv -playlist %s
 
If you are using xscreensaver you can add the option
 
  -stop-xscreensaver
 
to prevent the screensaver kicking in while watching the video.
 
Make sure the '''default''' and '''ignore''' boxes are not checked.
 
  
Add -shuffle after mplayer if you want them played in random order. 
+
If you find that the wrong grabber is being used, it is almost certain that one of the following occurred:
  
Don't forget to run the video manager so MythTV notices the new playlist file.  The playlist file will now show up in the list of videos.
+
* You are attempting to grab metadata for a legacy television item but have not removed and re-added it to the database to re-parse the filename(eg: The subtitle/season/episode fields are all crammed into the title field)  You can also fix this in "Edit Metadata" by setting the correct Title, Season, and Episode.  Subtitle is not required for a successful grab.
 +
* Your file is not named using one of the path/filename combinations that the scanner recognizes.  See [[MythVideo File Parsing|the documentation for supported file naming schemes]].
  
While they're playing, use < and > to jump to the previous or next file. If using a remote with lirc, the config commands to achieve this are '''pt_step -1''' and '''pt_step +1'''.
+
If the grabber *itself* fails, and you have checked the source to be certain that the item you are trying to search exists, then consider the following possibilities:
  
To have a playlist dynamically regenerated each time it's played, a small script can be used as the custom command: [[MythVideo:playRandom.sh]]
+
* The title contains some punctuation (hyphens, commas, apostrophes, etc.) that is not present in your local record, or vice versa.
  
=== Xine Configuration ===
+
To correct local metadata information to improve a metadata grab, select the item, press "I" (INFO), Change Video Details->Edit Details.  From here, you can correct the title/subtitle/season/episode to make it match the source and complete your metadata grab successfully.
Main Article: [[Configuring Xine]]<br /><br />
 
[http://xinehq.de Xine] is a popular media player under Linux. Xine can be configured to work with a remote control.
 
  
Running '''man xine''' from the terminal will get you an exhaustive list of the many options Xine can be run with, but the following is a good default:
+
If, after looking at the frontend logs, you see a crash in the grabber, or after having tested all of the above you are unable to complete a grab for an item in the TVDB/TMDB library, bring your concerns to '''#mythtv-users on Libera Chat''' - irc://irc.libera.chat/#mythtv-users ''before'' opening a bug in GitHub Issues.  If nobody is able to help you on IRC, then please open a bug in [https://github.com/MythTV/mythtv/issues Issues].
  xine -pfhq --no-splash
 
  
'''-p''' specifies "autoplay", '''f''' starts in fullscreen mode, '''h''' hides the GUI (if you've installed xine-ui) and '''q''' means that xine will exit after the video finishes playing, returning you to [[MythVideo]]. '''--no-splash''' disables the splash screen that Xine usually starts with.
+
===Mass Metadata Grabbing===
 +
As of .24, the video library can (and will, by default) automatically attempt to grab all metadata for items as they are inserted into the library. The default name-matching algorithm is set to a low tolerance to prevent false positives as much as possible, so some items may need a manual query if there are multiple items of the same name or multiple very closely named items.
  
=== Further Xine Configuration ===
+
==Custom Movie Artwork==
  
It seems that xine has a rather annoying habit of reverting back to the default keys even after configuring them, and that several functions overlap each other (the prev/next mrl function and the prev/next chapter buttons are an example). The easiest way to solve this problem is to edit the keymap file ($HOME/.xine/keymap usually) or just use the keymap editor in xine_gui if you have it installed, and set up the keys how you'd like, in my case one for watching vids and another for watching dvds. Then copy the keymap file to something similar to keymap.video and/or keymap.dvd.  Then enter this as your default player (using the above configuration as a base).
+
You can select artwork in the [[Video_Library#Editing_Video_Metadata|Edit Metadata screen]].  Click on the button to browse the configured directory for fanart, banner, screenshots, etc. You can use custom artwork for an item by placing it in one of these directories and selecting it from the file browser.
  
xine -pfhq --no-splash --keymap=file:/path/to/.xine/keymap.video %s
+
==Episode Images/Screenshots==
  
This tells xine to load the keymap from the specified fileAfter doing this xine decided to behave and has been working nicely for some time.
+
Depending on your theme, Coverart may be the default imagery in MythTV button lists. For Television material, the UI will display screenshots instead - but only if your episodes are stored in a certain way: The directory containing the video files must have the exact name as the series title in metadata - or it must begin with the word "Season" (or the localized translation of the word Season).  Display of screenshots is contingent upon having a screenshot downloaded and assigned to the video itemAlternately, it is possible to modify a theme to always display screenshot, or always display coverart, regardless of this fallback behavior.
  
== Per-file Configuration ==
+
= Using the Video Library =
Individual videos can be configured using the video manager at ''Main Screen->Utilities /Setup -> Video Manager''.
 
  
You can also run specified files with a non-standard command. While in the video manager, if you hit enter on a specific file, you are presented with the settings for that file. The categories here are fairly self explanatory, but in the '''Unique Player Command''' box at the bottom you can specify different parameters to launch the file with.
+
To view or play your videos, navigate to Media Library->Watch Videos.
  
If your movie comes in two or more parts, you can specify the file you always want to play next under '''File to Always Play Next'''. For example, if I'm editing "A Film Too Long CD1", I can shift left and right until I find "A Film Too Long CD2" and so on. This will give you seamless playback of your chosen flick.
+
If you don't see any videos, [[Video_Library#Scanning_for_Videos|you probably need to scan.]]  If you still see no videos, you probably haven't [[Video_Library#Setting_up_Video_and_Image_Folders|properly set up your folders or storage groups]]. If, after checking both, some or all videos are still missing, you may need to define an extension in the "file types" dialog-- by default, most common filetypes are supported.
  
== Metadata Lookup ==
+
Playing an item in the video library is as simple as highlighting it and pressing Enter or the SELECT key on your remote.  In some views, you will see an intermediate Item Detail screen before playback.  If you see this screen, select "Play" to start your film.
  
[[MythVideo]] comes bundled with some cute scripts to look up details about your film over the internet. When you're in the Video Manager, hit '''i''' to bring up the info screen. Here you'll see an option to '''Search IMDB'''. Hit enter, and the script will tootle along over to the Internet Movie Database and retrieve details about the film as well as a poster of it.
+
==Viewing Item Metadata==
  
Please note that the IMDB script relies on you having accurate filenames; if your film is named "@ f1lm 2 l0ng", the script isn't going to work. In this case, you can either use the '''Edit Metadata''' function to rename the movie within MythVideo and then re-attempt the '''Search IMDB''' option, or you can rename the file within the actual Linux OSAlternatively, you can enter the IMDB reference number manually. You can get this number by looking up your film on the IMDB website, and noting the number in the URL that follows the '''tt'''. For instance, Akira http://imdb.com/title/tt0094625/ has an IMDB number of 0094625. If you type this into the '''Manually Enter IMDB #''' input, the IMDB grabber script will shoot off and grab the data for you.
+
To view specific item metadata, highlight an item and press INFO->Video Info.  You will see a small selection of information views to view the plot, cast, or item detail screen for the selected item
  
In case the IMDB grabber script gets confused - sometimes different films have very similar names - the results are returned in order of popularity, as well as having their year of release shown in brackets. This should be enough for you to work out which is the correct entry.
+
==Video Library Views==
  
It's also important to note that certain versions of MythVideo have issues when trying to fetch movie information with the included IMDB Script.  If you aren't getting the plot, director, ratings, etc, then you are probably going to want to fix this.  The steps provided below have been copied from [http://fauxzen.com/2007/04/03/mythtv-020-02ubuntu2-imdb-fetch-problems/ this site].  The fix is pretty simple:
+
The video library features four different "views" on your collection:
  
First create a backup of the original script
+
* Browse View
 +
* Tree View
 +
* Gallery View
 +
* Manage View
  
  sudo cp /usr/share/mythtv/mythvideo/scripts/imdb.pl /usr/share/mythtv/mythvideo/scripts/imdb.pl-orig
+
Each view will vary by theme, so try out different themes to see which interface you like best. You can toggle between the views from within MythTV's video library by choosing MENU->Change View->Name of view.
  
Download the SVN Copy (now in an older Revision 18604)
+
==Metadata Browse Modes==
  
  wget "http://svn.mythtv.org/trac/export/18604/trunk/mythplugins/mythvideo/mythvideo/scripts/imdb.pl" -O imdb.pl
+
You can browse the library by metadata rather than folder structure. First, enable metadata browse modes by going to Utilities->Setup->Media Settings->Video Settings->General. On Page 2, enable the checkbox called "Enable Metadata Browse Modes." You can select the default view ("Folder" is the classic view by file structure), or toggle them on the fly.
  
Replace the old script with the new one
+
To change Metadata Browse Modes, Press the "M" (MENU) and select "Browse By...".  You can then select which metadata browse mode to switch to.
  
  sudo cp imdb.pl /usr/share/mythtv/mythvideo/scripts/imdb.pl
+
Currently available Metadata Browse Modes include:
  
Make the new script executable
+
* Folder (Default)
 +
* Cast
 +
* Genre
 +
* Category
 +
* Director
 +
* Studio
 +
* Year
 +
* User Rating
 +
* TV/Movies
  
  sudo chmod +x /usr/share/mythtv/mythvideo/scripts/imdb.pl
+
==Incremental Search==
  
You should be all set after that.
+
In large libraries, it can quickly become unwieldy to browse from the top of the list to the bottom.  You can now invoke the Incremental Search (Ctrl+S by default) to bring up a list of everything in the current view.  You can then enter the first letter/few characters of the item you are looking for, select it from the list, and jump straight to the item.
  
''Have updated link to older revision of imdb.pl, but this section still needs updating referencing the new equivalent Python script.''
+
=Screenshots=
  
==Custom Movie Artwork==
+
<gallery>
MythVideo looks for artwork downloaded from IMDB in ~/.mythtv/MythVideo. You can put custom artwork here and then in Video Manager->Edit Metadata->Cover Art you can select your custom art from the dialog box.
+
Image:Arclightbrowse.png|An example of Browse Mode
 
+
Image:Arclightgallery.png|An example of Gallery Mode
= Playing Videos =
+
Image:Arclightmanager.png|An example of File Manager Mode
To play videos go to the ''Myth Mainpage->Media Library->Watch Videos'' screen.
+
Image:Arclightitemdetail.png|An example of the item detail screen
 
+
Image:Arclightcast.png|An example of a cast list
The default view is the Folder View. This view can be changed via the on screen menu by pressing the menu button.
+
Image:Arclightedit.png|An example of the Edit Metadata screen
 +
Image:Arclightfileman.png|An example of the file manager
 +
</gallery>
  
Selecting a video will bring up its detailed information.  Selecting a second time will launch the video.
+
=Third Party (unsupported) scripts=
 +
[[Windows MediaBrowser metadata importer for MythTV]]
  
==Screenshots==
+
[[Mythadder.py]] - A removable media management script
  
<gallery>
+
== makeMKV-Autoripper ==
Image:VideoSelect.jpg|Watch Video: Video Information
+
Automatic ripping and import is available through [https://github.com/Goobaroo/makeMKV-Autoripper makeMKV-Autoripper]. It is python script that will automatically lookup disc information on IMDB and then rip titles to a directory named after the movie title. This fork has features specific to MythTV installations.
Image:VideoListview.jpg|Watch Videos: Tree View
 
Image:VideoBrowseview.jpg|Watch Videos: Browse View
 
Image:VideoBrowser.jpg|Watch Videos: Gallery View
 
Image:VideoView.jpg|Watch Videos: Menu
 
Image:VideoManagerMovieinfo.jpg|Video Manager: Video Configuration
 
Image:VideoManagerMovieart.jpg|Video Manager: Movie Art
 
Image:VideoManagerIMDB.jpg|Video Manager: Video Information
 
Image:VideoManagerBrowser.jpg|Video Manager: Browsing
 
Image:VideoManagerOSM.jpg|Video Manger: Menu
 
</gallery>
 
  
== Media Shares ==
+
Some nice features include:
[[Mediashares]] gives a simple walk through of how to export your media directory so its accessible from your other remote Mythtv systems.
+
* Rips both BluRay and DVD
 +
* Automatic lookup
 +
* Queueing of makeMKV files into Handbrake for re-encoding to save space.
 +
* Support for calling mythutil to rescan your video collection after the rip is complete.
 +
* Prowl notifications to iOS devices, allowing you to walk away and come back when everything is done. Notifications include:
 +
** Rip Start
 +
** Rip End and total time.
 +
** Errors in the process.
 +
* Automatic Eject when
  
[[Category:Plugins]]
+
Installation and usage instructions are in the Readme.

Latest revision as of 16:59, 16 June 2021

Important.png Note: MythVideo has been merged with core MythTV as of .25. It is no longer a separate plugin.


Synopsis

The video library allows for cataloguing and playback of a variety of video file formats. It can perform automatic metadata look ups on themoviedb.org or The TV DB as well as retrieve poster, fanart, banner, and screenshot artwork. You can also add your own Meta data to your own videos and add custom poster artwork to videos.

Configuration

Setting up Video and Image Folders

Storage Groups

Videos in Myth can now be stored on the backend and streamed to the frontend without a NFS or Samba mount. It is critical to note that the Storage Group implementation is not complete, and to take that into consideration when weighing whether to move to Video Storage Groups.

Advantages

  • Adding new frontends means zero configuration for videos, recordings, and metadata images.
  • Can dynamically add space to your video library without using RAID or LVM. Loss of one drive does not mean loss of the entire library.
  • Can spread video hosting across many/all backends.
  • No need to set up network mounts of any kind.

Disadvantages

  • External Video Players (mplayer, xine, VLC) will not work with videos hosted on an SG.
  • ISOs played back via storage group must be unencrypted.
  • (0.24 and previous) The UPnP server takes its configuration from the old local video definitions.

Setting Up Video/Image Storage Groups

  1. On the backend that will host the videos, stop the backend process and run mythtv-setup.
  2. In Storage Group configuration, set up directories for each of the following: Videos, Trailers, Fanart, Banners, Screenshots, and Coverart.
  3. Optional Step: If you would like to use a combination of Storage Group and locally hosted video, you can do the following. On the frontends, go to Utilities/Setup->Setup->Media Settings->Video Settings->General. Change "Directories that hold videos" to point at a directory that is not the same as the one the Storage Group points at. If the local video setting and the Storage Group setting point at the same path, unpredictable results may occur. While the system will attempt to prefer the Storage Group path and ignore the local one, there have been reports of complete loss of this functionality when both the frontend and backend settings are set to the same paths (MythTV Trac Ticket #8608).
  4. Enter the video library. Press the "M" (MENU) key and choose "Scan For Changes."

Local Video Storage

If you choose not to use Storage Groups then simply don't define any of the above mentioned Storage Groups and set up your directories for videos and artwork on each individual frontend. On remote frontends the directories will need to be mounted locally via NFS or Samba. As always, the mount points need to be identical on all frontends. Then go to Utilities/Setup->Setup->Media Settings->Video Settings->General and point to the appropriate directories for Videos, Trailers, Fanart, Banners, Screenshots, and Coverart.

Folder Images

You can place a file named folder.(png | gif | jpg) into a folder that is accessible to the backend and it will be used when the gallery view is displayed instead of a plain folder icon. As a fallback, you can place any image in the folder and it will be used. In absence of one of these images, Myth will descend into the directory and find the first valid poster on an item contained within and use it as the folder image.

The video library will also descend into folders looking for valid metadata to assign when a folder is highlighted. By default, it will descend one level in this search, but will descend up to twice if the intermediate directory contains folders starting with the (translated) word "Season" and the items inside those folders have titles which exactly match the grandparent folder's title. So a folder structure like "Stargate/Season 1/" with Items called "Stargate: SG-1" will fail to descend twice, but "Stargate: SG-1/Season 1" with items called "Stargate: SG-1" will produce imagery from the top level.

Scanning for Videos

When you add new videos to your storage directories, you can trigger a scan from any library view by choosing MENU->Scan For Changes. (Press the menu key on your keyboard/remote to bring up the menu).

In versions of MythTV prior to .22, it was necessary to enter the Video Manager screen to initiate a scan. This is no longer the case.

You can trigger an update from the command line by calling:

mythutil --scanvideos

Parental Controls

Configuration of Parental controls is found at Utilities/Setup->Setup->Media Settings->Video Settings->General.

The video library supports the ability to limit what videos maybe viewed without a password/pin. There are 4 different levels to choose from. You can select a default level and a password/pin for each level. Any videos/files at or below the current level will show up in the list. You can modify Parental Levels on-the-fly from within the Edit Metadata menu in the UI itself. Note that if you set the parental level to a high value, when someone enters the library, even if they fail the PIN prompt, they will get that parental level. Thus, it is best to set the parental level to the lowest level you want publicly accessible.

To change parental level within the UI, Press the numeric value of the level, from 1-4. If you have set a PIN for that value, you will be prompted it at that time.

The video library remembers that you entered the pin for 2 minutes, so once you've entered the pin for a given level, you can freely switch between that level and all lower levels without a pin until that two minutes is up, after which you'll need to enter a pin again to switch to a higher level.

Internal Player

The MythTV Internal player is the default (and recommended) player for Video and DVD. It will also play DVDs and DVD isos with full menu and subtitle support. It uses the same OSD, settings, remote bindings and audio configuration as playback of recordings making it much easier to setup and use than an external player. It supports almost all video formats and content including High Definition and in addition a wide range of easily accessible features including configurable aspect ratios, picture fill modes, timestretch, bookmarks, video editing, automatic locale based or manual selection of subtitle and audio streams and much, much more.

Rebuild seek table

Some files require a seektable in order to skip/seek properly. If the Internal player is behaving strangely, please try building a seektable before resorting to an external player. To create a seektable, run the following command on the file:

 mythcommflag --rebuild --video filename.ext

The symptoms are the internal player not displaying the correct time in the OSD, not seeking at all, partially corrupt playback, or restarting playback on any attempt to seek.

External Player Configuration

Configuration of Parental controls is found at Utilities/Setup->Setup->Media Settings->Video Settings->General.

Location: Utilities/Setup->Setup->Media Settings->Video Settings->Player Settings

This screen is largely self-explanatory. You can configure default players for Videos, DVDs, VCDs, as well as (optionally) an alternate video player. To use the Internal player as your default player, simply enter "Internal" (without quotes) as the string.

Trailer Playback

The video library can both associate a single trailer with a film as well as play a user-specified number of trailers before all films.

To configure a film's specific trailer, open the edit metadata screen and click on the trailer button. Select the trailer you want to associate with the film. Once you have done so, to play a film's trailer, highlight the item and choose INFO->Play...->Play Trailer.

To set up randomized trailer playback, navigate to Utilities/Setup->Setup->Media Settings->Video Settings->Metadata Settings

Within these settings, you can enable randomized trailer playback before a film. For a Theater-like experience, enable this option and select the number of trailers to see before the film. With this setting enabled, you will see the specified number of trailers when pressing the SELECT key on a movie, as well as having the option INFO->Play...->Play with Trailers.

Editing Video Metadata

To edit video metadata, highlight any item in your library. Then press INFO->Change Video Details->Edit Details.

For films that have no listings, home movies, or films whose metadata simply needs some "massaging," the video library provides an Edit Metadata screen. Which options are offered will vary slightly by theme, but editing basic metadata is possible in all themes.

The edit metadata screen is fairly simple. It provides a series of text edits, spinboxes, and button lists to modify the metadata for the selected item. You can also enter a specific player command for an item if necessary, a file to play afterwards, toggle whether an item is visible, and toggle the items watched status.

Change the metadata as you wish, and select "OK" or "Done" (varies by theme) to commit your changes. If you wish to cancel, press Escape of the Back key on your remote.

Metadata Lookup

The video library includes numerous grabber scripts for handling both Film and Television content. these scripts download plot, length, cast, and other textual information, as well as provide access to high quality poster, fanart, banner, and screenshot images. Note that not all scripts provide all image types. The default grabber scripts are Tmdb.py for movies and Ttvdb.py for television.

The video library parses as much information as it can from a file's filename. Under ideal conditions, MythTV will parse the Title, Subtitle, Season, and Episode (where applicable) of a file. New users will want to read about filename parsing to see the acceptable naming conventions for files. File naming traditionally associated with pirated material will prevent parsing from working properly, and will prevent metadata lookup from succeeding. Additionally, it is the position of the project developers that pirated material is unwelcome and unsupported. Please don't open bugs because MythTV doesn't parse stolen material properly.

The video scanner determines whether something is film or television material based on the season and episode values. If the scanner does not find an season or episode number while parsing a file, and the user does not set one, the movie grabber will be used. If the season or episode are greater than 0, the television grabber will be used.

When you are ready to perform a metadata lookup, multiple options are available. You can highlight an item and press the DOWNLOADDATA keybinding, which is "W" by default. This will automatically start a metadata query for the selected item. This same query can be started from the menu, by selecting INFO->Change Video Details->Retrieve Details.

Metadata Grabbing with Storage Group Files

Doing a metadata lookup on a Storage Group homed file will work. It will download the images to the Fanart/Banner/Screenshot/Cover Storage Groups on the backend that hosts the video in question, so they must be defined. If they are not defined, the images will be downloaded to the Video Storage Group instead.

Metadata Grabber Troubleshooting

If you find that the wrong grabber is being used, it is almost certain that one of the following occurred:

  • You are attempting to grab metadata for a legacy television item but have not removed and re-added it to the database to re-parse the filename. (eg: The subtitle/season/episode fields are all crammed into the title field) You can also fix this in "Edit Metadata" by setting the correct Title, Season, and Episode. Subtitle is not required for a successful grab.
  • Your file is not named using one of the path/filename combinations that the scanner recognizes. See the documentation for supported file naming schemes.

If the grabber *itself* fails, and you have checked the source to be certain that the item you are trying to search exists, then consider the following possibilities:

  • The title contains some punctuation (hyphens, commas, apostrophes, etc.) that is not present in your local record, or vice versa.

To correct local metadata information to improve a metadata grab, select the item, press "I" (INFO), Change Video Details->Edit Details. From here, you can correct the title/subtitle/season/episode to make it match the source and complete your metadata grab successfully.

If, after looking at the frontend logs, you see a crash in the grabber, or after having tested all of the above you are unable to complete a grab for an item in the TVDB/TMDB library, bring your concerns to #mythtv-users on Libera Chat - irc://irc.libera.chat/#mythtv-users before opening a bug in GitHub Issues. If nobody is able to help you on IRC, then please open a bug in Issues.

Mass Metadata Grabbing

As of .24, the video library can (and will, by default) automatically attempt to grab all metadata for items as they are inserted into the library. The default name-matching algorithm is set to a low tolerance to prevent false positives as much as possible, so some items may need a manual query if there are multiple items of the same name or multiple very closely named items.

Custom Movie Artwork

You can select artwork in the Edit Metadata screen. Click on the button to browse the configured directory for fanart, banner, screenshots, etc. You can use custom artwork for an item by placing it in one of these directories and selecting it from the file browser.

Episode Images/Screenshots

Depending on your theme, Coverart may be the default imagery in MythTV button lists. For Television material, the UI will display screenshots instead - but only if your episodes are stored in a certain way: The directory containing the video files must have the exact name as the series title in metadata - or it must begin with the word "Season" (or the localized translation of the word Season). Display of screenshots is contingent upon having a screenshot downloaded and assigned to the video item. Alternately, it is possible to modify a theme to always display screenshot, or always display coverart, regardless of this fallback behavior.

Using the Video Library

To view or play your videos, navigate to Media Library->Watch Videos.

If you don't see any videos, you probably need to scan. If you still see no videos, you probably haven't properly set up your folders or storage groups. If, after checking both, some or all videos are still missing, you may need to define an extension in the "file types" dialog-- by default, most common filetypes are supported.

Playing an item in the video library is as simple as highlighting it and pressing Enter or the SELECT key on your remote. In some views, you will see an intermediate Item Detail screen before playback. If you see this screen, select "Play" to start your film.

Viewing Item Metadata

To view specific item metadata, highlight an item and press INFO->Video Info. You will see a small selection of information views to view the plot, cast, or item detail screen for the selected item

Video Library Views

The video library features four different "views" on your collection:

  • Browse View
  • Tree View
  • Gallery View
  • Manage View

Each view will vary by theme, so try out different themes to see which interface you like best. You can toggle between the views from within MythTV's video library by choosing MENU->Change View->Name of view.

Metadata Browse Modes

You can browse the library by metadata rather than folder structure. First, enable metadata browse modes by going to Utilities->Setup->Media Settings->Video Settings->General. On Page 2, enable the checkbox called "Enable Metadata Browse Modes." You can select the default view ("Folder" is the classic view by file structure), or toggle them on the fly.

To change Metadata Browse Modes, Press the "M" (MENU) and select "Browse By...". You can then select which metadata browse mode to switch to.

Currently available Metadata Browse Modes include:

  • Folder (Default)
  • Cast
  • Genre
  • Category
  • Director
  • Studio
  • Year
  • User Rating
  • TV/Movies

Incremental Search

In large libraries, it can quickly become unwieldy to browse from the top of the list to the bottom. You can now invoke the Incremental Search (Ctrl+S by default) to bring up a list of everything in the current view. You can then enter the first letter/few characters of the item you are looking for, select it from the list, and jump straight to the item.

Screenshots

Third Party (unsupported) scripts

Windows MediaBrowser metadata importer for MythTV

Mythadder.py - A removable media management script

makeMKV-Autoripper

Automatic ripping and import is available through makeMKV-Autoripper. It is python script that will automatically lookup disc information on IMDB and then rip titles to a directory named after the movie title. This fork has features specific to MythTV installations.

Some nice features include:

  • Rips both BluRay and DVD
  • Automatic lookup
  • Queueing of makeMKV files into Handbrake for re-encoding to save space.
  • Support for calling mythutil to rescan your video collection after the rip is complete.
  • Prowl notifications to iOS devices, allowing you to walk away and come back when everything is done. Notifications include:
    • Rip Start
    • Rip End and total time.
    • Errors in the process.
  • Automatic Eject when

Installation and usage instructions are in the Readme.