Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Building a gentoo HTPC (incl. Blu-Ray) [work-in-progress]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 377
Location: Europe/Austria

PostPosted: Thu Oct 30, 2008 4:29 pm    Post subject: Building a gentoo HTPC (incl. Blu-Ray) [work-in-progress] Reply with quote

Hopefully this is the right place to put this thread.
I started to build a gentoo HTPC and want to share my experiences. No doubt, there will be some questions on the way as I make my progress. So I decided to put this in the assistance section of the forums.

I'll start with my hardware:
Mainboard: GA-MA78GPM-DS2H (AM2+, 780G chipset and 128MB sideport memory mATX)
CPU: AMD Athlon X2 4000+ (energy efficient)
RAM: 2GB DDR2 1066 SLI (OTC with coolers)
Graphics: Onboard Radeon HD3200+ (HDMI, supports UVD - unified video decoding)
Audio: Onboard 7.1 Audio (not used since I'm using the HDMI Audio out)
BluRay: LG GGW-H20L (reads HD and BluRays and burns BluRays, also supports AACS-firmware patch from doom9 forums [see also my BluRay thread])
HDD: Western Digital Green 1TB
Screen: LG 42LY99 FullHD LCD TV
RemoteControl: Linux4Media Control with IR reciever connected to one internal USB connector.
(Sorry for the german links here - I'll search for the english ones and replace them later)

My first question:
There are 2 TV card options so far (but feel free to suggest others if they work for you):
Hauppauge WinTV HVR 1300 (PCI) or 1700 (PCI-e)
They are both hybrid analog and DVB-T cards with hardware encoder for analog (afaik not yet supported for any of those cards).
After looking at the support level for Linux on linuxtv.org I'm not sure for which one to go. Drivers for both are in the works, it seems.

Any suggestions?

So far I installed gentoo and the necessary drivers for the already existing hardware.
For the onboard graphics I chose the proprietary fglrx drivers since they support HDMI audio and Xv. (I tried the open ati and radeonhd drivers fist but ati gave me a green/violet picture and radeonhd was too slow for fullHD video.)

I´m using amd64 and gentoo-sources-2.6.26.
Also installed is the newest Xorg version (server 1.5.2) with evdev (and the needed hal policies). Even the remote is recognised out of the box (as keyboard and mouse). :-)

For the video system I´m going with freevo because its very customizable and light. Also it works with mplayer which I prefer because of the support of bluray formats.
Mplayer and ffmpeg are coming from the berkano overlay.

I already played around with different mplayer options to find the best options for quality and performance. So far I´m not yet completely content with my results.
Suggestions are welcome. ;-)


Last edited by Tariella on Thu Oct 30, 2008 10:13 pm; edited 2 times in total
Back to top
View user's profile Send private message
rokstar83
Guru
Guru


Joined: 09 Apr 2005
Posts: 422
Location: MD

PostPosted: Thu Oct 30, 2008 9:36 pm    Post subject: Reply with quote

For analog cable tv tuners its Hauppauge PVR 150 or nothing in my book. They work flawlessly. I've never played with (and don't have) digital cable.

For Graphics, a cheapo geforce 7000 series nvidia card can handle HD TVout via HDMI cable. The proprietary drivers work quite well.

For playing, I personally love mythtv. Its got a lot of overhead (mysql and whatnot) and it does require quite a bit of work getting up and running but it does everything I need and looks nice.

Good luck with the Blu-ray stuff, you got a link to that other thread you mentioned?
Back to top
View user's profile Send private message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 377
Location: Europe/Austria

PostPosted: Thu Oct 30, 2008 10:12 pm    Post subject: Reply with quote

Thanks for the info, I'll research your suggestions.
Edit:
The PVR card sounds good, but unfortunately I dont have enough space/slots in my htpc to use an extra card for analog and DVB-T input. (There would be a lot of possible combinations)

The HVR 1300 seems to be working with analog and DVB-T since 2007 (see this thread). Is there anyone who has it working?

The other BluRay thread I mentioned is here. I reedited the BluRay part and will add the recoding part to the first post as well.

I have slight issues with tiny pauses in fullHD videos (recoded blurays, .mkv files) every few seconds. Of course, I know that there is no GPU based decoding in the video drivers yet, but I believe the recoded files should work fine. I'm expecting performance issues with blurays later though.
My mplayer options are the following: - autosync 30 -fs -fps 24/1001 -cache 8000 -framedrop
Mplayer niceness is set to -20.
I tried with different settings for fps, framedrop, autosync and niceness.
Video output is Xv from fglrx drivers.

