KnoppMyth downloads | documentation | HowTo | reporting bugs | links | Recent Changes  
search for in the  

What is a Wiki?

See WikiWikiWeb

If you don't know how to use a wiki see the WikiHowto

ErfurtWiki is maintained by a loosely knit group of developers.

Quick Links

Related sites

Contact

Please submit website bugs in the BugReports

Contribute!

Please file any wishes on UserSuggestions.

Hosted By

Using xine for DVD playback (including post-processing)

The KnoppMyth default DVD player for R5A16 and R5A22 is Xine, which supports playing back DVD menus.

Older versions of Knoppmyth

Older versions use Mplayer. Here are some hints on getting xine working with your KnoppMyth install.

Installing xine

Ideallly, installing xine is as simple as:

su
apt-get update
apt-get install xine-ui

However, you may end up hitting various errors and conflicts with libraries installed with KnoppMyth. If you do hit these problems, and the problems refer to "libxv1_4.3.0.dfsg.1-1_i386.deb", then AT YOUR OWN RISK (to quote cesman), use the following command (all on one line):

dpkg -i --force-overwrite /var/cache/apt/archives/libxv1_4.3.0.dfsg.1-1_i386.deb

Note: Recently, the "libxv1" file was replaced with a newer version. If you're installing from these files, you will need to modify the command accordingly. (still AT YOUR OWN RISK)

dpkg -i --force-overwrite /var/cache/apt/archives/<libxv1PackageNameHere>

Also see:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=337&start=30
http://mysettopbox.tv/phpBB2/viewtopic.php?t=1487

xine has recently reached version 1.0. Rather than apt-get, you can always download and compile from source, which also gets around the package conflicts mentioned above. You can read the simple instructions and download source at http://xine.sourceforge.net/ or http://xinehq.de/

xine also uses XvMC to provide hardware acceleration of DVD playback for nVidia video cards. XvMC should be available if you've installed the nVidia drivers via the install-nvidia.sh scripts. This is independent of whether or not you chose to install the version of MythTV that supports XvMC.

To optimize xine playback, you can use a command line utility that comes with xine called xine-check... it will give you reports on your system and whether everything on your system checks out, or whether it detects potential problems with your setup or with xine's configuration.

Changing MythTV config to launch xine instead of mplayer

Once xine is installed, you also need to configure MythTV front end to launch xine instead of mplayer. Go to Setup->DVD->Playback in MythTV's front end menus and enter the following line:

xine -pfhq --no-splash --auto-scan dvd

