解決在 Ubuntu Server 14.04 上安裝 ClipBucket 後螢幕出現的錯誤訊息

在 Ubuntu Server 14.04 上安裝 ClipBucket 後螢幕會出現一大堆的錯誤訊息
Strict Standards: Non-static method CBTemplate::assign() should not be called statically in /var/www/html/clipbucket/includes/functions.php on line xxx
[@more@]解決方式:
參考網站:
Issue 426 – clipbucket – Default template are not supported to PHP 5.4.19 – Video and photo sharing website script with social networking – Google Project Hosting

修改 /var/www/html/clipbucket/includes/common.php,註解部份程式碼
# vim /var/www/html/clipbucket/includes/common.php
                case 2:
/*              default:
                {

                        if(phpversion() >= ‘5.3.0’)
                        {
                                error_reporting(E_ALL ^E_NOTICE ^E_DEPRECATED);
                                ini_set(‘display_errors’, ‘1’);
                        }
                        else
                        {
                                error_reporting(E_ALL ^E_NOTICE);
                                ini_set(‘display_errors’, ‘1’);
                        }
                } */
        }

這時畫面上就不會出現錯誤訊息了!

在 Ubuntu Server 14.04 上安裝 ClipBucket

在 Ubuntu Server 14.04 上安裝 ClipBucket
參考網站:
How to install the transcoding tools on Ubuntu 14.04 – ViMP – Video CMS

1. 安裝所須套件
# apt-get install apache2 php5 mysql-server php5-mysql gpac php5-cli php5-gd php5-curl libx264-dev libtheora-dev libfaac-dev libmp3lame-dev libvorbis-dev libxvidcore-dev build-essential yasm checkinstall
[@more@]2.
安裝所須套件
# apt-get install make automake g++ bzip2 unzip patch subversion
3.  下載 win codecs of the MPlayer 及安裝
#
wget http://www2.mplayerhq.hu/MPlayer/releases/codecs/essential-amd64-20071007.tar.bz2

# tar xvjf essential-amd64-20071007.tar.bz2
# mkdir /usr/local/lib/codecs
# cp -Rvp essential-amd64-20071007/* /usr/local/lib/codecs/
4. 修改 /etc/ld.so.conf
#
vim /etc/ld.so.conf
加入下面二行
/usr/lib
/usr/local/lib
讓設定生效
#
ldconfig

5.
安裝所須套件
#
apt-get install libsdl1.2-dev zlib1g-dev libfaad-dev libfaac-dev libgsm1-dev libtheora-dev libvorbis-dev libspeex-dev libopencore-amrwb-dev libopencore-amrnb-dev libxvidcore-dev libxvidcore4 libmp3lame-dev libjpeg62 libjpeg62-dev

6. 安裝 x264
#
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/last_stable_x264.tar.bz2

# tar xvjf last_stable_x264.tar.bz2
# cd x264-snapshot-20140610-2245-stable/
# ./configure –enable-shared –enable-pic
# make && make install
# cd ..
7. 安裝 libvpx
#
wget http://webm.googlecode.com/files/libvpx-v1.2.0.tar.bz2

# tar xvjf libvpx-v1.2.0.tar.bz2
# cd libvpx-v1.2.0
# ./configure –enable-shared –enable-pic
# make
# make install
# cd ..
8. 安裝 MPlayer/mencoder
# wget http://www.mplayerhq.hu/MPlayer/releases/MPlayer-1.1.tar.gz
# tar xvzf MPlayer-1.1.tar.gz
# cd MPlayer-1.1/
# ./configure
# make && make install
# ldconfig
# cd ..
9. 安裝 ffmpeg
# wget http://ffmpeg.org/releases/ffmpeg-2.2.1.tar.bz2
# tar xvjf ffmpeg-2.2.1.tar.bz2
# cd ffmpeg-2.2.1/
# ./configure –enable-gpl –enable-version3 –enable-shared –enable-nonfree –enable-postproc –enable-libfaac –enable-libmp3lame –enable-libopencore-amrnb –enable-libopencore-amrwb –enable-libtheora –enable-libvorbis –enable-libvpx –enable-libx264 –enable-libxvid
# make
# make install
# ldconfig
10. 安裝 qt-faststart
# cd tools
# make qt-faststart
# cp qt-faststart /usr/local/bin/
11. 安裝 flvtool2
# cd /usr/src
# wget ftp://ftp.ruby-lang.org/pub/ruby/1.8/ruby-1.8.6.tar.bz2
# tar xvjf ruby-1.8.6.tar.bz2
# cd ruby-1.8.6
# vim math.c
修改 math.c
修改第 37 行
#elif define(ERANGE)
成為
#elif defined(ERANGE)
# ./configure
# make
# make install
# cd ..
# wget https://ffmpeg-install-centos.googlecode.com/files/flvtool2-1.0.6.tgz
# tar xzf flvtool2-1.0.6.tgz
# cd flvtool2-1.0.6
# /usr/local/bin/ruby setup.rb config
# /usr/local/bin/ruby setup.rb setup
# /usr/local/bin/ruby setup.rb install
# cd ..