As soon as playback of recoded files is fine, I'll go on to BluRay playing.

Hopefully the GPU based decoding/rendering support will be out soon. It's in the works and I'm keeping an eye on the phoronix.com forums, where the new (open and proprietary) drivers are announced. I'll take whatever works first. ;)

Update:
Since the BD+ decrypting is making fine progress, someone in the doom9 forums posted about running bluray with mplayer. I'll try this as soon as possible.

Update2:
There is now a new version of dumphd supporting BD+. Its not very user friendly yet. You have to use the BDVM debugger first and then you can input the conversion table into dumpHD (CLI-mode).
I'll try this as soon as possible on my htpc. :D

Update3:
Yesterday I bought a TP-Link WN651G pci wireless card with atheros chipset. It installed flawlessly and works great with in-kernel atheros (ath5k) drivers. I hereby recommend this card. :)

Update4:
Playing bluray discs directly (piping the output of dumpHD to mplayer) works great. My only non-BD+ bluray disc played almost perfectly. The HD-DVDs have slight stuttering mith -framedrop but without it the audio and video go out of sync. Next step will be to transcode the HD discs to -mkv and testing the newest BD+ libbluray solution.
For direct automated playing of blurays, I'm working on a script connecting dumphd, a buffer file and mplayer for playback.
Back to top
View user's profile Send private message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 377
Location: Europe/Austria

PostPosted: Tue Dec 02, 2008 11:52 am    Post subject: Reply with quote

Its time for a new post. I made some great progress (well from my point of view).
HDMI-Audio out as standard output is working.

Until yesterday HDMI audio was working for me only in mplayer when I defined
Code:
-ao alsa:device=hw=1,3


Since I also wanted sound in ffplay (to test performance differences to singlecore mplayer when using multicore ffmpeg only), I researched bout how to set the HDMI device as the standard output.

I found a hint on the XBMC forums on how to define the appropriate .asoundrc:
Code:
pcm.!spdif {
     type hw
     card 1
     device 3
}

pcm.!default {
     type plug
     slave {
           pcm "spdif"
     }
}


I still didn't decide on a tv card, so tips are welcome.

Edit:
I tested XBMC and the coolness factor is amazing. So I'm now thinking of using XBMC instead of freevo.
But there are some issues to solve:
- the screen always switches to 16:9 format which is not using my native resolution of 1920x1080 (full HD). I experience a slight overscan. Xorg itself can use my monitors "just scan" function but as soon as I return to the desktop after running XBMC my TV is set to 16:9 and the borders of the screen are missing.
- it has no TV recording function (it can use mythserver but I'm not really happy with using myth with XBMC - if I wanted to use myth, I'd use myth only)
- my HD-media contents (m2ts and evo files) can be displayed but there is no sound. Seems that eac3 and trueHD audio-formats are not supported yet. (ripped movies that are transcoded to mkv are no problem)

Minor issues are to include scripts and the configuration of the remote-control. I think that might be solvable.
Back to top
View user's profile Send private message
gsmd
n00b
n00b


Joined: 20 Jul 2008
Posts: 28

PostPosted: Sun Jan 04, 2009 9:23 am    Post subject: Reply with quote

Could you plz tell:
1) kernel, alsa, fgrx versions
2) alsa config flags
3) sound-related kernel flags
4) what's (un)muted in alsamixer?

Can't get the damned sound-over-hdmi thing work on the very same mobo.
TIA.
Back to top
View user's profile Send private message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 377
Location: Europe/Austria

PostPosted: Sun Jan 04, 2009 12:06 pm    Post subject: Reply with quote

The sound over HDMI was giving me some troubles at fist also. I was googling for hours to find a working solution.

Here is my config:
1)
kernel: linux-2.6.27-gentoo-r4
alsa: in-kernel
fglrx: ati-drivers-8.561

2)
aplay -l gives me:
Code:

**** List of PLAYBACK Hardware Devices ****
card 0: SB [HDA ATI SB], device 0: HDA Generic [HDA Generic]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: HDMI [HDA ATI HDMI], device 3: ATI HDMI [ATI HDMI]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
So my HDMI is card1, device 3 (you might have to adjust this numbers in the .asoundrc).

