Archive for the 'Web' Category

Developer Documentation

Friday, February 1st, 2013

As part of the developer experience hackfest we are working on making the documentation more relevant and up to date.

A long while ago, I wanted to work on presentation of the upcoming HIG and using staticmatic to leverage haml, scss and a few helpers created a static reponsive site in the current GNOME.org styling.

But it’s time to murder my darling. To keep the content up-to-date and translatable we decided to use Mallard instead. So yesterday, during the DX hackfest I patched up the current library-web stylesheets to be responsive. Checking out the upcoming tutorials, API reference and design documents will be enjoyable on mobile devices too. You can track our progress on the hackfest wiki pages.

How to get your clips on the web

Monday, January 25th, 2010

H264 has it all. Buy-in from the big content providers, compression ratio superiority, mobile device support, and support in all major video editing tools and operating systems. Many people seem to criticize Mozilla for being idealistic and not providing its users what “they want”.

Chris Blizzard wrote a great summary of why Mozilla isn’t endorsing h264 and herding its users into the patent holder’s stall with historic examples of GIF and mp3.

Big players might have their reasons to go with h264, but individual small publishers (aka blog posters, you & me) can already publish in this safer format (Currently both Firefox 3.5+ and Chrome 4 support Ogg Theora playback and Opera will). An observant reader might realize there’s quite a hole in this free argument as most of the content you’ll shoot, you’ll probably shoot on an AVCHD camera and thus will need an h264 decoder to eventually get to the free format. But who knows, maybe we’ll see some cheap Theora cams once the MPEG LA starts collecting form hardware vendors. Instead of drowning in this catch-22 I’ll give you a few practical tips on how to produce Ogg Theora video.

The multiplatform way to encode to ogg theora I found was vlc. Ironically most Linux distributions cannot legally distribute it as it contains all the other proprietary codecs to be useful. On openSUSE, you can grab it from the Packman repository. Another tool with similar limitations is ffmpeg2theora. VLC has the benefit of having a GUI for the conversion. But it does allow you to do this on the commandline:

vlc foo.avi --sout-theora-quality=5 --sout-vorbis-quality=1 \
--sout="#transcode{vcodec=theo,vb=800,scale=1,deinterlace=0,\
acodec=vorb,ab=128,channels=2,samplerate=44100}:standard{access=file,\
mux=ogg,dst='foo.ogv'}"

I would be thankful if a good soul would use the comment area here to provide a gstreamer pipeline to encode a file into ogg theora (extra hugs for a series of still images and audio muxing).

Update! Apart from getting that pipeline, I was pointed to what appears to be a nice no-nonsense OggTheora converter (does Schroedinger and vorbis as well) – OggConvert. Thanks!

On the Mac, I haven’t had much luck with the official Xiph quicktime components in the past. What worked for me was the Perian bundle. After installing the components to /Library/Quicktime/Components/ apps like iMovie are able to export to Ogg Theora.

How about MS Windows? Xiph provides direct show plugins for Theora. This should provide a system wide decoding and encoding. I can’t give any recommendations on converters, but I bet you can use Handbrake, which is also sweet on Linux & OS X.

HTML Embedding

So should you rip you DVD collection into Theora? Probably inefficient and impractical. Should you publish your videos in ogg theora as a primary format? Most definitely! So how to do that?

The primary way to embed a video stream is using HTML5′s video tag. This gives you a chance to control the video from javascript and provide means to fall back to other codecs. But let’s start with the basic markup:

<video width="640" height="480">
<source type="video/ogg" src="foo.ogg">
<!-- and a fallback for h264 -->
<source type="video/mp4" src="foo.mp4">
</video>

Notice we already have the HTML5 supporting browsers covered. Now all the rest we cover with a Flash fallback. My suggestion is to use Flowplayer. I believe you can use the h264 mp4 stream directly with it, but if you want to support older flash plugins, you need to re-encode your clip to FLV (yay!). You can use ffmpeg and flvtool (to fix the metadata and index and allow flawless seeking).

Browsers unaware of the <video> tag will render the markup inside it (which is ignore by the HTML5 browsers). As this is a fallback, I went for a non-standard <embed> markup that is supported by more browsers, but you may stick with <object> to be more kosher. Additionally, IE6 does things its own way, so the markup ends up looking slightly ugly with the comment conditionals:

