月度归档:2012年09月

编译源代码修改jwplayer Build jwplayer source code

首先checkout jwplayer的源代码
地址:http://developer.longtailvideo.com/svn/trunk/fl5
编译jwplayer需要以下程序
* Flex SDK 4.1: http://sourceforge.net/adobe/flexsdk/wiki/Downloads/
* Ant 1.7.0: http://ant.apache.org/bindownload.cgi
* FlexUnit 4: http://opensource.adobe.com/wiki/display/flexunit/FlexUnit (for testing the player)
环境配置好之后需要修改配置文件
flexsdk = C:/Program Files/Adobe/Adobe Flash Builder 4.5/sdks/4.5.1
windows环境下需要更改execextension
execextension = .exe
根据flash player版本更改flexsdk.target
C:Program FilesAdobeAdobe Flash Builder 4.5sdks4.5.1frameworkslibsplayer10.2
这个是本机的player版本,所以
flexsdk.target = 10.2.0
配置文件修改完成之后就可以用ant来build了
控制台切换到build文件夹运行:ant -buildfile buildbuild.xml
输出:
Buildfile: E:Developmentjwplayersourcebuildbuild.xml
check-properties:
clean-release:
build-release-player:
release-swf:
build-swf:
[exec] ????????????????C:Program FilesAdobeAdobe Flash Builder 4.5sdks4.5.1frameworksflex-config.xml??
[exec] E:Developmentjwplayersourceplayer.swf??112357 ????
BUILD SUCCESSFUL
Total time: 4 seconds
如果你的电脑上装的是64位的java sdk的话,可能会报错
现在开始修改源代码
1、去掉左下角的jwplayer水印
找到com.longtailvideo.jwplayer.view里的View.as
找到protected function setupComponents()里的setupComponent(_logo, n++);注释掉即可
2、修改右键about的菜单项
找到com.longtailvideo.jwplayer.view里的RightclickMenu.as
修改function setAboutText()函数
about = new ContextMenuItem(‘About Sheng00 …’);
修改function aboutHandler(evt:ContextMenuEvent)函数
navigateToURL(new URLRequest(‘http://www.sheng00.com’), ‘_blank’);
 
然后ant -buildfile buildbuild.xml
生成的就是修改过的player了
以下是效果:
 

JW Player goes here




 

How to read VOD files from Amazon S3 on Standalone Wowza Server

From http://www.wmconsulting.info/read-vod-files-amazon-s3-standalone-wowza-server/
 
I’ll explain how to is possible read the files from Amazon S3 Storage but without using a EC2 instance.
For example your “localhost” or your Standalone Wowza server running on your own datacenter.
I did this for working on my local development environment, I’ll describe the steps for a Linux environment.
1- Download from this URL the 2 Jars, and copy this in /lib directories.
[download id=”5″]
[download id=”6″]
2- Create the MediaCache folder:

mkdir /mnt/mediacache

3- Insert into the conf/Server.xml this lines:

<ServerListeners>
<ServerListener>
<BaseClass>com.wowza.wms.plugin.amazonaws.ec2.mediacache.MediaCacheServerListenerAmazonEC2</BaseClass>
</ServerListener>
</ServerListeners>

4- Insert into the conf/vods3/Application.xml (create this first) this lines:

<MediaReader>
<Properties>
<Property>
<Name>randomAccessReaderClass</Name>
<Value>com.wowza.wms.plugin.amazonaws.ec2.mediacache.MediaCacheRandomAccessReaderAmazonEC2</Value>
</Property>
<Property>
<Name>bufferSeekIO</Name>
<Value>true</Value>
<Type>Boolean</Type>
</Property>
</Properties>
</MediaReader>

And in the end of the file, add this properties (I don’t know is needed this for read Public content):

<Properties>
<!-- Set these two properties to do S3 authentication -->
<Property>
<Name>awsAccessKeyId</Name>
<Value>KEY</Value>
</Property>
<Property>
<Name>awsSecretAccessKey</Name>
<Value>KEY</Value>
</Property>
</Properties>

5- Restart the Wowza Server and try reading from S3 Bucket.
The URL can be like this:
rtmp://localhost/vods3/_definst_/mp4:amazons3/wmconsulting.content/Extremists.m4v