Pages

Subscribe:

Ads 468x60px

Labels

2012年3月5日 星期一

Wowza Technical Guidelines

Technical Guidelines

File Formats
Embed video files on Wowza
Example Embed Code
Sample (x)HTML File
Creating closed captions
1. File Formats

Brown's Wowza streaming server is set up to stream Quicktime (MP4, MOV, MP3) and Flash (FLV) files.

For what concerns size: the preferred sizes are the same one accepted at iTunes at Brown

Audio files (AAC, MP3) with appropriate file extensions (.m4a, .mp3). For best results during playback, Apple recommends converting MP3 files greater than 32 megabytes (MB) to AAC format.
Video files (H.264 MPEG-4 and MOV) with appropriate file extensions (.mp4, .m4v, .mov). Old video files which don't use the H264 codec will work, provided the file extension is .mp4 or .mov. Newly produced files must use the proper H264 codec.

詳見

Comparison Wowza vs FMS vs Red5

Briefing:Today I was evaluating the difference between Wowza , Flash Media server and Red5. So decided to write this comparison matrix . This comparison versus all of these three flash servers contain the main features that are uncommon with each other . I have not mentioned the features that are common to all of them . I have tried my best to put correct info but still if you find some thing missing or incorrect then just feel free to send me message using this form . I will keep on adding new points ...

詳見

Wowza Media Server服务器播 点播H264流

Wowza Media Server服务器播放H264流
一、安装Wowza Media Server,注意只有1.5及1.5以上版本才支持H264。
二、在安装目录的applications目录下创建一个目录空mediaserver,跟FMS一样,这个目录就是服务器应用名字。
三、在content目录下面放一个H.264/AAC文件(封装容器可为.f4v, .mp4, .m4a, .mov, .mp4v, .3gp, and .3g2) 这里把FMS3里面的例子AdobeBand_800K_H264.mp4作为我们的测试文件。
四、运行服务器bin/startup.bat ,服务器需要jre1.5以上支持,没有请安装。
五、将FlashPlayer升级到9.0115,开启Adobe Flash CS3 Professional,创建一个新的AS3文件,copy以下代码编译,然后用web方式运行,就可播放了。
NetConnection.defaultObjectEncoding = flash.net.ObjectEncoding.AMF0;
var nc:NetConnection = new NetConnection();
var obj:Object = new Object();
nc.client = obj;
nc.addEventListener(NetStatusEvent.NET_STATUS, NCStatusHandler);
nc.connect("rtmp://localhost/mediaserver");
function NCStatusHandler(event:NetStatusEvent):void {
if ("NetConnection.Connect.Success" == event.info.code) {
var ns:NetStream = new NetStream(nc);
ns.client = obj;
ns.play("mp4:AdobeBand_800K_H264.mp4");
var vid:Video = new Video(550 ,400);
vid.attachNetStream(ns);
addChild(vid);
}
}

定時定期備份postgresql

1、建立一個shell文件,名叫backupdb,放到/usr/sbin目錄,內容如下

#!/bin/sh

td=`date +"%Y%m%d%H%M%S" `

su postgres -c "/usr/local/pgsql/bin/pg_dump dbname > /home/dbbackup/"$td.dbname.dump

將數據庫dbname備份到 /home/dbackup目錄下,名稱是 備份時間.dbname.dump

2、在/var/spool/cron/root文件中(沒有該文件就建立一個)增加定義執行指令

*/30 * * * * /usr/sbin/backupdb

每半小時執行一次backupdb shell文件

crontab 的用法自已到google搜索一下,大把教程

3、重啟crontab
/etc/rc.d/init.d/crond restart

在windows下执行定时备份就更简单了

会务计划,在副件->任务计划,增加一个备份计划即可,注意要执行的语句写成一个bat档,要不可能无法执行。

Linux常用軟體推薦