I had to write a .asoundrc to route the default output through the HDMI device:
My .asoundrc:
Code:
pcm.!spdif {
     type hw
     card 1
     device 3
}

pcm.!default {
     type plug
     slave {
           pcm "spdif"
     }
}


3)
kernel config:
Code:
<*> Sound card support  --->
<M>   Advanced Linux Sound Architecture  --->
<M>   Sequencer support
<M>   OSS Mixer API
<M>   OSS PCM (digital audio) API
   [*]     OSS PCM (digital audio) API - Include plugin system
<M>   Intel HD Audio
   [*]     Build ATI HDMI HD-audio codec support
   [*]     Enable generic HD-audio codec parser


4)
alsamixer -c1 (card number 1) gives me just one entry that can only be muted or unmuted.
I have this unmuted.

Hope this helps. Good luck.
Back to top
View user's profile Send private message
gsmd
n00b
n00b


Joined: 20 Jul 2008
Posts: 28

PostPosted: Sun Jan 04, 2009 3:28 pm    Post subject: Reply with quote

It did help. Thanks! :D
Back to top
View user's profile Send private message
gallen
n00b
n00b


Joined: 07 Apr 2009
Posts: 1

PostPosted: Tue Apr 07, 2009 2:18 am    Post subject: Reply with quote

The HDMI audio problem described here is EXACTLY the issue I'm having with Linux Mint 6 at the moment. I'm a total linux noob and have spent far too many hours troubleshooting this...getting close to breaking down and buying the dreaded vista.

How do I go about writing/modifying a .asooundrc? And the kernel config? At the moment with alsamixer -c1, I don't have any volume controls just a check box for IEC958. Any help or suggestions are greatly appreciated!
Back to top
View user's profile Send private message
g-user
n00b
n00b


Joined: 06 Apr 2009
Posts: 42
Location: United States of Russia

PostPosted: Tue Apr 07, 2009 10:12 am    Post subject: Reply with quote

Quote:
Seems that eac3 and trueHD audio-formats are not supported yet

Check this big tread.
https://forums.gentoo.org/viewtopic-t-691564-start-0-postdays-0-postorder-asc-highlight-eac3.html
Back to top
View user's profile Send private message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 377
Location: Europe/Austria

PostPosted: Thu Apr 09, 2009 1:01 pm    Post subject: Reply with quote

Sorry for the late answer but I was out of town for a while.

Quote:
How do I go about writing/modifying a .asooundrc? And the kernel config? At the moment with alsamixer -c1, I don't have any volume controls just a check box for IEC958. Any help or suggestions are greatly appreciated!


The .asoundrc file is a simple text-file with the name ".asoundrc" (including the dot) in your home directory. If it already exists it might be invisible since config files starting with a dot are generally not shown in standard file manager mode. Depending on the filemanager you are using you must activate to show hidden files somewhere in the settings.

I don't know your distribution, but I'm sure there is an option for compiling your own kernel somewhere. When you are configuring the options be sure the abovementionet settings are set.

The checkbox with alsamixer -c1 is the only setting you need. I don't have more either. You can only mute and unmute this HDMI output device. Be sure it is unmuted (by pressing 'm').

Hope this helps.
Back to top
View user's profile Send private message
alatar
n00b
n00b


Joined: 12 Feb 2009
Posts: 61

PostPosted: Sat Jun 27, 2009 2:22 am    Post subject: Reply with quote

This topic could become a good How-to :)

Could you please post some details about general gentoo installation, like USE flags, HTPC frontend (mythTV, XBMC, else) - the latest decision and so? Especially me would be very pleased for such info.
Back to top
View user's profile Send private message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 377
Location: Europe/Austria

PostPosted: Mon Jun 29, 2009 1:45 pm    Post subject: Reply with quote

It was my plan to develop this thread into a how-to like I did with my bluray thread. The project is not yet finished but I'll post details and status as it proceeds.

I decided to wait with the tv-tuner card until everything else is finished and working.
The frontend software is xbmc (which simply looks very sexy). There is an unified pvr frontend in development for xbmc and they support mythtv and vdr backends (the installation seems to be a little tricky though - another reason to wait with the tuner-hardware-decision).

To use my remote for powering my HTPC on (and off) I bought a chip from this page. It is pre-programmed and can also be bought in an already assembled state.
Mine was bought as a single chip and is now already assembled. I'll install it soon.

