Saturday, March 17, 2007

Resolution lowered, how nice

Turning HDMI output to 480p resolution and having HD1000U do the upconverion made the trick. Standard Definition content looks good now.
In xorg.conf:

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "HD1000"
HorizSync 15.7 - 68.7
VertRefresh 50.0 - 100.0
Modeline "848x480@60" 31.47 848 880 992 1024 480 490 495 505 +hsync +vsync
EndSection

Section "Screen"
Identifier "Screen0"
Device "Videocard0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 16
Modes "848x480@60"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "848x480@60"
EndSubSection
EndSection

To tell X11 stop "saving" your screen

add this to xorg.conf

Section "ServerFlags"
Option "blank time" "0"
Option "standby time" "0"
Option "suspend time" "0"
Option "off time" "0"
EndSection

Sunday, March 11, 2007

Vidix

Just while I'm here, tried X11 way of running mplayer and freevo. The keyword here is VIDIX - the mplayer output driver that is told to be most effective. It comes as xvidix, wrapped for X11, and cvidix, that works on the plain console. cvidix worked, but console text was visible, and there were some imperfections in the mplayer output geometry.
So, I decided to configure X11 and see.
I tried both stock and ATI drivers packaged from livna. Performance difference between these drivers, if any, was small. But native drivers has locked X11 once, on mplayer termination. It never happened with ATI drivers during my testing. Both drivers have the same imperfections (flickerings and garbled screen areas on rapid mouse movemens, for instance), but they were not relevant to the movie watching.
I found X11 way more manageable than framebuffer one. I also believe that VIDIX has clear performance advatange over directfb with ATI cards.

Here's how I configured Xorg for ATI Radeon 9600XT and HD1000U at 720p resolution:
NB: my system is at runlevel 3 all the time, and X is not started. I start Xorg manually for the testing. export DISPLAY=localhost:0 is added to the user's provile.

1) # rpm -ivh http://rpm.livna.org/livna-release-5.rpm
2) # yum install kmod-fglrx - new kernlel is instaled here, and grub.conf is updated.
3) Verify grub.conf . In my case I removed framebuffer option I have added earlier.
4) #/usr/sbin/ati-fglrx-config-display enable (this is just in case you are not sure RPM did its configuration job properly. disable-enable anytime to refresh)
5) REBOOT (whatever they say, just do it)
6) Edit two sections in /etc/X11/xorg.conf to configure monitor resolution.

Section "Monitor"
Identifier "Monitor0"
VendorName "Monitor Vendor"
ModelName "HD1000"
HorizSync 15.7 - 68.7
VertRefresh 50.0 - 100.0
ModeLine "1280x720@60" 73.8 1280 1312 1592 1624 720 735 742 757 +hsync +vsync
EndSection

...

Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Viewport 0 0
Depth 16
Modes "1280x720@60" "1280x720" "800x600" "640x480"
EndSubSection
SubSection "Display"
Viewport 0 0
Depth 24
Modes "1280x720@60" "1280x720" "800x600" "640x480"
EndSubSection
EndSection

7) Now start X:
# Xorg -config /etc/X11/xorg.conf &

8) Verify
# xdpyinfo |grep dimens
dimensions: 1280x720 pixels (433x244 millimeters)

# glxinfo | grep direct
direct rendering: Yes

# lsmod |grep fglrx
fglrx 525912 9

9) Configure mplayer systemwide, for convenience of running it manually. Edit /etc/mplayer/mplayer.conf

# Default video output is xvidix, then xv, then try others
vo=xvidix,xv,
# Default audio output is alsa, then try others
ao=alsa,alsa1x,
# This is important
monitoraspect=16:9

10) Configure freevo.
Edit ~/.freevo/local_conf.py. Add in "Mplayer settings" section:
MPLAYER_VO_DEV = 'xvidix'

Edit /etc/freevo/freevo.conf.
display = x11
geometry = 1280x720

Am I happy? Not completely. I can display the Standard Definition shows I currently have on disk, and the Pentium III-750Mhz processor is used less than 50% even on the best quality contents. Unfortunately, most my files happen to be overcompressed Russian TV shows, and their poor quality is too obvious on such a big screen. I'm not happy with the picture. I could give it another chance and try to configure 480p resolution on the card instead of 720p in hope that projector does better upconverting job than mplayer. But, still, garbage in, garbage out rule is here.

When I tried to play a 720p resolution test clip from http://www.w6rz.net/ , the CPU could not keep with it, even close. Just no way.

Now I have to decide what all this endeavor is for... Do I need a new powerful system for this project? Even if so, looks like the current PCs are not quite ready for 1080p material.

Wednesday, March 07, 2007

We are back and making some progress

Meanwhile, many things have changed. Entertainment moved to the renovated basement, where I now have a Mitsubishi HD1000U projector and self-made 106" screen. Wow!

So, it's time to feed the PJ some movies. The good news that my old "friend" Freevo has made big progress since I touched it last time two years ago. It installs flawlessly by yum with all the dependencies. Moreover, both Freevo and Mplayer still work well with no X11 whatsoever, just need framebuffer initialized!

And one needs NO ATI drivers for that. And one needs NO kernel compilation for that.

1. Add the stock module to the boot RAM disk
mkinitrd --with=radeonfb /boot/initrd-radeonfb-2.6.19 2.6.19-1.2288.2.1.fc5
2. Add framebuffer configuration string to the grub.conf

kernel /vmlinuz-2.6.19-1.2288.2.1.fc5 ro root=/dev/VolGroup00/LogVol00 noapic acpi=off rhgb quiet video=radeonfb
initrd /initrd-radeonfb-2.6.19

Now reboot, and tell Freevo to use the frame buffer ( /etc/freevo/freevo.conf )
display = fbdev
geometry = 1280x720

Mplayer liked this video out option the most so far:

mplayer -vo directfb /var/tmp/Ostrov.avi