Thursday, October 31, 2013

Firefox to run H.264 video

In a previous post I talked about the future of Flash in Linux, and looked at some of the possible alternatives. I mentioned HTML5 video as a possible alternative, and an issue with HTML5 video adoption: proprietary and non-proprietary formats.

Now Cisco has open sourced the H.264 codec (the proprietary codec used to encode most online video) and Firefox will run H.264 video in "the first half of 2014".
In a surprising twist, the future of open and standard HTML5 video is looking a lot brighter today, with Cisco's announcement of the release of a fully open source implementation of the H.264 codec.

 The code makes it possible for any open source project to add support for the video codec without paying any fee or signing any restrictive license with the MPEG-LA, the industry group that licenses the technology.

This is a major development, as the situation around the proprietary codec has been an important source of contention among browser makers to date.

Most video found online is encoded with H.264. That's not a problem for Flash video, since Flash Player supports the codec out of the box.

In theory, it's not a problem for HTML5 video either, as long as browsers agree to license the codec. In fact, the license is even free in many cases. But it is incompatible with open source projects like Firefox.

Mozilla refused to add support for H.264, though it could have afforded to pay the license, because it meant that downstream projects, which relied on Firefox, wouldn't have been able to get the entire Firefox source code under an open license.

Google came up with a potential solution, the WebM video format and the VP8 codec, which it open sourced and made available for free. But, several years after that, most videos found online are still encoded with H.264 and won't work in Firefox without external codecs.
Softpedia
Cisco worked with Mozilla to get this done, so it's no surprise that Mozilla is the first to make use of this new open H.264.

The browser maker has announced that it will be adding full support for H.264 in Firefox in the first half of 2014.

 Mozilla opted not to build the H.264 codec into the Firefox source code. Rather, if needed, the browser will be able to automatically download the binary code that Cisco is making available. Users will be able to disable this feature though.

What this means is that Firefox will be able to run any H.264 video it encounters on the web, plain HTML5 videos or even WebRTC streams, if H.264 becomes part of the WebRTC standard.
Softpedia

This could "widen support for web-based video chat":
WebRTC promises plugin-free video chat in our browsers, but it has been stuck in limbo due to format squabbles -- some companies want royalty-free standards like VP8, while others insist on the wider support of H.264. Today, Cisco is proposing a truce between the two camps. It's planning to open-source its H.264 codec without passing on the royalties it pays to MPEG-LA, effectively making the standard free when used in web conversations.
 And:
If all goes well, though, we won't have to fret much over the apps and devices we use for our video discussions.
engadget

Friday, October 18, 2013

Nicer fonts in Debian XFCE

In a previous post, I looked at how to improve font rendering in the Chromium browser, which doesn't conform to font settings in the XFCE GUI.

After making these changes, I noticed that font rendering had changed in Iceweasel and other applications too. The only thing in my .fonts.conf file not in the XFCE fonts setting GUI is a setting for lcdfilter. It seems this enables LCD hinting. There is a way to do this without a .fonts.conf file.
LCD Hinting

On some systems LCD hinting results in better fonts. But because this is not working on all system, this setting is not configurable through the interface. You can set it with a simple query.

xfconf-query -c xsettings -p /Xft/Lcdfilter -n -t string -s lcddefault 

Other possible values are lcdnone, lcddefault, lcdlight and lcdlegacy. You can check if the property is set property, run xrdb -query in a terminal. To fully apply the LCD hinting, it is advised to logout and in again (for restarting the X server).
XFCE Docs.

It's subjective of course, but I think I prefer the slightly softer rendering of fonts with LCD hinting enabled. Here are some before and after screenshots that illustrate the difference.



Thursday, October 17, 2013

How to post code in Blogger

In my previous post, I wanted to post some XML code, but Blogger kept interpreting it as HTML and displaying it wrongly. Here's a solution I found. It converts characters that are interpreted as code into a format that is not, but which is displayed in a browser as the original character. NB the "friendly" text is posted in Compose not HTML in Blogger.

Postable.

Reading the explanation page for Postable, I realised that the Blogger friendly encoding will also solve a problem with the < and > characters I've had when posting in Blogger. To get them to display correctly, use the "safe" encoding:
&lt; and &gt;

Wednesday, October 16, 2013

Make Chromium fonts look like Iceweasel's in Debian XFCE

If you try out Chromium in Debian, you may notice that displayed fonts are not as nice as they are in Iceweasel.

Here's an example from Iceweasel:

And here's the same text in Chromium:

