Archive for July, 2005
Up until recently there have been two fairly solid standards adopted for encoding streaming media. These were fuelled by the limitations of the various connection speeds. For a 56k modem, after overheads, it is rare to get more than 40kbps of bandwidth, so files have been encoded at between 34 and 40kbps. To maintain any recognizable video without bad pixelation a resolution of 160×120 pixels become fairly much the standard.
With the advent of ISDN lines slightly higher bit rates were used, but these have pretty much been phased out as ADSL is cheaper and faster.
Until recently most people were using 512kbps ADSL lines, and 300kbps became pretty much the standard encoding rate with a resolution of 320×240. Again this is not necessary and variations of anywhere between 200 and 450kbps can be found as well as wide screen video and various different resolutions.
With the advent of even faster connections now becoming widespread, the next level of encoding is starting to emerge. There are no hard and fast rules, but both Microsoft and Real Networks have suggested that VHS quality video can be created using their encoding techniques at around 800kbps which would suggest a resolution of around 640×480, and the next level of full screen DVD quality at around 2mbps.
My personal recommendation would be to encode at 300kbps 320×240 as a minimum, 800kbps 320×240 where high quality is required, and possible a 2mbit version for very important or paid for content (it is probably still a little early to host a 2mbit stream, but in another year or so costs will come down and connections will go up, and so it is probably worth having the file on stand by to upgrade from a lower quality one!)
July 28th, 2005
There are several factors that will affect the number of people that can watch a live stream. The first and obvious one is dependent upon how much you are prepared to pay.
The number of people that can watch a live stream can be limited to a maximum number of users of your choosing, although for obvious reasons most people do not want to restrict usage. If this is the case then you need to do some planning to make sure that enough servers are configured and bandwidth is made available to fulfil the live event.
Streaming requires relatively little processing power compared to bandwidth and the equipment that we use is capable of pushing out about 400mbps of streams. That equates to over 1000 concurrent broadband streams (at 300kbps) or several thousand 100kbps streams (the rate at which clients connecting with ADSL connections usually use).
The bottleneck is therefore not at the server end, but how it is connected to the Internet, and other events that are sharing the same resources. ISP’s tend to use 100mbps feeds, and most webcasts are only to small numbers, so most people are connected this way and are therefore limited to a maximum of about 300 300kbps streams or 1000 x 100kbps streams. In reality we do not go beyond 75% of these numbers so that network congestion does not occur.
Above that we have to start load-balancing servers in different physical locations or use gigabit feeds. This takes a little more time to set up and configure and has an associated cost for each additional resource that needs to be deployed.
To date the larges webcast that we have done is to a rather well known pop group that had over 3000 concurrent connections.
For reference, probably the largest user of streaming is the BBC’s, who is reputed to serve around 30,000 concurrent streams and has peaked at around 40,000 (at times when war has broken out).
July 27th, 2005
The hardest part of working out how much data transfer you will use streaming your videos is estimating how many people are going to watch your videos. Streaming Wizard is happy to advise on this, and the more information that you can provide, the better estimate we can give. Ideally if you can provide a log file of the website that will be used to display the video, we can look at the usage levels and work out a rough estimate. Often we are told that client x gets 10,000 visitors a month when in fact the get 10,000 hits a month. There is a significant difference normally about a factor of 50, so that will make a huge difference on cost!
Another thing to bear in mind is that not everyone will watch all of your videos, and some will not watch the entirety of a video. If someone only streams half a video, it will only transfer half as much data as the whole video would have done.
The calculation:
For example I am going to calculate how much data transfer will be used if 100 people watch a 5 minute video stream that has been encoded at the traditional broadband rate of 300kbps.
Data transfer per second = 300,000 bits
Data transfer per minute = 300,000 x 60 bits (60 seconds in a minute)
Data transfer for video clip = 300,000 x 60 x 5 bits (5 minute clip)
Data transfer for 100 people watching whole 5 minute clip =
300,000 x 60 x 5 x 100 = 9,000,000,000 bits
Translating that into more meaningful units we get with a little rounding:
9,000,000,000 / 8 = 1,125,000,000 bytes (8 bits in a byte)
1,125,000,000 / 1024 = 1,098,632 Kbytes (1024 bytes in a Kbyte)
1,098,632 / 1024 = 1072 Mbytes (1024 Kbytes in a Mbyte)
1072 /1024 = 1Gbyte (1024Mbytes in a Gbyte)
This is quite a useful result as we see that 1Gb equates to roughly 500 minutes of broadband (300kbps) streaming.
July 26th, 2005
There is often confusion over the difference between bandwidth and data transfer and the way that it is charged for. The best way to explain the difference is by analogy.
Bandwidth is how fast you can get stuff from one place to another. This is a bit like a road network. On a single carriageway you can move one car along the road at a time, in a five lane motorway you can move five cars at a time. When you share a connection with other office members or residents of your street it is like sharing a road, once you have saturated the capacity of the connection or road things start to get congested.
In an ideal world we all want a road to ourselves, and a fast Internet connection that is not shared with anyone else.
Generally residential ADSL has a 50 to 1 contention ratio and offices 20 to 1 contention ratio, which means that many people are all using the same connection. This may sound like a lot, but in reality we only use our connection a small percentage of the time, and so we do not normally experience network congestion because of this.
Data transfer is the actual amount of data that is transferred. Using our road traffic analogy, it is the equivalent to how many cars actually travel along the road from one place to another.
Streaming providers usually measure and charge for data either by bandwidth or data transfer dependent upon the circumstances.
For live streaming events high levels of bandwidth are required for short periods of time. This requires high levels of expenditure on hardware and software, which is redundant for most of the time so costs are relatively high.
On-demand video is normally distributed fairly evenly throughout the working day and requires constant levels of bandwidth, which do not peak very highly. Subsequently it is easier to grow organically on an existing infrastructure deploying new hardware and software only when it is necessary for continuous usage, making it easier to charge for actual data transfer.
July 26th, 2005
Embedding Windows Media Player in a web page can get a bit tricky as you have to use different code for different browsers and versions of the player. In order to cater for all of the different circumstances you will have to write some script to autodetect your browser and player versions. Dependent on the circumstances you can then embed the player using the following snippets of code:
Embedding Windows Media Player version 6 in Internet Explorer
<OBJECT ID=Player WIDTH=320 HEIGHT=240
CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<PARAM NAME="FileName"
VALUE="http://merlin.streamingwizard.com/demo/animationbroadband.wmv">
</OBJECT>
Embedding Windows Media Player versions 7-10 in Internet Explorer
<OBJECT ID=Player WIDTH=320 HEIGHT=240
CLASSID="CLSID:6bf52a52-394a-11d3-b153-00c04f79faa6">
<PARAM NAME=FileName
VALUE="http://merlin.streamingwizard.com/demo/animationbroadband.wmv">
</OBJECT>
Embedding Windows Media Player in NetScape, Firefox or other Mozilla based browsers
<EMBED TYPE="application/x-mplayer2"
SRC="http://merlin.streamingwizard.com/demo/animationbroadband.wmv"
NAME=MediaPlayer
WIDTH=320
HEIGHT=240>
</EMBED>
July 26th, 2005
Previous Posts