12. 下載 ClipBucket 及安裝
# cd /var/www/html
# wget http://downloads.sourceforge.net/project/clipbucket/ClipBucket%20v2/clipbucket-2.6-r738-security-fixed.zip
# unzip clipbucket-2.6-r738-security-fixed.zip
# mv clipbucket-2.6-r738-security-fixed/upload clipbucket

13. 更改檔案及目錄權限
# chmod 777 clipbucket/includes
# chmod 777 clipbucket/files
# chmod 777 clipbucket/files/conversion_queue
# chmod 777 clipbucket/files/logs
# chmod 777 clipbucket/files/original
# chmod 777 clipbucket/files/temp
# chmod 777 clipbucket/files/thumbs
# chmod 777 clipbucket/files/photos
# chmod 777 clipbucket/files/videos
# chmod 777 clipbucket/files/mass_uploads
# chmod 777 clipbucket/files/temp/install.me
# chmod 777 clipbucket/images
# chmod 777 clipbucket/images/avatars
# chmod 777 clipbucket/images/backgrounds
# chmod 777 clipbucket/images/collection_thumbs
# chmod 777 clipbucket/images/category_thumbs
# chmod 777 clipbucket/images/groups_thumbs
# chmod 777 clipbucket/includes/langs/en.lang
# chmod 777 clipbucket/cache
# chmod 777 clipbucket/cache/comments
# chmod 777 clipbucket/cache/userfeeds
# chmod 777 clipbucket/cb_install


14. 建立 ClipBucket 資料庫
# /usr/bin/mysqladmin -u root -p create ClipBucket

15. 修改 /etc/php5/apache2php.ini
# vim /etc/php5/apache2/php.ini
max_execution_time = 300
max_input_time = 600
memory_limit = 512M
post_max_size =2048M
upload_max_filesize=2048M
# 開啟這項才能看到 ClipBucket 安裝畫面
short_open_tag = On
date.timezone = “Asia/Taipei”

16. 重新啟動 Apache Web Server
# /etc/init.d/apache2 restart

17. 進行 ClipBucket 安裝
因為和之前的安裝方式相同,就不另外擷取圖片說明!
參考:頭城國小資訊組 | 在 CentOS 6.x 上安裝 ClipBucket

解決 ClipBucket 隨機圖片無法正常顯示

安裝完成後的 ClipBucket,在隨機圖片中會無法正常顯示
[@more@]看起來似乎是在 ClipBucket 的資料表中的 cb_photos 少了 photo_details 欄位
底下參考這個網站來解決:
Issue 251 – clipbucket – Photo Upload Database Error – Video and photo sharing website script with social networking – Google Project Hosting

切換到 root 身份,執行
# /usr/bin/mysql -u root -p
Enter password:
Welcome to the MySQL monitor.  Commands end with ; or g.
Your MySQL connection id is 520
Server version: 5.1.73 Source distribution

Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type ‘help;’ or ‘h’ for help. Type ‘c’ to clear the current input statement.

mysql> use ClipBucket;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql> ALTER TABLE `cb_photos` ADD  `photo_details` TEXT NOT NULL AFTER  `photo_tags`;
Query OK, 10 rows affected (0.01 sec)
Records: 10  Duplicates: 0  Warnings: 0

mysql> quit
Bye

重新整理後,畫面就可以正常顯示了!
不過不清楚,為什麼是這幾張圖- 韓劇 (Nine:九回時間旅行)