<video width="640" height="480">
<source type="video/ogg" src="foo.ogg">
<!-- and a fallback for h264 -->
<source type="video/mp4" src="foo.mp4">
<!-- and a fallback for flash9+ -->
            <!--[if !IE]> <-->
            <object type="application/x-shockwave-flash" data="flowplayer.swf" width="640" height="480">
              <param name="movie" value="flowplayer.swf"></param>
              <param name="wmode" value="transparent"></param>
              <param name="allowfullscreen" value="true"></param>
              <param name="flashvars" value='config={"clip":{"url":"http://yoursite/foo.flv"},"plugins":{"controls":{"time":false,"volume":false}}}'></param>
            <!--> <![endif]-->
              <embed width="640" height="480" type="application/x-shockwave-flash" src="/flowplayer.swf"
                    flashvars='config={"clip":{"url":"http://youriste/foo.flv"},"plugins":{"controls":{"time":false,"volume":false}}}'>
                <!--[if !IE]> <-->
                  <!-- and a fallback for direct download -->
                  <h3>Oops!</h3>
                  <p>Sadly we weren't able to detect any plugins that would allow us to stream
                  the video to you. You can <a href="foo.mp4">download
                  the file</a< to watch it locally.</p>
              <!--> <![endif]-->
              </embed>
            <!--[if !IE]> <-->
            </object>
        <!--> <![endif]-->

</video>

I hope this is a useful introduction on how to put your videos on the web. Feel free to correct me in the comments or give some more tips for everyone!

Update – Added OggConvert to the encoding section.

DropBox

Friday, October 24th, 2008

There’s been a few posts about Dropbox on Planet GNOME before. I have to join in on the praise. This is all I have hoped iFolder would become. A well designed file synchronization service that really hides the complexity and feels very easy to use. There’s clients for Windows, Mac and Linux. You can obviously share a folder with friends and they will get notified of file changes, so it’s extremely nice for icon design collaboration.

Apart from just doing synchronization, it does basic version tracking. Thanks to this I was able to “record” an icon drawing session by simply combining all the versions Dropbox created every time I saved a file.

*

What you see above has been created in two sessions of about 5 and 3 hours, sadly dropbox can’t make me faster.

*

Some will not be willing to run a binary daemon syncing files, but for me it has been a great time saver for cooperation with my icon buddies.

Planets Side by Side

Wednesday, September 17th, 2008

Federico mentions usability issues when trying to ban people from planets. I haven’t done any research, but personally think banning someone is a corner case functionality. I have never needed to do it on any of the planets I read.

What is striking to me when looking at the planets side by side though, is how unreadable the SUSE feed is. I can almost hear people say “but look how much information is shown on the right and you only see single post on the left”. Since when is packing as much text into an area a good thing? You will be scrolling in any case, and just look how long the lines on SUSE planet are. No padding for the paragraphs, everything crammed to the border which is also just noise as it doesn’t really separate the posts from one another. You cannot tell if the header isn’t a footer of the previous entry. Whitespace is a much better separator than lines/rectangles. And vertical logo? Yuck.

Feed banning may not be as convenient on planet gnome, but you can sure read it much more easily and it’s a pleasant view at that.

Last.FM

Friday, July 18th, 2008

Every dramatic change will trigger a negative reaction wave. The happy users are almost always happy in silence. But I have to express my gratitude to the last.fm redesign. Unlike pretty much all of my friends I welcome the change.

Last.FM was like an ATM. Everybody appreciates the usefulness of these devices even though they have the most terrible interface ever. They make you go through numerous menus, selecting from accounts you don’t even have, only to tell you at the end you mistyped the pin. I felt the same way about the old site. It was an amazing service but I always struggled to find what I’m looking for even though I knew it’s there (a bit like using Blender ;) . All these boxes everywhere. And the cheesy aqua highlights! Everything looked the same. It was like trying to find your apartment in a Czechoslovakian panel house estate.

The new site is airy, with plenty of whitespace, the sections are nicely separated and apart from the new logo, everything is just better than on the old one. So if you happen to have been involved in the redesign and read this, there is at least one of your users that is extremely happy about the change. Thanks!

Christmas!

Tuesday, June 17th, 2008

Why did the news fail to mention it’s Christmas? Firefox 3, openSUSE 11.0, Wine 1.0 (in which I’m not involved at all, but it’s an amazing project I depend on as a user). Celebrate!

Twitm

