Showing posts with label howto. Show all posts
Showing posts with label howto. Show all posts

Saturday, September 14, 2013

How to make Crystal HD accelerated video decoding work in Ubuntu

I have a small "nettop" Foxconn NT510 system which I use as a "TV computer", mostly to play videos. It has an Atom D510 process (1.7GHz dual-core Pineview) which isn't powerful enough to decode and play 1080p video, and sometimes even stutters with 720p video in fast-moving scenes.

Fortunately, it also has a built-in Broadcom Crystal HD BCM970015 chip, which is a mini-PCI card that supports hardware-accelerated video decoding and has good Linux drivers.

Getting the CrystalHD to work under Ubuntu 12.04 took a few steps, but now I can play 1080p video with CPU usage of about 10% of one core, using either Totem (GStreamer-based) or VLC media players. Here's how:

  • Install both the crystalhd-dkms and firmware-crystalhd packages. The former is the kernel module for the driver, while the latter is the firmware for the device:

    $ sudo apt-get install crystalhd-dkms firmware-crystalhd

    If you don't install the firmware package, you'll get weird cryptic errors in your syslog and it just won't work. For some reason the need for the firmware package isn't mentioned clearly in most of the tutorials I've seen.
  • If you want to use a GStreamer-based video player like Totem, install gstreamer0.10-crystalhd. Now, accelerated playback with GStreamer should "just work."
  • To make VLC use the CrystalHD is somewhat less obvious. Ubuntu's version of VLC does include the CrystalHD plugin but it does not try to use it by default. Three ways to do it:
    • Use vlc --codec crystalhd from the command line. Works, but you'll have to run it this way every time.
    • Open the VLC GUI, and choose Tools | Preferences from the menu, then Show ALL Settings. Choose Input/Codecs from the lengthy tree menu, and then scroll down to the bottom of the pane where Preferred decoders list appears. Add "crystalhd" to that field, and save your preferences.
    • Edit your VLC configuration file (normally ~/.config/vlc/vlcrc) and find the comment string "Preferred decoders list". Edit the following line to look like this:

      # Preferred decoders list (string)
      codec=crystalhd

In any case, to verify that the CrystalHD is actually being used, start playing a video and watch your syslog (e.g. tail -f /var/log/syslog in a terminal window). You should see a line like this when you start playing video:

crystalhd 0000:04:00.0: Opening new user[0] handle

Wednesday, March 3, 2010

Make your own electronic book

Ever wanted to make your own electronic book?  No?  Me neither!  But then I found an out-of-print book at the library, which I really wanted a copy of.  Here's how I scanned it and cleaned it up into a nice usable document, using my desktop computer running Ubuntu.

Wednesday, April 1, 2009

How to tether your Moto Q as a modem *in Windows*

Previously, I figured out how to use a Motorola Q smartphone as a modem under Linux. I use Linux all the time, but for the benefit of others I got around to figuring out how to do it under Windows XP as well.

Thursday, January 22, 2009

How to use your Moto Q as a modem

So, I have the awesome (and now-discontinued) Spring SERO phone plan, which basically gives me unlimited text/data/everything for less than I paid for Verizon's cheapest plan. The only problem I've had until now:
How to tether my Motorola Q phone to my computer, so that I can use it as a modem when I'm not in range of a wireless network?
I read a whole lot of stupid forum posts on this topic, mostly by seriously confused people, and I was under the mistaken impression that (a) it's really hard to do, (b) it requires special software, and (c) Sprint has removed the features enabling tethering from the phone.

Well, it ain't true. In the course of a few hours, I figured out not how to tether my Moto Q in two different ways: first, using a USB cable, and second, via Bluetooth. So I'm going to explain how to do it both ways under Ubuntu Linux 8.10. It should be pretty much the same under other Linux variants.

Friday, September 12, 2008

Opening a MasterLock

Don't you hate it when you lose a lock combination? I always feel wasteful throwing 'em out and getting a new one.

There's a website that shows you how to crack a MasterLock.

Use the info on that page to get the third digit, then there's an algorithm to figure out the 80 possible combinations... or you can use this spreadsheet to figure them out. Then just try them till it works... there are only 80 possibilities, so on average it will take only 40 tries.

I was able to open my lock that I hadn't used all summer, woohoo!! I <3 my internets.