增加 ClipBucket 的 Themes

ClipBucket 本身的程式是 OpenSource,但一些另外的 Plugins 和 Themes 則是要另外付費的,但官方網站上也有提供了一些免費的 Themes 可以使用。

[@more@]ClipBucket 免費的 Themes 下載網址:http://clip-bucket.com/free-themes

使用方式:
1. 先將 Themes 下載下來並解壓縮

2. 使用 FTP 軟體將解壓縮的目錄上傳到 clipbucket 網頁目錄之下的 styles 目錄之下

3. 在管理後台中,選擇 Templates and Player 下的 Templates Manager

4. 應該可以看到上傳上去的 Themes,如果要使用就點選 Activate The Template

原本使用的 Theme

改換後的 Theme

Clipbucket 2.7-Beta 版

Clipbucket 2.7-Beta 版釋出,更詳細的說明,請參考官方網站:http://clip-bucket.com/

Clipbucket 2.7-Beta 下載:
# wget http://downloads.sourceforge.net/project/clipbucket/Clipbucket%20V2.7/Clipbucket%20V2.7-Beta-REV2454.zip
[@more@]安裝方式:
1. 解壓縮
# unzip Clipbucket V2.7-Beta-REV2454.zip -d /var/www/html

2. 搬移網頁目錄到網頁根目錄
# cd /var/www/html/Clipbucket V2.7-Beta-REV2454
# mv Upload ../Clipbucket27b

3. 刪除不必要的目錄
# rm -rf “/var/www/html/Clipbucket V2.7-Beta-REV2454”

4.開始安裝
請參考:頭城國小資訊組 | 在 CentOS 6.x 上安裝 ClipBucket

稍微試用了一下,感覺最大的不同是影片上傳的介面稍有不同

選擇要上傳的是 Video or Photo

可以用拖曳或按下方的 Select Videos

上傳完的介面

但要觀看上傳好的影片時,出現錯誤訊息

後來檢查了一下,影片上傳的目錄,發現似乎是檔案沒有轉換成功,在最後的目錄中找不到轉換成功的檔案
在新版中可以轉換失敗

在舊版中可以轉換成功

但同樣的影片檔,在 Clipbucket 2.6 版上卻沒有問題,所以目前還是先使用舊的版本。

在 ClipBucket 網站中上傳影片

1. 首先先登入網站,選擇右上角的 Upload video

2. 系統會自動亂數產生一個 key 值,請點選 key 值
[@more@]3. 選擇要上傳的影片,並按 開啟

4. 輸入影片的相關資訊,並最後點選 儲存資料

5. 在我的影片頁面中可以看到目前正在轉檔中

6. 轉檔成功

7. 按 VIEW 即可觀看影片

8. 觀看成果

ClipBucket 增加中文語系

ClipBucket 中文語系下載

登入管理後台後,選擇 Status And Configurations
[@more@]選擇 Language Settings

在 Add New Language 中,選擇 瀏覽

選擇已經下載並解壓縮的 xml 檔

選擇 Add Language

畫面中會多出現 繁體中文

點選 繁體中文,把預設的語系改成繁體中文

這時畫面大部分也會顯示中文,有少部分仍要手動修改

在 CentOS 6.x 上安裝 ClipBucket

ClipBucket 是一套 OpenSource 的影音平台網站,可以讓使用者上傳影片,做為分享及交流使用。
ClipBucket SoureForge 官方網站:http://sourceforge.net/projects/clipbucket/

底下是在 CentOS 6.x x64 下進行安裝
本篇文章參考:
Garry’s 筆記: CentOS 6 安裝 ClipBucket 2.6
clipbucket教學

1. 安裝編繹套件
# yum groupinstall ‘Development Tools’ -y

2. 安裝 zlib-devel 套件
# yum install zlib-devel[@more@]3. 安裝 ffmpeg 套件
# yum install ffmpeg –enablerepo=rpmforge

4. 安裝 flvtool2 套件
# yum install flvtool2 –enablerepo=rpmforge

5. 安裝 mplayer 套件
# yum install mplayer –enablerepo=rpmforge

6. 安裝 mod_flvx 套件
# yum install mod_flvx –enablerepo=epel

7. 安裝 yasm 套件
# yum install yasm –enablerepo=rpmforge