The first thing I noticed is that Chromium uses Bitstream Charter font whereas Iceweasel uses Serif. (I don't have Microsoft fonts installed.) This is what the text looks like with Chromium set to use Serif:

Next I noticed that Chromium does not seem to use the anti-alias settings in the XFCE GUI. The solution to this is to add a .fonts.conf file to the /home directory:
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
 <match target="font">
    <edit name="autohint" mode="assign">
      <bool>true</bool>
    </edit>
    <edit name="hinting" mode="assign">
      <bool>true</bool>
    </edit>
    <edit mode="assign" name="hintstyle">
      <const>hintslight</const>
    </edit>
  </match>
  <match target="font">
    <edit name="rgba" mode="assign">
      <const>rgb</const>
    </edit>
  </match>
<match target="font">
    <edit mode="assign" name="lcdfilter">
      <const>lcddefault</const>
    </edit>
  </match>
</fontconfig>
Here are before and after screenshots:



Now fonts display very much the same in both browsers:

Source: Arch Linux Font Configuration.

Sunday, October 13, 2013

Flash in Linux

Flash is of course used for streaming web videos, playing children's games, and displaying annoying web adverts. Most of us have it on our computers, many Linux users too, even though it's proprietary software. Adobe has however abandoned Flash for Linux, so what is the present and future of Flash on Linux?

Google has taken up development of Flash, calling it PepperFlash. PepperFlash is currently at version 11.8, whilst Flash from Adobe is frozen at version 11.2. PepperFlash is only available for the Google Chrome browser, but it can also be installed in the open source Chromium browser available in the Debian repository as described in Debian Bits and Snips. (I found that the archiving utility that comes installed with Debian XFCE wouldn't extract a .deb file, but the file can be extracted from a terminal with the following command:
dpkg -x filename.deb target-directory
Source: Debian Forum.)

Users of Debian Testing can install pepperflashplugin-nonfree.

Firefox is developing a web-native renderer using HTML5 and JavaScript  called Shumway, which will be a project to keep an eye on.

The Opera browser company have been pushing HTML5 as a replacement for Flash. I notice that a lot of BBC video content will play in the Opera Mobile browser on my Android phone now, I suspect because it is being served HTML5 (Flash doesn't work on my phone). On this test page, Opera in Andoid plays the HTML5 proprietary format.

In Debian, Chromium plays HTML5 proprietary format, but Iceweasel and Opera don't; all three browsers play HTML5 non-proprietary formats. This of course hints at some of the issues around HTML5 video adoption.

Opera users in Linux will have to hope that HTML5 becomes the standard format for web video before Adobe gives up security updates for Flash on Linux, or use Firefox or Chromium to watch Flash content.

Finally, there is an open source Flash player for Linux called Lightspark, discussed on the Debian Forum. I tried installing it, but video content was juddery and crashed frequently, and Flash games were missing visual components. This looks like another project to keep an eye on.

So, for the moment, Flash for Linux is still available from Adobe, and security updates will be available for about four years from now. It's available from the Debian Repository, but no longer developed. If Flash content doesn't work, try PepperFlash in Chromium (or Chrome).

For the future, keep an eye on Shumway and Lightspark.





Friday, October 11, 2013

Read boot messages log in Debian

Boot into Debian and you'll see messages scroll down the screen. Sometimes there's an error message you'd like to read carefully but it's gone before you have a chance. To create a boot log to read after the computer has booted, in Debian Wheezy simply install bootlogd.

There is a small bug in that some characters in the boot log are not displayed correctly in a text display command or text editor.

# cat /var/log/boot produces the following:

To see boot messages displayed correctly, use the following command:
sed $'s/\^\[/\E/g;s/\[1G\[/\[27G\[/' /var/log/boot
This produces:

Source: Debian Wiki.

Old boot logs seemed to be archived, so it might be a good idea to delete them from time to time.

Saturday, October 5, 2013

Liberate your hardware!

Came across these stickers on Debian Bits and Snips and ordered a couple for a very reasonable €2.10- less than £2 including postage. They arrived very promptly. Quality is excellent.

Stickers from LibreStickers.

Friday, October 4, 2013

Online Chrome theme generator

I've been trying out the Chromium web browser in Debian. Although it has a "use GTK+ theme" button in settings, the appearance of the bowser didn't match other applications- the frame was blue instead of grey.

There are lots of themes available, but none matched my theme. However, I came across an online theme generator at themebeta.com which allowed me to run up a theme for Chromium which matched other applications.

Full screen the Chromium browser with this theme looks like this. (Gnome 3/Adwaita inspired minimalism but in XFCE.)