I believe the above is what is set up when knoppmyth is installed (and personally think that this is a bit of an oversight unless this somehow does work on other systems, it most certainly didn't on mine). Note that using just dvd caused days of problems for me, and I finally ended up realizing that it needed to be dvd://.

If that doesn't work try this:

xine -pfhq dvd://

Note that the two forms are mutually exclusive, you can't use autoscan with the URL style specifier. For either form to work you must have /dev/dvd linked to the proper block device and the mythtv user must have the correct access permissions. The following script should set this up correctly in more recent versions (R5A16) of KnoppMyth:

/usr/local/bin/cd_link.sh

If your DVD playback is not smooth at this point, you may not have DMA enabled for your DVD-ROM drive. See the HardDrives page for details on checking DMA enabling and setting it up.

You will also find that commercial DVDs will not play back at all. This is due to the lack of CSS decryption in the xine basic install, which in turn is due to a USA law (the infamous DMCA) that prohibits software that "circumvents" copy protection systems like CSS. If you read the xine documentation closely ( at http://xinehq.de/index.php/about ), you should get information on libraries you can install to allow playback of encrypted DVDs.

Some DVDs may not play back even after installing the appropriate libraries. This may be due to your DVD-ROM drive not having its region code set. For a discussion of what region code is, and to download a small application to set your drive's region code, see the following page:

http://linvdr.org/projects/regionset/

Also check

http://rpc1.org

for replacement drive firmware for a more permanent solution.

If, after installing xine and using it to play back DVDs, you only get a black screen when trying to view LiveTV or a MythTV recording, you need to adjust an expert xine setting called XV_AUTOPAINT_COLORKEY. To do so, launch xine, bring up its menus, and under Settings->Setup->GUI select "Expert" and then the "Apply" button. Then go to the Video tab in Setup and scroll down. Check the box next to XV_AUTOPAINT_COLORKEY and press Apply again.

This fix is from the following thread:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=1597

Setting color properly

xine provides its own color controls for DVD playback. To get the best color settings possible, it's recommended to get a home theater tune-up disc for adjusting your TV first, then adjust xine similarly if required. The three main discs out there are the Avia Guide to Home Theater, Digital Video Essentials, and Sound & Vision Home Theater Tune-Up (best for home theater newbies). You can also get by with the THX Optimizer screens present on all THX-certified DVDs. You can get a list of those discs at:

http://www.thx.com/mod/products/dvdFind.html

You can get a set of blue filter glasses needed for these tests for only $2 (with proof of purchase of a THX-certified DVD) at:

https://secure.brandlocker.com/promos/thxpromo.cfm

Connect a DVD player to the composite or S-video input you'll use for your KnoppMyth box, then adjust brightness, contrast, hue, and saturation according to the tune-up DVD's instructions. Then connect your KnoppMyth box, use xine to play the tune-up DVD, and double-check that settings are still appropriate. If not, use xine's color controls to make appropriate adjustments.

Confirming proper playback of anamorphic DVDs to widescreen TVs

The default xine settings will be fine for people who have their KnoppMyth boxes connected to their TVs via video-out. However, if you are connected via a transcoder or DVI to a high-definition TV, you will find that anamorphic test patterns (found on the tune-up DVDs mentioned above) are distorted unless you adjust your X settings appropriately.

You need to modify your /etc/X11/XF86Config-4 file (use your text editor of choice to do so, and su to root before making changes). You need to add a "DisplaySize" line to your Monitor section (if not already there) in order to tell xine the aspect ratio of your connected TV. The two numbers need to either be in a 4:3 ratio for a "regular" TV, or in a 16:9 ratio for a widescreen TV. Annoyingly, adding these numbers also affects the font size of MythTV's main menus. If the numbers are too large, the font size will be microscopic; too small and the fonts will be huge. Although the numbers are supposed to be the actual screen size measured in millimeters, you're probably best off using made-up numbers in the right ratio. For my 42" widescreen HDTV, I ended up using

DisplaySize 240 135

which is a 16:9 ratio but is significantly smaller than the TV's actual size.

This is covered in the xine FAQ, embarassingly enough:

http://xinehq.de/index.php/faq#ASPECTRATIO

With these numbers properly set, both 4:3 and 16:9 test patterns should display as circles rather than ovals.

Playing PAL DVD's

PAL DVD's play just like NTSC with no special setup or hardware using xine and RC57.

Setting lirc options for Hauppauge remote

Now that you've got xine up and running and you can view DVD menus, it would be nice to control the menus with your Hauppauge remote that came with your PVR-x50. To do so, you will need to edit the /home/mythtv/.lircrc file found in the MythTV user directory. Edit the file with your favorite text editor (do so as MythTV user, not as root). Go to the end of the file and add the xine-specific codes found in the following thread:

http://mysettopbox.tv/phpBB2/viewtopic.php?t=337

These settings did not seem to include the ability to chapter-skip forward and back with the ">|" and "|<" buttons on the remote (the ones normally used for skipping commercials during recording playback). I added the following keys to the lircrc settings to do so:

begin
prog = xine
button = SKIP
repeat = 1
config = EventNext
end

begin
prog = xine
button = REPLAY
repeat = 1
config = EventPrior
end

If you choose to add both the above code and the code from the linked thread be aware that this will cause a duplicate entry for the 'skip' button. To fix this, do not include the part of the entry from the linked thread that is labeled "#display" in your modified .lircrc file. You may also note that this will leave you with the ability to zoom-in, but not zoom-out. If you wish to have this feature, you should find an alternate button for the zoom-out function. Otherwise, remove the zoom-in code as well which is under the label "#sleep".

You can have xine generate a sample .lircrc template by typing xine --keymap=lirc in an xterm window.

AC3 playthrough when connected to a Dolby Digital/DTS receiver

If you have your MythTV box connected to an AV receiver capable of Dolby Digital or DTS decoding (see DigitalAudioHowTo for details), you can have xine send the DD or DTS soundtrack on your DVD directly to your receiver for hardware decoding. Bring up xine's menus and select Settings, then click the Audio tab. Pick "Pass Through" for the Speaker Arrangement setting.

Enabling post-processing filters like tvtime, denoise3d and unsharp masking, (especially useful for HD playback of DVDs)

Although there is an option for deinterlacing in xine's main menus, the real deinterlacing power comes by using post-processing. In the Post Processing "chain reaction" window, you can use multiple filters like TVTime's deinterlacing and pulldown correction (which are in turn based on the widely-respected Dscaler filters available for Windows-based HTPCs), turn on denoise filters, and also turn on unsharp masking for making the image sharper, especially when using your computer to upsample DVDs to 540p, 720p or 1080i. For a visual example of what these types of filters can do in the Windows world, read the following article:

http://www.htpcnews.com/index.php?option=com_content&task=view&id=132&Itemid=48

Please note that these filters use LOTS of processing power, so don't expect to run post-processing chain reactions on anything less than a 2GHz P4 or AthlonXP. My AthlonXP 2400+ shows xine using 75% of CPU time when running these filters at 540p.

The steps I use to enable similar postprocessing under xine are:

  • Turn deinterlacing off in xine's menus
  • Turn on "post-processing"
  • Pick "Chain Reaction" from the post-processing menu
  • Pick "tvtime" instead of "none" for the first filter, and confirm all settings are turned on (including chroma filter). Also, pick "greedy2frame" for deinterlacing mode
  • Add denoise3d filter
  • Add unsharp masking filter, pick (NOTE: find exact settings and describe them here)
  • Click Apply, then OK, in the Chain Reaction dialog
  • For some reason, the default xine deinterlacing gets turned back ON at this point, making frame rates drop horribly as xine tries to deinterlace twice.
  • Turn deinterlacing "off" again
  • Again, for some reason,the on-screen display says "Deinterlacing: ON" and the interlacing checkbox is again checked
  • Turn deinterlacing "off" again
  • The movie's framerate improves markedly, and all effects are on (confirmed by turning on and off the "post-processing" checkbox)

Note: on the xine-users mailing list, it was noted that the requirement above to turn deinterlacing off twice was a bug that has been fixed for the next release version.

Here are two examples of "before" and "after" post-processing as described above. The effects are subtle but definitely there. Look at the detail in the wall and in Trinity's outfit in the screenshots from The Matrix, and look at the hat detail and Blondie's eyes in the screenshots from The Good, The Bad, and The Ugly. I haven't played much with the various settings in denoise3d or unsharp masking--I was conservative with unsharp masking in particular, as too much sharpening is just as bad as not enough.

PostProcExample1_Matrix
PostProcExample2_GBU

The screenshots are 80K each and use JPEG (wanted to use PNG but they were 300K or so!). I also was unable to grab the exact same frames of the movie but they should serve as an example of what can be accomplished.

The post-processing chain reaction setup doesn't seem to be preserved when you quit and restart xine. You can add a "--post" option to the command line: this can load and set all the appropriate filters when xine is started.

Another way for post processing:

I couldn't get xine to remember any of my post processing settings, even while editing the config files. Here is another way this can be accomplished if you run into the same thing: (Taken from my post on KnoppMyth message forum)

From my understanding when "De-Interlace" is checked it runs the defaults setup in this config file. If you uncomment something in that file, but it is the default then it just comments it out again. If you add something to it or change something that is non-default it will remain

I did not like this so I just use a shell script that I created, made it executable and put it in /usr/bin. I called it xine-post. In the mythfrontend setup/DVD playback I just put in the name of this new file, xine-post. This file has all of the options in it.

To create this file, as root change to the /usr/bin directory.

vi xine-post (enter) (or use the text editor of your choice if not vi)

Press the Insert key (i) if using vi and type (all on one continuous line, the lines are broken here due to formatting):

xine -pfhq --post tvtime:method=Greedy2Frame,enable=1,
chroma_filter=1 --post unsharp --post denoise3d
--auto-scan dvd

Note: Here is an alternative line which: (1) does the denoise prior to unsharp masking; (2) sets a required default value for the unsharp filter (otherwise sharpening does not occur); and (3) turns on more tvtime options, but turns off the chroma_filter option, which is reportedly CPU-intensive:

xine -pfhq --post tvtime:method=Greedy2Frame,enable=1,
pulldown=vektor,framerate_mode=full,judder_correction=1,
use_progressive_frame_flag=1 --post denoise3d
--post unsharp:luma_amount=0.5 --auto-scan dvd

Press Escape to finish editing if in vi. Now type a colon, then wq (enter). (This means (w)rite and (q)uit.)

Type chmod a+x xine-post and press Enter to change your script to executable.

Run mythfrontend and set the DVD playback settings to use this xine-post script instead of xine -pfhq --autoscan dvd

Because of the bug that xine has (in my version) where de-interlace is set to On when it starts, I made a change to my .lircrc file like this (so I can turn deinterlace off from my Hauppauge remote):

begin
prog = xine
button = Green
config = ToggleInterleave? (this is the line I changed)
end

Also I moved around the volume buttons to match mythtv and commented out the Red button: (Yellow = down and Blue = Up) This isn't really needed since I run it through my amp, but I wanted it to match anyway.

begin
prog = xine
button = Blue
config = Volume+
end



UpdatedPages

· TroubleShooting last changed on Wed Sep 8 10:58:29 2010
· R5A12DvdRipping last changed on Wed Sep 8 10:56:26 2010
· PickingComponents last changed on Wed Sep 8 10:54:11 2010
· KnoppMythInstall last changed on Wed Sep 8 10:52:15 2010
· Additional Software last changed on Wed Sep 8 10:49:11 2010
· Links last changed on Wed Sep 8 10:45:45 2010
· HowTo last changed on Wed Sep 8 10:43:16 2010
· MythwebFlash last changed on Tue Sep 7 08:01:14 2010
· HauppaugeThreeFiftyInstallation last changed on Tue Sep 7 07:59:50 2010
· MythStreamTV last changed on Tue Sep 7 07:58:13 2010
· UsingSambaHowto last changed on Tue Sep 7 07:57:01 2010
· TVOverScanHowto last changed on Tue Sep 7 07:53:19 2010
· TinnyAudioPVR150 last changed on Mon Sep 6 14:42:38 2010
· KnoppmythDownloads last changed on Sun Sep 5 22:27:51 2010
· LinuxTips last changed on Fri Sep 3 12:44:17 2010
· RepairingMythConvergDB last changed on Wed Sep 1 01:56:32 2010
· KnoppMythWiki last changed on Sun Aug 29 14:22:57 2010
· HVR950HowTo last changed on Mon Aug 23 11:00:20 2010
· MythVodkaHowTo last changed on Mon Aug 23 00:48:53 2010
· x11vncHowTo last changed on Tue Aug 17 08:20:17 2010
· MediaMVP_LinuxHOWTO last changed on Tue Aug 17 08:17:10 2010
· webminhowto last changed on Tue Aug 17 08:11:10 2010
· MythTVBurn_Scripts_HowTo last changed on Mon Aug 16 15:44:19 2010
· EditThisPage last changed on Wed Aug 4 04:10:39 2010
· R5.5/R6.x Differences Table and Equivalent Commands last changed on Wed Aug 4 00:27:20 2010
· Media_Center_Edition_Remote_Control last changed on Tue Aug 3 08:19:13 2010
sitemap |