8. 安裝 MP4Box 安裝 0.4.5 版或 0.5.0 版
下載
# wget http://downloads.sourceforge.net/gpac/gpac_extra_libs-0.5.0.tar.gz
# wget http://downloads.sourceforge.net/gpac/gpac-0.5.0.tar.gz
解壓縮
# tar xvzf gpac-0.5.0.tar.gz
# tar xvzf gpac_extra_libs-0.5.0.tar.gz
下載
# wget http://downloads.sourceforge.net/gpac/gpac_extra_libs-0.4.5.tar.gz
# wget http://downloads.sourceforge.net/gpac/gpac-0.4.5.tar.gz
解壓縮
# tar -zxvf gpac-0.4.5.tar.gz
# tar -zxvf gpac_extra_libs-0.4.5.tar.gz
切換目錄
# cd gpac
複製檔案及目錄
# cp -r ../gpac_extra_libs/* extra_lib/
更改檔案權限
# chmod 755 configure
進行編譯及安裝
# ./configure
# make lib
# make apps
# make install
# cp bin/gcc/libgpac.so /usr/lib
# ldconfig
# cp /usr/local/bin/MP4* /usr/bin/

9. 下載 ClipBucket 及安裝
# cd /var/www/html
# wget http://downloads.sourceforge.net/project/clipbucket/ClipBucket%20v2/clipbucket-2.6-r738-security-fixed.zip
# unzip clipbucket-2.6-r738-security-fixed.zip
# mv clipbucket-2.6-r738-security-fixed/upload clipbucket

10. 更改檔案及目錄權限
# chmod 777 clipbucket/includes
# chmod 777 clipbucket/files
# chmod 777 clipbucket/files/conversion_queue
# chmod 777 clipbucket/files/logs
# chmod 777 clipbucket/files/original
# chmod 777 clipbucket/files/temp
# chmod 777 clipbucket/files/thumbs
# chmod 777 clipbucket/files/photos
# chmod 777 clipbucket/files/videos
# chmod 777 clipbucket/files/mass_uploads
# chmod 777 clipbucket/files/temp/install.me
# chmod 777 clipbucket/images
# chmod 777 clipbucket/images/avatars
# chmod 777 clipbucket/images/backgrounds
# chmod 777 clipbucket/images/collection_thumbs
# chmod 777 clipbucket/images/category_thumbs
# chmod 777 clipbucket/images/groups_thumbs
# chmod 777 clipbucket/includes/langs/en.lang
# chmod 777 clipbucket/cache
# chmod 777 clipbucket/cache/comments
# chmod 777 clipbucket/cache/userfeeds
# chmod 777 clipbucket/cb_install

# wget http://dinno.blog.phc.edu.tw/files/2012/05/cb_lang_zh_tw.zip
# unzip cb_lang_zh_tw.zip
# mv cb_lang_zh_tw.xml clipbucket/includes/langs
# chmod 777 clipbucket/includes/langs/cb_lang_zh_tw.xml

11. 建立 ClipBucket 資料庫
# /usr/bin/mysqladmin -u root -p create ClipBucket

12. 修改 /etc/php.ini
# vim /etc/php.ini
max_execution_time = 300
max_input_time = 600
memory_limit = 512M
post_max_size =1024M
upload_max_filesize=1024M
# 開啟這項才能看到 ClipBucket安裝畫面
short_open_tag = On
date.timezone = “Asia/Taipei”

重新啟動 Apache Web Server
# service httpd restart

13. 進行安裝

14. 系統環境檢測
PHP Shield 未安裝,不過這一項設定可以暫不用設定

15. 目錄及檔案的權限檢查

16. 資料檔名稱、管理者帳號及密碼設定

17. 如果之前沒有先建立資料庫,則會出現錯誤訊息

18. 設定管理者的帳號及密碼

19. ClipBucket 站台的相關設定

20. 站台註冊

21. 為了系統安全,安裝完成後,請刪除 clipbucket/cb_install 目錄
# rm -rf /var/www/html/clipbucket/cb_install

22. 按 Continue to Admin Area 可以到管理後台

23. 按 Continue to Clipbucker v2 可以到 ClipBucker 的前台

24. 輸入管理者的帳號及密碼

25. ClipBucket 的管理後台

26. ClipBucket 的前台