View Full Version : Streaming Windows Media Video files?


Paul Carlberg
March 2nd, 2006, 06:05 PM
DV folks,

Can anyone tell me if Windows Media files (wmv) have the capability of streaming? I currently use Vegas 6 to render and I can create Quicktime clips that stream fine, however, my wmv files don't. Futhermore, I don't see any options in Vegas to enable such? I have recently setup a website and the local administrator is no help. They tell me I must "embed" my clips or get additional plugins for the Media Player. Ordinarily I would accept this, however, I have uploaded wmv clips to "clipshack.com" and they seem to stream OK. What gives? Thanks!

Paul Carlberg

James Emory
March 3rd, 2006, 06:25 AM
Sometimes the browser also determines if they stream or not. Post some links for us to test.

Paul Carlberg
March 3rd, 2006, 11:01 AM
James,

In Quicktime, video can stream from the server to the browser client automatically. In Windows, the Media Player either (1) fully downloads and plays, or (2) through html coding ("embedding" for example) the streaming initiates. I think I expected the Windows Media Player to behave more like the Quicktime player, which doesn't need html coding to make it stream. Anyhow I have something that works at "highplainsdv.com" -> real estate -> residential.
To get my wmv file to play without fully downloading via the Media Player to the browser, I spawn a separate html page which plays the clip. I could play the clip within the page containing the hyperlink but I think that is ugly. Paul

James Emory
March 3rd, 2006, 11:19 AM
All of my Windows media files do what's called progressive streaming. They load and play while it downloads so you don't have to wait until it's completely downloaded to view it. I don't do anything special but simply have a direct hotlink to the video file. It opens the player and begins to play within 5-10 seconds. I like stand alone players better because I have more control. But, as you prefer, with an embedded player, you can initiate autoplay to start as soon as the page loads but that can sometime create a problem for someone with a slow connection or slow processor. So I like giving the end user the option to click and play the video on demand. I tried your video links and it was very slow, it took about 60 seconds just to buffer to 30% and I gave up.

Christopher Lefchik
March 3rd, 2006, 12:17 PM
The problem with a direct hyperlink to a .wmv file is that if the Web server doesn't have the .wmv MIME type configured, then it can't tell the Web browser to hand the file off directly to Windows Media Player. In that case, the Web browser will fully download the video file before playback starts. This is only a problem with non-IE browsers, as Microsoft (naturally) configured their browser to integrate with Windows Media Player. Embedding the video in a Web page eliminates this problem, but introduces others. So it's a catch-22 situation.

Paul Carlberg
March 3rd, 2006, 01:57 PM
James,

>>I tried your video links and it was very slow, it took about 60 seconds just to buffer to 30% and I gave up.

My appologies. Being new to to video, its an accomplishment for me to just get something on the web. My clip is large (70mb of HD footage) for just 5 minutes! I am experimenting, seeking out the best combinations of capture format, rendering clarity, lower file sizes, and quicker streams, etc.

>>So I like giving the end user the option to click and play the video on demand.

Can you elaborate? This is how my quicktime clips work but not the .wmv's. I was under the impression that distribution of Media Player clips were an either/or situation of fully download -or- instant page load/stream. Paul

James Emory
March 3rd, 2006, 02:51 PM
You ain't kiddn' about it being large for 5 minutes. It is still very slow when buffering. I don't know if it because your server is slow or what but the file size shouldn't matter if it is progressive streaming. Here is your direct video link below. It is taking just as long to view it this way as it is for it to load and view in your embedded player. I'm going to upload the file to my server and link to it to see if it downloads and plays faster. Like all of my streaming media, you should be able to just click on the link below and it should buffer for a few seconds to let the download get ahead of the playback and then it should play. Or you can right click on the link and choose to save it to your drive and then play it.

www.highplainsdv.com/photos/helena.wmv

James Emory
March 3rd, 2006, 04:08 PM
I uploaded that file to my server and then clicked on a link that I made in an e-mail to open and play the file. At first it was slow in downloading and buffering and then it picked up and finally began to play. It was probably 10-20 seconds faster from my server than yours which is not enough to worry about. The file size doesn't matter because this is progressive streaming. It should only take about 5 seconds to cue up and play. I think it is taking longer than similar SD files of that size because of it being HD. Why, I have no idea.

