Akom's Tech Ruminations

Various tech outbursts - code and solutions to practical problems

Linux Fixing freezing and no sound youtube and flash on ubuntu

Posted by Admin • Monday, September 28. 2009 • Category: Linux

Problem:


I've had this issue for many months but obviously I don't use flash enough to really figure it out. The first few youtube videos would play, but with no sound. If you seek back and forth, or play sound from another player (eg audacious), you may get skipping sound for a little while. Eventually the whole player stops advancing, though you can still seek.

Solution:


<

ul>

  • You may have installed a dozen version of flash by now. As long as they are all ubuntu packages, you can leave them all installed (or you can remove them all)
  • Install the official release from adobe: Adobe Flash, current version is 10. Pick .deb format for the download.
  • Now run sudo update-alternatives --all
    ... This will ask you for all alternatives there are for your system, but among them there will be 5-10 flash-related questions for each browser (including text browsers, apparently). Pick the newly installed adobe-flashplugin like so:

      There are 2 alternatives which provide `mozilla-flashplugin'.
    
      Selection    Alternative
    -----------------------------------------------
    *+        1    /usr/lib/flashplugin-installer/libflashplayer.so
              2    /usr/lib/adobe-flashplugin/libflashplayer.so
    Press enter to keep the default[*], or type selection number: 2
    

  • Bounce Firefox and you should be all set
  • <

    ul>


    Software Mixing

    Once I got this fixed up, I now had reliable flash playback with one little problem... There was still no sound half the time - if another audio application grabbed my sound card before firefox (eg rhythmbox). Took me a while to figure out what to search for (usually the biggest issue, right?). Apparently the issue is twofold:

    1. My onboard sound card either doesn't do hardware mixing, or the drivers don't support that
    2. Alsa should have figured that out, and turned on Software Mixing, but for some reason it doesn't do that in Ubuntu

    Once I understood this, I used This page to help me out. Grabbed their ~/.asoundrc, restarted all the audio apps, and all seem to be sharing the sound card peacefully now.