Thursday, August 20, 2009

Smooth Flash Playback By Hacking Firefox

Everyone knows that Flash playback is the Achilles heel of Linux. It's hard to make the switch when web apps and videos do not work like they do in Windows or OSX. Coupled with the mangled Intel video driver, Flash on the Mini 9 has sucked. This hack will help improve Flash playback in Firefox.

One of Firefox's features is to keep a snapshot of all open tabs in case your browsing gets interrupted and needs to restored. By default, Firefox refreshes this snapshot every 10 seconds. This over-caching can causes errors in Flash and unnecessarily takes up processor cycles.

What this hack does is reduce the interval in Firefox's open tab caching. Instead of 10 seconds, we are going to have Firefox take it's snapshot every 100 seconds.

To access Firefox's Configuration File
Type about:config into the URL address bar
Screenshot-about:config - Mozilla Firefox
The red lines highlight the url box.
The blue lines highlight the filter box.
The filter box allows you to search your about:config file and is where you type the blue text commands.

Go to the text box for the Filter and type in: browser.sessionstore.interval
Double click the line, to change the integer value.
- 10,000 is the default value (every 10 seconds)
- change the integer value to 100,000 (every 100 sconds)

For other Firefox hacks, take a look at our "Customizing Firefox for Netbooks" article.

Have a question or problem that this article doesn't cover?
Ask our Ubuntu Mini 9 Google Group for help.

8 comments:

redDEAD said...

If you want to be hardcore you can turn off the feature completley by setting

browser.sessionstore.enabled

to false.

The downside is that Firefox will not be able to undo any closed tabs or restore your tabs in the event of a crash.
----
I settled set the integer value to 30,000 making Firefox cache the tabs every 30 seconds. I found that this works well too.

kpprom said...

I've found that Chrome works much better with flash videos then Firefox. No choppy video, at least at lower resolutions, HD is still bad.

I wish that The swfdec and gnash free alternatives worked better. They have the opportunity to work in features and platforms that Adobe won't support like using the video card to decode HD. I know adobe is planning this, but only on certain cards and only on Windows, and it isn't out yet.

Jerry said...

Nice advice. Don't know how much it improves flash, but I was always annoyed by Firefox asking if I wanted to restore my previous session.

Does anyone know how to change the default flash quality to low? That could help improve flash playback by quite a bit.

pHreaksYcle said...

Glad you liked my article!

Check here for a dirty lil hack for your request: http://forums.gentoo.org/viewtopic-t-543747.html

Jerry said...

Nah, that doesn't work. Since flash 10 is out now, trying to modify the plugin using that method will result in a Segmentation Fault and prevent Firefox from opening.

Elijah said...

I was so frustrated with Flash that I've deinstalled it. Now I'm viewing YouTube using a GreaseMonkey script that inserts a Totem embed. My script works only for YouTube though :(

joe said...

Tried the firefox trick did not work. What did work was going to 9.10 alpha. Tested a youtube video on 9.04 first. Just a static image and audio. On 9.10 the video played just as smooth as on my macbook with leopard.

Kruykaze said...

Works great thanks!