Paul Carlberg
March 3rd, 2006, 05:36 PM
James,

It is interesting to note that the Quicktime player starts streaming _much_ quicker than the W Media player. From my untrained ear, the sound is more "shallow/tinny" than the Media player, but I can work on that. Thanks for your input. It is much appreciated! Paul

Richard Rist
March 4th, 2006, 10:30 AM
Paul,

To "stream" a WMV file it must be placed on a windows media streaming server. A WMV file that is streaming means that you can advance to any point in the file and the stream is adjusted to that point in the media file.

WMV files can also be viewed directly from a web server as a download or progressive download. In this case you can view the WMV once some or all has been downloaded.

Paul Carlberg
March 4th, 2006, 02:17 PM
Richard,

Interesting. Are you saying that to "stream" video, means that even though the entire clip hasn't loaded to the client player, that you can advance the video forward (or backward), thus causing an automatic interrupt-reset in packet flow? Apparently, I have been assuming that "streaming video" is video that doesn't need to fully download before initating playback. I guess you are saying that this behavior is known as "progressive download"? The reason I ask, (aside from clarifying it for myself) is that my web hosting service claims their servers provide "video streaming support", when in actuality they are providing progressive download support. I know that I cannot "artifically" advance server-to-client video playback of my clips ahead of the normal packet flow.
Paul

James Emory
March 4th, 2006, 03:17 PM
Yes, Richard is correct. To truly stream, a video file has to be accessed from a true streaming server. Most typical servers in shared hosting environments or dedicated remote servers like mine are called web servers and not true streaming servers for media. Web servers can only download or progressively download media files. Web servers are sometimes referred to as streaming servers because they can simulate streaming by allowing it to be viewed while it progressively downloads but during that time you can't move the slider until it completely downloads. Streaming servers are kind of expensive and you have to know how to configure them to make them do all of their tricks. One advantage of a true streaming server is that the file is not downloaded so that protects your content from being distributed illegally.

Dan Euritt
March 4th, 2006, 10:15 PM
i set up my own dedicated windows media server, and there are things that it is capable of doing that really muddy the concept of streaming.

in the past, true "streaming" meant that the file had to be cbr only, but somewhere along the line windows server 2003 added capabilities to it's windows media server that give you a very advanced degree of "pseudo-streaming" with vbr-encoded files.

what's relevant to this thread is something known as "fast start bandwith", wherein i can control the initial buffering of the video clip with my windows media server, so that it starts playing sooner... the default setting for that is 3500kbps, which as you might imagine, means that the clip is going to starting playing really quickly, if the player has a good connection to the server.

the wmv player has it's own setting known as "network buffering", that i believe also affects how soon it'll start playing... if you told the player to buffer 40 seconds of the clip instead of the default, it'll take a lot longer to start playing... as i understand it, when i encode wmv with procoder, there is a buffer window setting that defaults to 3000 ms, so that when the player is set for default buffering, it'll start playing after it receives 3000 ms of video.

so i can use vbr encoding to get the best possible picture quality, yet still control how fast the clip starts playing, and the bitrate that i continue to feed the clip at, which is known as the fast cache content delivery rate.

for me, that combo of superior picture quality and fully controllable streaming rates is better that the old-skool definition of being able to stream only cbr files, that won't look as good as vbr encoding does.

another definition of streaming is what transport protocol is used... http is the only choice you have when you put the clip on a regular web server, so it's not streaming at all, but rtsp is what i'm using with the windows media server.

>>>I know that I cannot "artifically" advance server-to-client video playback of my clips ahead of the normal packet flow<<<

i'm not "streaming" in the ultimate sense of the word, but i can drag the slider ahead to any portion of the clip, and it'll start buffering, then play back from that point with little delay.

James Emory
March 5th, 2006, 06:20 AM
It is my understanding that VBR (variable bit rate) encoding was created to use one variable rate file and prevent having to create 2-3 seperate and different data rates (28K, 56K and broadband) for server space saving reasons. That means VBR is an average of the high and low bit rate combined into one which means broadband users are not going to get the full benefit and quality of a fixed broadand CBR (constant bit rate) file encoded at a constant high data rate. Now that broadband is becoming more prevalent, VBR encoding should not be needed much longer.

