Adobe Flash Player 11.2 将是支持 Linux 平台的最后一个版本.
Adobe 只继续为 Flash Player 11.2 for Linux 提供安全更新,而不提供版本更新.
Linux上为Firefox添加Flash Player支持也非常简单.
下载Adobe为Linux提供的tar.gz包:
https://get.adobe.com/cn/flashplayer/
把压缩包里的libflashplayer.so复制或软链接到/usr/lib/mozilla/plugins/即可.
Firefox for Linux:
ftp://ftp.mozilla.org/pub/firefox/releases/33.0.3/linux-x86_64/zh-CN/
ftp://ftp.mozilla.org/pub/firefox/releases/33.0.3/linux-i686/zh-CN/
Chrome for Ubuntu/Debian Stable:
https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
https://dl.google.com/linux/direct/google-chrome-stable_current_i386.deb
Linux上Firefox的Flash插件不能使用硬件加速Stage3D,只能使用软件模拟,所以速度慢,耗CPU,发热量大.
不过一般的Flash视频应该是没有用到Stage3D硬件加速的,所以用Firefox+Flash11.2看视频不是太大的问题.
但是,Firefox用FreshPlayerPlugin插件使用PepperFlash的方式就可以开启Flash Stage3D硬件加速了:
新建一个文件/home/eechen/apps/firefox/flash/
freshwrapper.conf,内容如下:
# Configuration options for FreshPlayerPlugin
# This configuration file is optional. Wrapper will search for it first
# in ~/.config/freshwrapper.conf, then in /etc/freshwrapper.conf.
# If wrapper fails to find configuration, it will use default values,
# which you can find below
# Audio buffer is used to continuously provide sound adapter with data.
# Values too low may lead to buffer underruns and stuttering. Values
# too high will lead to noticeable latency. Usually plugin selects size
# on its own, but you may override bounds here
# lower bound for audio buffer size, in milliseconds
audio_buffer_min_ms = 20
# higher bound of audio buffer size, in milliseconds
audio_buffer_max_ms = 500
# Path to the Pepper Flash plugin
pepperflash_path = "/opt/google/chrome/PepperFlash/libpepflashplayer.so"
# "Command-line" arguments for Flash
flash_command_line = "enable_hw_video_decode=1,enable_stagevideo_auto=1"
# enable 3d and stage 3d
enable_3d = 1 # enable 3d for wmode=transparent instances
enable_3d_transparent = 1
# when set to 1, limits output to warnings and errors only
quiet = 0
然后把它软链接到配置目录:
ln -s /home/eechen/apps/firefox/flash/freshwrapper.conf /home/eechen/.config/freshwrapper.conf
下载cubes_stage3d来对比下Chrome和Firefox各自使用PepperFlash的Stage3D硬件加速性能:
http://airtightinteractive.com/demos/flash/stage3d/cubes/cubes_stage3d.zip
分别用Firefox和Chrome访问cubes_stage3d/bin-release/index.html,在我的电脑(i5-3230M,无独显,分辨率1366x768,Ubuntu14.04)上:
100个立方体,Chrome达到60FPS,CPU空闲率为89%,稳定.
100个立方体,Firefox达到58FPS,CPU空闲率为85%,有时候会出现闪烁.