Wednesday, April 30th, 2008

I enjoy Twitter a lot. There’s many, many clients for the service. I’ve grown to like Alert Thingy (yes, that’s the actual title) which actually integrates with Friendfeed too.

But I felt a bit ashamed using Adobe AIR. Inspired by garrett’s stylesheet tweets, I created a Prism app bundle that makes Twitter main web-interface nice and compact. It wouldn’t be complete without an icon.

twitter icon

I couldn’t figure out how to nicely integrate the multi resolution icon into the bundle though. While the mac and windows icons can be multi-res, for Linux we get grandpa XPM. I have no idea why the spec defines to use XPM. Such an ancient format incapable of using alpha transparency needs to die. It’s not like gecko would have trouble rendering PNG. Also sad to see my whining hasn’t been fruitful yet. Especially when there’s a library available!

twitm

As for how to use this thing — for now you need to copy the individual sizes to ~/.icons/hicolor/. Once you let Prism generate your .desktop file, edit the link to the icon to just say Icon=twitm. That way you get all the sizes nicely thresholded on the panel/menu/desktop.

Maybe using the mobile site would have been safer, but I prefer the javascript character counter, so I went with styling the main site. As soon as the site layout changes, expect brokage :/

Update: It bound to happen. Twitter guys updated the site in the meantime, so this no longer works and I don’t feel motivated enough to create a new stylesheet. Sorry folks.

Mii Screenshot

Wednesday, April 23rd, 2008

Dear lazyweb, is there a way to get a preview/screenshot of a Mii on Linux? I managed to transfer the Mii, but am unable to find a tool to give me a preview. I’m wanting to have a high quality screenshot of it.

This little editor does seem to work under Mono (wow), but I can only load, edit and save the mii, not really get a preview of how it looks. The miieditor.com seems to be killed off by Nintendo :( .

Update Garrett found the Mii Editor editor, but the extracted SWF file fails to open a file when run locally or hosted with apache :/.

Delicious on Firefox 3

Saturday, April 5th, 2008

Woohoo!, Yahoo! :) folks have released an alpha of their del.icio.us extension that works on Firefox3 betas. Not only does it work, it also integrates with the awesomebar. For a sucky name like that, it is really well done bookmarking the mozilla folks designed.

For people unaware what is so new about bookmarking, let me sum it up for you. The awesomebar is the dropdown box that comes down when you start typing in the URL field. Maybe calling it the URL field isn’t that appropriate anymore, because what gets autocompleted isn’t just URLs of sites you visited. Bookmarked sites are preferred matches and you can search by title and most notably tags. Bookmarking a site is a matter of clicking on the small star icon on the right hand side of the URL bar. For most people this is all they will do. For people needing to add some metadata to get a better search experience, just click it again and fill out some more info, notably tags.

The del.icio.us extension isn’t integrated the way I have hoped, it kind of ruins the workflow by forcing its own tagging interface and popping up its old dialog every time you click on the star icon. I would rather prefer to have a [ ] make public checkbox in the Firefox’ bookmarking dialog in case you don’t want to just sync it to delicious and keeping it private. Still, an amazing extension.

openSUSE 11 Counter

Thursday, April 3rd, 2008

loading

If you’re seeing this on a planet or feed reader, you may want to visit the original article to see the actual counter, not a static image.

As requested on #opensuse-project on Freenode, here’s the openSUSE 11 release countdown widget. There’s still a lot to be desired, most notably the localization isn’t working as I cannot figure out how to get HTTP headers from javascript and navigator.language not really being the accept-language user preference. Also perhaps somebody wants to rewrite the thing in pure javascript and not depend on jquery.

To embed in your webpage, use this –

<!-- BEGIN SUSE Counter -->
<script type="text/javascript" src="http://forgeftp.novell.com/opensuse-art/openSUSE11/web-banner/jquery.js"></script><script type="text/javascript" src="http://forgeftp.novell.com/opensuse-art/openSUSE11/web-banner/SUSEcounter.js"></script><div id="countercontainer" style="width: 256px; height: 256px; margin: 0;padding: 0;"><a id="nojavascriptlink" href="http://www.opensuse.org"><img style="border: 0;" alt="loading" src="http://forgeftp.novell.com/opensuse-art/openSUSE11/web-banner/images/nojavascript.png" width="256" height="256" /></a></div>
<!-- END SUSE Counter -->