Dan Euritt
March 6th, 2006, 09:38 PM
i think that what you are referring to there would be multi-bitrate files, which means that there are several versions of the same video clip within one file, but they are encoded at different bitrates, i.e., one stream at 56kbps(for dial-up modems), and one stream at 300kbps(mid-range broadband).

vbr only refers to one stream, but it's confusing, because the bitrate varies within the stream... when picture quality and file size are both important, vbr is the only way to go... the higher bitrate portion of the clip is used for scenes that are tough to encode, while the lower bitrate portion of the clip is used for scenes with things like very little motion, i.e., talking heads.

James Emory
March 6th, 2006, 10:20 PM
No, I'm talking about one file with a variable bit rate because that's one of the advantages of it, one file that can self adjust to different connection speeds instead of 2 or 3 seperate files all with their own constant bit rates. My encoder has the option to encode a single file as a VBR. I always thought any player could do it but a special server like a true streaming server may be needed to adjust the file. I don't know because I've never encoded a VBR because I want broadband users to get the best quality at a constant data rate and dial up will have their own dedicated file however crappy it is which is what they would see anyway with a VBR file because it would adjust down to their connection speed.

Christopher Lefchik
March 7th, 2006, 09:55 AM
I believe multibitrate Windows Media and RealMedia files require their respective streaming servers which measure the connection speed to a client and then feed the correct speed. On the other hand, multibitrate QuickTime files don't, as the QuickTime player installed on the client machine can choose which stream to play.

James Emory
March 7th, 2006, 03:26 PM
I am going to encode a VBR file and see how it performs from my standard webserver with a high speed connection and a dial up connection. I know I should be able to view it with a high speed connection no matter what and if it does scale the bitrate as it should I should also be able to view it on a dial up connection too without having to wait a few days.

Another cool thing that can be done with a true streaming server is indexing Windows Media files. Once you have encoded a file, you can open it in an indexing tool and do anything from making webpages open at an exact point in a video and/or make another audio/video automatically open and begin to play. So, you could actually daisychain a/v files to play indefinitely. Making a web page open during a video presentation would be useful to reference what was being discussed at that exact moment in the video. This is done with a timeline where you set points for it to occur. I was able to use the indexing feature but only on my local machine and not on my standard web server. It's still a cool tool.

Dan Euritt
March 7th, 2006, 06:48 PM
that won't work, james, because vbr files contain only one video stream.

you have to do it like chris outlined, and specify that it's a multi-bitrate file that contains whatever seperate video streams you specify the bitrate for.

go ahead and create your vbr file, then compare it's overall total size with the cbr file you created(same source file, of course)... the vbr file size will be smaller, but the picture quality should be identical, if you used 1-pass encoding on both of 'em.

vbr is better for broadband because the overall file size is smaller, so it downloads quicker.

Richard Rist
March 10th, 2006, 08:42 PM
Just want to confirm that VBR is not the method of having multiple bit rates for high and low speed connections within a single file. There are multiple methods to support different connection speeds. One method is to let the streaming server determine the connection speed and stream the appropriate file or stream within a single file. Another option is to move this decision to the browser code itself, typically using JavaScript the connection can be determined, and then the HTML code requests the appropriate file from the streaming server.

This method can be expanded on - the JavaScript code can also determine what the default media player is and then request connection to the appropriate streaming server. Example: HTML page loads with JavaScript that determines the connection speed is high speed and the default media player is Windows Media Player - the page then requests the high-speed windows media file from the windows media streaming server.

These are methods that make decisions for the viewer versus presenting the viewer with a bunch of questions that they do not understand.

Christopher Lefchik
March 10th, 2006, 09:58 PM
Another option is to move this decision to the browser code itself, typically using JavaScript the connection can be determined, and then the HTML code requests the appropriate file from the streaming server.
Interesting. Would you happen to have a link to a more in-depth explanation of this technique, preferably with some code examples?

Richard Rist
March 11th, 2006, 11:58 AM
Interesting. Would you happen to have a link to a more in-depth explanation of this technique, preferably with some code examples?

