Saturday, December 1, 2012

Openelec on ASRock VisionX

Install

Installed openelec 3.0 beta 1 with two USB thumb drives - one primed with the installer, the other blank, plugged in after booting the installer, and installed onto.

Network

Setting up wifi (system -> openelec -> network) was fairly straightforward, the main pain point was that changing the options in the menu had no immediate effect. Once I realized that it is necessary to reboot after every change to network configuration things got sensible and was up and running with wifi (using device wlan0) in no time. SSH access: on first boot, after plugging in an ethernet cable, I was able to ping, ssh, and guess the username and password. However the settings for "run ssh server" weren't checked, so I checked "run ssh server" and "disable password authentication". However after doing this, any attempt to ssh in was met with "Permission denied (publickey,keyboard-interactive)." so I unchecked "disable password authentication" and after a reboot I was able to connect again.

Unicode

Next problem: lack of unicode. In 2012, anything that ships without support for international languages should be considered broken. Perhaps there is a reason for this situation (font licensing costs?) but it's a bit embarrassing at this point that it hasn't been sorted out. In fact, even people looking for support in the forums were coming up emptyhanded! The post at http://openelec.tv/forum/72-xbmc/27400-unicode-support gave me an idea of where to start.
root ~ # mkdir /storage/.xbmc/userdata/fonts root ~ # cp Arial\ Unicode.ttf /storage/.xbmc/userdata/fonts/arialuni.ttf root ~ # ls -l /storage/.xbmc/userdata/fonts/arialuni.ttf -rwxr-xr-x 1 root root 23278008 Nov 28 22:13 /storage/.xbmc/userdata/fonts/arialuni.ttf
Under the Confluence skin settings I changed Fonts to "Arial based". After this, unicode characters started to be displayed! I actually have no idea whether copying the old standby arial unicode was even necessary. It is a significantly larger filesize than the arial font included with openelec, so there is a good chance it includes more characters. It worked fine until I rebooted. After rebooting, all my labels were blank! I had to use screenshots from the xbmc wiki to navigate the text-free settings menus and change the font back to skin default! Cycling through the fonts, the default and no-caps-default both worked, but selecting "arial-based" causes the labels to go blank. Before reboot:
root ~ # ls -l /usr/share/xbmc/media/Fonts/// total 5048 -rw-r--r-- 1 root root 633604 Nov 25 15:09 DejaVuSans.ttf -rw-r--r-- 1 root root 123096 Nov 25 15:09 Trebuchet MS Bold.ttf -rw-r--r-- 1 root root 83980 Nov 25 15:09 YanoneKaffeesatz-Bold.ttf -rw-r--r-- 1 root root 4221580 Nov 25 15:09 arial.ttf -rw-r--r-- 1 root root 105344 Nov 25 15:09 teletext.ttf
After reboot:
root ~ # ls -l /usr/share/xbmc/media/Fonts/ total 22736 -rwxr-xr-x 1 root root 23278008 Nov 28 22:13 arialuni.ttf
It seems that the folder I created, /storage/.xbmc/userdata/fonts, was pulled into the readonly filesystem at reboot and overwrote the full collection of fonts! The missing fonts seem to be gone for good:
root ~ # find / | grep ttf /storage/Arial Unicode.ttf /storage/.xbmc/userdata/fonts/arialuni.ttf /usr/share/fonts/liberation/LiberationMono-Bold.ttf /usr/share/fonts/liberation/LiberationMono-BoldItalic.ttf /usr/share/fonts/liberation/LiberationMono-Italic.ttf /usr/share/fonts/liberation/LiberationMono-Regular.ttf /usr/share/fonts/liberation/LiberationSans-Bold.ttf /usr/share/fonts/liberation/LiberationSans-BoldItalic.ttf /usr/share/fonts/liberation/LiberationSans-Italic.ttf /usr/share/fonts/liberation/LiberationSans-Regular.ttf /usr/share/fonts/liberation/LiberationSerif-Bold.ttf /usr/share/fonts/liberation/LiberationSerif-BoldItalic.ttf /usr/share/fonts/liberation/LiberationSerif-Italic.ttf /usr/share/fonts/liberation/LiberationSerif-Regular.ttf /usr/share/xbmc/addons/skin.confluence/fonts/Roboto-Bold.ttf /usr/share/xbmc/addons/skin.confluence/fonts/Roboto-Regular.ttf /usr/share/xbmc/media/Fonts/arialuni.ttf
This also suggests that

  1. My previous attempt to install arialuni had no effect
  2. The arial font included has pretty good support for foreign characters, so for most users simply selecting "arial-based" as the skin font should be sufficient
  3. By naming any unicode font to arial.ttf we can cause it to overwrite the original and thereby use any font we desire
  4. Some things on openelec require a reboot, some don't, it is hard to know which is which, and if you are trouble-shooting you may be better off rebooting every step of the way to ensure you're actually observing the effects of any change you made.

