Saturday, April 13, 2013

Flash videos on Linux ARM chips


Until now I had been using Gnash, the extremely poor open substitute of Flash, which is actually unusable for any real purposes.


A couple weeks ago I read that it could be possible to have Flash on ARM by using the Flash Player that Adobe develops for the Chrome OS (used on the Samsung Chromebook ARM laptops).

So I found a page (see Reference below) that described what to do and, most importantly, provided the ARM compiled library that contains the official Flash Player.

Hence, the steps to have Flash up and running on the Chromium web browser in Linux (tested on Xubuntu 12.10) are:

1) Download compressed library
2) Copy the .so file to /usr/lib/
3) Change the Chromium shortcut from just:
chromium-browser
to the following single line:
chromium-browser --ppapi-flash-path=/usr/lib/libpepflashplayer.so --ppapi-flash-version=11.5.31.105 --ppapi-flash-args=enable_hw_video_decode=0,enable_stagevideo_auto=0,enable_trace_to_console=0 
4) Open Chromium and enjoy the real Flash, only limited by the maximum speed of your stick!


UPDATE: Popping noises
When I had a site with Flash open while listening to a local music file, or watching flash videos, I heard a 'pop' every few seconds, which stopped upon closing chromium. Running chromium from the commandline yielded this error along with every pop:
ALSA lib pcm_dmix.c:957:(snd_pcm_dmix_open) The dmix plugin supports only playback stream

Solved it by going into the PulseAudio Volume Control and making sure, on the last tab, that the profile was Analogic Stereo Duplex and KEEPING OPEN (!!!!) the PulseAudio Volume Control app, which for some reason makes the noises stop and a new line appears below the one above:
ALSA lib pcm_dsnoop.c:612:(snd_pcm_dsnoop_open) unable to open slave



Reference
http://forum.xda-developers.com/showthread.php?t=2010440

8 comments:

  1. Hi, tried to install flash player on Picuntu (UG007), the flash player is very slow.
    Have you any idea why is it?

    ReplyDelete
    Replies
    1. I guess you say it due to Flash videos, this is because there is no video decoding acceleration. For other types of Flash (ads, menus, etc.) it runs fine for me.

      Delete
    2. You got it right.
      I tried to play movies from youtube and etc.
      It is very slow...
      For other types of Flash it runs perfect.
      I understand that the rk3036ś VPU is not supported on Picuntu, do you know about any solution to play flash video on Picuntu?

      Thankś a lot.
      Sergy

      Delete
  2. (sorry my Englich ist bad and translate :( )

    flashplayer not work with new Chromium Vers. !!

    only works with chromium Vers. 22
    Download:

    FIX Problem:
    sudo apt-get purge chromium*

    mkdir chromium
    cd chromium

    wget https://launchpad.net/ubuntu/+source/chromium-browser/22.0.1229.94~r161065-0ubuntu1/+build/3907002/+files/chromium-browser_22.0.1229.94~r161065-0ubuntu1_armhf.deb

    wget https://launchpad.net/ubuntu/+source/chromium-browser/22.0.1229.94~r161065-0ubuntu1/+build/3907002/+files/chromium-codecs-ffmpeg_22.0.1229.94~r161065-0ubuntu1_armhf.deb

    Language Pack:

    wget http://launchpadlibrarian.net/119854807/chromium-browser-l10n_22.0.1229.94~r161065-0ubuntu1_all.deb


    !!!!
    delete old Chromium Profile:
    rm -rf ~/.config/chromium
    !!!!

    and now install
    sudo dpkg -i *.deb

    and Flashplayer works!

    Have fun! :)

    ReplyDelete
  3. Its Working for me - Thanks a lot.

    ReplyDelete
  4. You can solve dmix problem by asym alsa plugin. Look at my asound.rc:
    #pcm.!default {
    # type hw
    # card 0
    #}

    #ctl.!default {
    # type hw
    # card 0
    #}

    pcm.!default {
    type asym
    playback.pcm "pasymed"
    capture.pcm "pasymed"
    }


    pcm.dmixer {
    type dmix
    ipc_key 1024
    slave {
    pcm "hw:0,0"
    period_time 0
    period_size 1024
    buffer_size 4096
    rate 44100
    }
    bindings {
    0 0
    1 1
    }
    }

    ctl.dmixer {
    type hw
    card 0
    }

    pcm.mixin {
    type dsnoop
    ipc_key 5978293 # must be unique for all dmix plugins!!!!
    ipc_key_add_uid yes
    slave {
    pcm "hw:0,0"
    channels 1
    period_size 1024
    buffer_size 4096
    rate 8000
    periods 0
    period_time 0
    }
    bindings {
    0 0
    }
    }

    pcm.asymed {
    type asym
    playback.pcm "dmixer"
    capture.pcm "mixin"
    }
    pcm.pasymed {
    type plug
    slave.pcm "asymed"
    }

    ReplyDelete
  5. Flash on Raspberry Pi 2:
    1. install chromium
    2. download the library
    3. remove gnash if installed (at least for me was not working before i purge all gnash packages)
    4. start chromium (i used just : chromium-browser --ppapi-flash-path=/usr/lib/libpepflashplayer.so --ppapi-flash-version=11.5.31.105 )
    5. ensure only the wanted video is using Flash to be able to enjoy best quality (close or block all adv.)

    avg. CPU 65% (50/89)

    Regards

    ReplyDelete
    Replies
    1. Any way to use last version of Flash (31.x) on ARM?

      Delete

Note: Only a member of this blog may post a comment.