Christopher, I use a tool that generates this code as part of the program/page development. I will see if I can find a public source of examples. It is often called "Bandwidth Sniffing" or sniffer code. It is a double-edge sword as it can simplify the viewing experience by making decisions for the viewer (who may not have the knowledge of their environment) but on the other hand it requires the ability to run this code to "sniff" the environment and make decisions. The more "automation" and advanced techniques you put into the HTML page the more likely there will be problems - especially where someone has turned off functionality for security reasons.

Here is a link to a program I just finished that uses this browser-side technique. Clicking on the link will launch an initial page, which invokes the player window with what it has determined about your environment. Based on your environment it will launch one of the following:

* Page with embedded Windows Media Player with a high-speed stream
* Page with embedded Windows Media Player with a lo-speed stream
* Page with embedded Real player with a multi-stream (single file with multiple streams)

http://www.intellor.com/l/?l=851

Dan Euritt
March 11th, 2006, 04:59 PM
nice post richard! couple of questions...

why use the windows media 8 video codec with the newer 9.1 audio codec?

i see flash8 being invoked on that page, but it's not used for the buttons... so my real question is, do you know how to wrap the windows media stream underneath a clickable flash layer, using a flash player interface?

Richard Rist
March 11th, 2006, 05:59 PM
why use the windows media 8 video codec with the newer 9.1 audio codec?

i see flash8 being invoked on that page, but it's not used for the buttons... so my real question is, do you know how to wrap the windows media stream underneath a clickable flash layer, using a flash player interface?

Dan, Good question - I just used the fact that I used media 8 codec to make a point of encoding video for the web being more of an art than science. I typically use the latest codecs and have seen very positive results with the V9 codecs. Unfortunately, the V9 codec had a problem encoding one part of this video (section with text rolling from bottom to the top) - after attempting various adjustments (frame rate, bit rate..) I was unable to get the problem in the encoded video to go away - I tried the V8 codec and it did not have the same problem. I gave up a little overall quality in the video but it seemed to be the only way to get around the problem (and meet a deadline).

As far Flash, the only flash on this program is the "welcome" in the upper tab. As far as your question of a Flash player or the video under a Flash Layer the answer is yes that would be possible - it is possible to tie elements to the timeline of the video. A small example of this is the small tracking graphic at the bottom of the video window - this small gif and its movement is tied to the time line of the video.

Christopher Lefchik
March 11th, 2006, 09:26 PM
The more "automation" and advanced techniques you put into the HTML page the more likely there will be probelms - especially where someone has turned off functionality for security reasons.
Excellent point. And thanks for the link.

Paul Carlberg
March 23rd, 2006, 01:01 PM
Dan, James, Richard, Christopher, etc.,

(my apologies not not letting this thread die...:^)

If I understand correctly, it was stated that variable bit rate encoding produces the best trade off between internet quality playback and file size. As a test, I encoded a variable-rate windows media file (wmv) and placed it on my "progressive streaming" net host server. When I "paused" the clip playback, my video disappeared! Playback resumed only with the audio component. Up to this point I have been rendering at a constant bit-rate which acts normally. Has anyone else noticed this?

In a somewhat similar vein, has anyone looked into setting up a streaming host using Unreal Streaming Technologies Media Server? Not sure about Linux but it enables a Windows host to stream. Also, it seems to be "open-source" for individuals and small businesses, including an SDK for customizing.

Dan Euritt
March 25th, 2006, 03:24 PM
post links for both of the above, so we can check it out.

Paul Carlberg
March 26th, 2006, 12:04 PM
Dan,

Here's the Unreal Media streaming server site.
http://www.umediaserver.net/overview.html

Dan Euritt
March 26th, 2006, 10:38 PM
that's very interesting... as a server, it looks like it's maybe only practical for up to 10 concurrent users, because after that you have to step up to something like windows server 2003, which includes the windows media server for free... you can rent windows server 2003 for only a few dollars more a month than a linux server.

i'd be looking for a user group that supported that server, before using it... i didn't see one listed on the site.

the realmedia server(helix?) is also offered for free, or very cheap, so it would also be worth looking into.