The keymapping will be edited by using gizmod. Ebuilds are in bugzilla and the sunrise overlay. There also exists a wiki.
Using gizmod I'll edit the way my remote control's button work for xbmc application specifically. I want to translate mouse movements to arrow keys for menu navigation.

The things that are on my todo-list are:
Customizing xbmc setup (choosing and setting up a skin, organizing and scraping media into xbmc database)
Installing the power-on-by-remote-chip.
Configure the already installed gizmod for xbmc specific functions.
Tuning the bootup process and adding a bootsplash.
Automatic startup of xbmc on boot.
Power management and suspend features.

Atm I'm organizing and scraping my media-data into the xbmc database. This takes some time. I also tried "external" media-scraping software to organize my media. This is very time consuming.

Details on my gentoo setup so far (kernel, USE-flags, xorg, drivers, automounting, and so on) will follow.
Back to top
View user's profile Send private message
DaggyStyle
Watchman
Watchman


Joined: 22 Mar 2006
Posts: 5192

PostPosted: Mon Jun 29, 2009 5:41 pm    Post subject: Reply with quote

rokstar83 wrote:

For Graphics, a cheapo geforce 7000 series nvidia card can handle HD TVout via HDMI cable. The proprietary drivers work quite well.


why? his setup will run 1080p with a sampron cpu, that chipset is great for hd playing...
check this review: http://www.tomshardware.com/reviews/amd-780g-chipset,1785-3.html
_________________
Only two things are infinite, the universe and human stupidity and I'm not sure about the former - Albert Einstein
ProjectFootball
Back to top
View user's profile Send private message
alatar
n00b
n00b


Joined: 12 Feb 2009
Posts: 61

PostPosted: Mon Jun 29, 2009 6:39 pm    Post subject: Reply with quote

I am currently thinking about GA-E7AUM-DS2H motherboard with E5200 processor. I wonder would it play 2180p HDTV content? :)
Back to top
View user's profile Send private message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 377
Location: Europe/Austria

PostPosted: Tue Jun 30, 2009 8:10 am    Post subject: Reply with quote

@DaggyStyle:
The problem with the 780g chipset is that not even the proprietary video driver supports the UVD video decoding (which is the pendant to nvidias VDPAU).
I'm still waiting for support.
Of course the processor is fast enough to decode HD videos on its own without help from the graphics device.

@alatar:
Here in Austria I don't even have 720p HDTV (only per DVB-S2, which I don't have), so I don't know about 2180p HDTV. Never heard of anything above 1080p though.
Back to top
View user's profile Send private message
alatar
n00b
n00b


Joined: 12 Feb 2009
Posts: 61

PostPosted: Tue Jun 30, 2009 12:38 pm    Post subject: Reply with quote

I do not think there are TV channels in that format, but I have some test videos encoded in 2160 (it is a Russian torrent as I am from Ukraine).
Back to top
View user's profile Send private message
zoolook
n00b
n00b


Joined: 05 Oct 2002
Posts: 16

PostPosted: Wed Jul 01, 2009 2:04 pm    Post subject: recent XBMC on Gentoo Reply with quote

Hi,
Tariella wrote:
...
Details on my gentoo setup so far (kernel, USE-flags, xorg, drivers, automounting, and so on) will follow.


I'm right now trying to setup XBMC on my htpc, running ~x86 Gentoo, and have adapted the XBMC ebuild to fetch and build either xbmc-9.04.1 or from SVN, the linuxport or the pvr-testing branch (as I finally want to use it in conjunction with VDR). But well, I'm having trouble with XBMC, details in the XBMC forum thread I opened, could you please share some of your experience on this?

Cheers,
Zoolook
Back to top
View user's profile Send private message
Tariella
Guru
Guru


Joined: 10 Dec 2005
Posts: 377
Location: Europe/Austria

PostPosted: Wed Jul 01, 2009 2:15 pm    Post subject: Reply with quote

I'm running ~amd64 unstable with kernel 2.6.28 (fglrx graphics drivers don't support any higher version). Xbmc was installed with the xbmc-9999 ebuild from portage. No problems so far.
Last update of xbmc was about one or two weeks ago.

I'm running the in-kernel alsa drivers using the abovementioned .asoundrc; audio-output is through HDMI.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum