Difference between revisions of "MythTV Setup Series- Use Alternate Player"
Line 28: | Line 28: | ||
#!/bin/bash | #!/bin/bash | ||
− | + | strPlayer=${1/"myth://Videos@192.168.1.2:6543"/"/mnt/video"} | |
− | strPlayer= | + | |
− | + | ||
vlc -f "$strPlayer" vlc://quit | vlc -f "$strPlayer" vlc://quit | ||
exit 0 | exit 0 |
Revision as of 23:52, 13 February 2015
The MythTV internal player uses FFmpeg, which isn't a player, but it is the internals used by many popular players, such as mplayer. Many FFmpeg developers are also part of the MPlayer project. FFmpeg is used by VLC media player, MPlayer, xine, HandBrake, and others. With that being said, the MythTV implementation seems to have limitations. It's not the best at playing some types of media that might be in your media library outside of the recordings made by MythTV. It doesn't digest highly compressed H.264 video very well. It seems to have problems tracking and refreshing properly on them, much like can be observed with SMPlayer. In fact, I have found videos that play best in VLC and others that play best in SMPlayer. Although VLC, like the MythTV player, uses FFmpeg, VLC has a wide variety of internal codecs and can play certain videos much better.
Users want the option to use an alternate player other than the internal player for playing videos in their media library.
MythTV has an option in the settings to configure an alternate player to use IN ADDITION to the internal player! Our goal here is to configure VLC as the alternate player.
Using VideoLAN Player for playback in MythTV (otherwise known as VLC Player) for all video files or certain video files.
The location in the Front End is:
- Setup, Media Settings, Video Settings, Player Settings
However, due to the way MythTV uses STORAGE GROUPS for your video files (those not recorded using MythTV), VLC will not find the video at the path passed to it by MythTV. If you have MythTV configured to access a path containing video files (such as a LAN path or NFS path, or even local) the MythTV Frontend sees this in a Storage Group. SG = Storage Group. MythTV will not allow Storage Group content to be played with an external player such as VLC.
For example, /var/lib/mythtv/videos is seen by MythTV and sent to the external player as myth://Videos@localhost, which is a storage group path.
There are two working hacks we will cover here:
HACK #1: Local Video Storage Hack:
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 front-end. On remote front-ends the directories will need to be mounted locally via NFS or Samba. As always, the mount points need to be identical on all front-ends. Then go to Utilities/Setup->Setup->Media Settings->Video Settings->General and point to the appropriate directories for Videos, Trailers, Fan art, Banners, Screenshots, and Cover art.
HACK #2: Parsing the Parameter with a Shell Script
This is by far the best hack of the two, because you can continue to use storage groups, and you need not set up the static paths on each individual front-end. Rather than setting the alternate player to vlc in (Setup, Media Settings, Video Settings, Player Settings) set it to the name of an intermediary shell script. I called my shell script by the name 'altplayer.'
The code in my altplayer shell script is as follows:
#!/bin/bash strPlayer=${1/"myth://Videos@192.168.1.2:6543"/"/mnt/video"} vlc -f "$strPlayer" vlc://quit exit 0
The script will need to be modified for your particular network and cifs path.
The subject is covered in the Official MythTV Wiki (MythTV VLC).