Posts tagged wowza
Working with Wowza logs
0
Improve logs management and rotation over linux, combining Log4j and LogRotate.
Modify the log4j.properties for using other Appender:
# Access appender log4j.appender.serverAccess=org.apache.log4j.RollingFileAppender log4j.appender.serverAccess.File=${com.wowza.wms.ConfigHome}/logs/wowzamediaserver_access.log log4j.appender.serverAccess.layout=com.wowza.wms.logging.ECLFPatternLayout log4j.appender.serverAccess.layout.Fields=date,time,tz,x-event,x-category,x-severity,x-status,x-ctx,x-comment,x-vhost,x-app,x-appinst,x-duration,s-ip,s-port,s-uri,c-ip,c-proto,c-referrer,c-user-agent,c-client-id,cs-bytes,sc-bytes,x-stream-id,x-spos,cs-stream-bytes,sc-stream-bytes,x-sname,x-sname-query,x-file-name,x-file-ext,x-file-size,x-file-length,x-suri,x-suri-stem,x-suri-query,cs-uri-stem,cs-uri-query log4j.appender.serverAccess.layout.OutputHeader=true log4j.appender.serverAccess.layout.QuoteFields=false log4j.appender.serverAccess.layout.Delimeter=tab
Create the logrotate configuration file into Centos/RedHat the path is:
nano /etc/logrotate.d/wowza
/usr/local/WowzaMediaServer/logs/*.log { rotate 3 size=512M compress copytruncate missingok }
And the last step is you have very big logs files like is my case, and into one day I can have 2 GB of logs or more, move the log rotate for check every hour instead of every day
mv /etc/cron.daily/logrotate /etc/cron.hourly/
Inspired in this post: http://nicerhttpd.blogspot.com/2008/11/logrotate-and-log4j.html
UPDATE:
Other way to work with Wowza logs, can be using external Jar for rotate the logs by Size and Time, this way if you are running into WinOS or don’t like to use LogRotate for this task can have similar functionality
For more details can check the Wowza Forum post: http://www.wowza.com/forums/content.php?263-Logging-How-to-use-TimeAndSizeRollingAppender
How to know what is happening inside Wowza?
5I have seen into the Blog stats than the most common question is How To Monitor Wowza Media Server… for this reason I’ll start to write a series of Posts about this topic.
In this first post I’ll request your help too, let me know what you would like to know about your Wowza Server.
Currently the information I consider useful, is:
- Concurrent Connection (separated by Protocol - HTTP Cupertino / HTTP Silverlight / RTSP / RTMP)
- MemoryHeap (the memory used by the JVM)
- Version (if you have multiple server,it is difficult remember what version you have installed)
- Bandwidth Traffic (by Vhost, Application or ApplicationInstances)
And here the question… What info would you like to know about Wowza?
Please post into the comment what else you would like to know…
Into the next post, I’ll show examples, graphs and other tips to get this information from the Wowza Server, using JMX protocol.
But here I show a snake peak of the information and the Graph you can have.
How to read VOD files from Amazon S3 on Standalone Wowza Server
10I’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.
wms-plugin-amazonaws.jar (1077)
wms-plugin-mediacache.jar (1083)
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
Tell me is I missing some step or need some extra help.
VOD Demo (Amazon EC2 instance, S3 storage)
0THIS DEMO IS NOT WORKING NOW, Whe are Updating the Server
All this demos are Hosted in a Standalone Instance, and the files are serving from S3 Storage platform.
Demo a 778k (650k video + 128k audio)
[pro-player width='568' height='320' type='rtmp' streamer='rtmp://wms1.wmconsulting.info/vods3/1001/']amazons3/wmconsulting.content/BigBuckCupertinoHi.mov[/pro-player]
Demo a 578k (450k video + 128k audio)
[pro-player width='568' height='320' type='rtmp' autostart='false' streamer='rtmp://wms1.wmconsulting.info/vods3/1001/']amazons3/wmconsulting.content/BigBuckCupertinoMed.mov[/pro-player]
Demo a 328k (200k video + 128k audio)
[pro-player width='560' height='320' type='rtmp' autostart='false' streamer='rtmp://wms1.wmconsulting.info/vods3/1001/']amazons3/wmconsulting.content/BigBuckCupertinoHi.mov[/pro-player]
Demo a 328k (200k video + 128k audio) Tamaño Original
[pro-player width='284' height='160' type='rtmp' autostart='false' streamer='rtmp://wms1.wmconsulting.info/vods3/1001/']amazons3/wmconsulting.content/BigBuckCupertinoLo.mov[/pro-player]
ShoutCast Relay Demo
0Hi,
In this first post I’ll show a demo.
About how can make a relay with Wowza Server from a Shoutcast server.
Demo with JWPlayer
[pro-player width='182' height='120' type='rtmp' fullscreen='false' autostart='false' streamer='rtmpt://ec2.wmconsulting.info/shoutcast']radiostation.stream[/pro-player]
You can improve the user experience, provide a On-line Player in Flash, and running over the port 80 with RTMP protocol, this way don’t have problem with the firewall.
Don’t hesitate to send your feedback or question about that.