系统装完后如果想要实现某些需求还得装上相应的软件,可能在安装时已经安装了大部分的软件,那对相关的软件是否了解,是否有更好的软件和版本,给自己做一 张常用软件列表和地址,方便以后查找。有网址的这些软件一般都有是官网,上面不仅可以下载还可以得到帮助。当然要获得这些到处都有像(

  http://sourceforge.net/project/showfiles.php?group_id=6241)这个上面有很多,各种Linux版本的都有。

  [媒体播放]

  1)divx影片:mplayer(http://www.mplayerhq.hu/design7/dload.html)

  2)rm影片:realplayer10forlinux(http://www.real.com/linux/),mplayer

  3)mp3:xmms(http://www.xmms.org/download.php)

  beepmediaplayer,mplayer

  4)ape:xmms+monkey'saudioplugin(http://www.monkeysaudio.com/download.html)

  (http://supermmx.org/linux/mac/)

  5)其他格式(wma,wmv,mkv,quicktime):mplayer各种格式的文档和文件

  [文件浏览]

  1)打开微软的office文档:openoffice(http://www.openoffice.org/),starsuite

  2)查看pdf文件:acroreadforlinux(http://rpmfind.net/linux/rpm2html/search.php?query=acroread)

  kpdf(http://kpdf.kde.org/)

  xpdf(http://www.foolabs.com/xpdf/),

  ggv(http://directory.fsf.org/ggv.html)

  3)查看ps文件:gsview(http://www.cs.wisc.edu/~ghost/gsview/),

  ggv,kghostview

  4)chm文件:archmage(http://archmage.sourceforge.net/),

  chmsee(http://www.gnome-cn.org/software/chmsee/releases/0.9.5),

  Xchm(http://xchm.sourceforge.net/),

  chmviewer(http://sourceforge.net/projects/chmviewer/)

  5)mht文件:ripmime(http://www.pldaniels.com/ripmime/),firefox+MAF插件

  6)图表绘制:dia(http://www.gnome.org/projects/dia/)(等同于visio)

  7).bin虚拟光盘:用bin2iso(http://users.eastlink.ca/~doiron/bin2iso/)

  或bchunk(http://he.fi/bchunk/)转成iso后mount

  8)压缩文件

  .rar:rarforlinux或unrar

  .zip:unzip

  .bz2:bunzip2

  .tar/.tgz:tar

  [中文输入法]

  1)scim(http://www.scim-im.org/)

  2)fcitx(http://www.fcitx.org/main/)

  [网络软件]

  1)QQ:lumaqq(http://lumaqq.linuxsir.org/main/),Gaim+openqplugin

  2)MSN,icq,yahoo:Gaim(http://gaim.sourceforge.net/)

  3)web浏览器:mozilla-firefox,mozilla(http://www.mozilla.com/en-US/),opera

  4)ftp客户端(图形界面):gftp(http://gftp.seul.org/),

  Iglooftp(http://www.iglooftp.com/unix/)

  5)ftp客户端(终端):lftp(http://lftp.yar.ru/),

  ncftp(http://www.ncftp.com/)

  6)ftp服务器:pureftpd,proftpd,

  vsftpd(http://vsftpd.beasts.org/)

  7)http下载(终端):wget(http://www.gnu.org/software/wget/),

  curl(http://curl.haxx.se/),

  prozilla(http://prozilla.genesys.ro/)

  8)bt下载:bittorrent(终端)(http://www.bittorrent.com/download),

  azureus(图形界面)(http://azureus.sourceforge.net/)

  9)email软件(图形界面):KMail,

  thunderbird(http://www.mozilla.com/en-US/),

  sylpheed,evolution,

  operaM2(http://www.opera.com/products/desktop/m2/)

  10)email终端:mutt(http://www.mutt.org/),

  pine(http://www.washington.edu/pine/getpine/pcpine.html),gnus

  11)RSS:liferea(http://liferea.sourceforge.net/),

  aKregator(http://akregator.kde.org/)

  12)BBS:qterm(http://qterm.sourceforge.net/wiki/index.php/Main_Page),

  {rxvt,xterm,gnome-terminal,...}+BBSbot

  [编辑器]

  1)文本:vim,emacs,jedit

  2)16进制:hexedit,ghex,mc

  3)图片浏览:gImageView,gqview(http://gqview.sourceforge.net/)

  4)图片处理:gimp(http://www.gimp.org/),

  ImageMagick(http://www.imagemagick.org/script/index.php)

  5)音频处理:audacity(http://audacity.sourceforge.net/)

6)文本比对:meld(终端输入命令:sudo apt-get install meld)

  [常用工具]

  1)英汉字典:stardict(http://stardict.sourceforge.net/)(屏幕取词,词库大,英汉,汉英,英英)

  dictd(http://www.dict.org/announce.html):英汉汉英可以使用stardict的全部词库

  cdict(http://bbs.uestc.edu.cn/download/):英汉汉英使用安装方便,彩色显示.

  2)科学计算:matlab,octave(http://www.octave.org/)

  3)科学作图:gnuplot(http://www.gnuplot.info/),metapost

  [虚拟机]

  1)win下虚拟linux:cygwin,virtual-pc,colinux

  2)linux下虚拟win:win4lin(http://www.winehq.com/)

  3)跨平台:vmware(http://www.vmware.com/),bochs

  4)linux下运行windows程序:wine,winex,crossoveroffice

  5)console下的中文环境:zhcon(http://zhcon.sourceforge.net/),

  cce(http://www.cce.com.br/)

用Wowza Media Server轉播影片

用Wowza转播视频主要有两种,一种为转播服务器上已经存在的视频进行视频点播,一种为接收视频流进行实时直播。
支持格式: Flash media content (.flv), H.264/ACC media content (.f4v, .mp4, .m4a, .mov, .mp4v, .3gp, .3g2), MP3 content (.mp3)


詳見

2012年3月4日 星期日

目前常用分享按鈕的程式碼

*網址都需要先經過urlencode

1. 分享到Plurk
分享到噗浪

2. facebook like (如果不想要提供一堆資訊給facebook,只要很單純的facebook like button,但是facebook超愛用iframe,這樣的寫法,在apple的行動裝置上都會有問題)


3. facebook like button 進階用法
http://developers.facebook.com/docs/reference/plugins/like

4. 分享到twitter (只是單純的分享,沒有辦法顯示有多少人推)
分享到Twitter

5. 分享到twitter (可以顯示有多少人retweet)
請到 http://tweetmeme.com/ 申請一個帳號,然後將code貼上網頁

6. Google Buzz
請到 http://www.google.com/buzz/stuff 拿貼紙,再將code貼上網頁

詳見