So, one more try:
root ~ # mv /storage/.xbmc/userdata/fonts/arialuni.ttf /storage/.xbmc/userdata/fonts/arial.ttf
and reboot, Settings -> Appearance -> Skin -> Fonts -> Arial based

It works, after 2 seconds the menu redraws with Arial, and browsing my international content all the extended characters show up. The other fonts seem to be lost for good, but it hasn't hurt my experience yet. If you find the need to install a custom font, I would start by copying everything from /usr/share/xbmc/media/Fonts/ into /storage/.xbmc/userdata/fonts/ so that you don't lose any of them. Just in case they turn out to be useful someday.

Confirming that the old standby ultra-complete unicode font I added is being used:
root ~ # ls -l /usr/share/xbmc/media/Fonts/ total 22736 -rwxr-xr-x 1 root root 23278008 Nov 28 22:13 arial.ttf

Adding network shares

System -> File manager -> Add source -> Browse -> SMB -> browse for net shares, select desired folder, edit name, etc

However after the above, they still did not appear as media sources. So next up was

Videos -> Files -> Add videos... -> Browse -> as above

Attempting to set the media type, I opted to browse the available scrapers, and trying to cancel that I backed out (probably by ESC) and found that the folder had been added with whatever default settings it had. Adding NFS sources was similar, except that I had to type in the locations, e.g.

Add Video Source -> Browse -> Add network location... -> "nfs://10.0.1.50/mediapool/media"

after which it shows up as a source when I Browse, and I could browse within that hierarchy and select the folders I wanted to add with various names.

Audio

Audio didn't work. Actually, it did seem to work via the analog out that was set up by default, but I preferred to send it over HDMI.

Settings -> System -> Audio output -> Audio output -> HDMI Audio output device -> HDA ATI,
HDMI Passthrough output device -> HDA ATI, HDMI

Blu-ray images

System seems to have no problem playing e.g. 1080p mkv files, but playing blu-ray files results in about 2fps performance. All available hardware decoding options are checked. Software vs. hardware decoding yields same results.

http://forum.xbmc.org/showthread.php?tid=129509&page=2 - many people are reporting that choppy/slow blu-ray playback is due to the new audio engine in XBMC. According to their advice, selecting AC3 rather the HD audio did improve playback to mostly smooth with some painful slowdowns now and then. Still not at the point where I can actually watch a BD image, but getting closer.

At some point after trying out different settings even normal DVD were stuttering.

After upgrading to openelec 3.0 beta 2 and taking the advice at http://forum.xbmc.org/showthread.php?tid=145277&pid=1239524#pid1239524 to enable all advanced format options (WASAPI is not relevant so I left output HDMI) and check video settings, everything seems to play smoothly. It does sometimes pause for buffering, I assume this is due to the high bandwidth I'm trying to push over wifi and should go away if I switch to a cable.

TBD

Doesn't auto-play video folders

My files are organized thusly:

Movies/Genre/Title - Director - Year - Misc/VIDEO_TS
Movies/Genre/Title - Director - Year - Misc/movie.iso

I should be able to click on a folder to play the movie within. Currently I have to click on the .iso file, or on the VIDEO_TS file and then on the correct IFO file within! Absolutely, a VIDEO_TS folder should be considered a target. And if a folder contains only a single video target (and perhaps a few image or .nfo files) that folder should play when clicked on. There is a similar problem at XBMC toplevel - I have to select video, then files, before I can even start browsing. I would like to have my video sources and audio sources listed right at the toplevel. Overall it take me perhaps 8 clicks to play something when it should only take 4. Playing things from "library" rather than "files" context might help this. Enabling "stack" option might help this. Enabling stacking helps somewhat, but also introduces new problems. For instance, if I have a few .iso files laying around in a high-level directory full of folders with different movie collections, stacking treats that high-level folder as a target and plays when I click on it. So I either have to turn off stacking, or audit my filesystem for loose .iso and VIDEO_TS instances and put them all inside their own folders. Default stacking doesn't seem to be quite smart enough to behave properly in a typical real-word disorganized collection.

Browsing a certain folder causes XBMC to hang

Will debug by splitting the difference until I figure out what in that folder is causing the problem. TBD TBD