I am trying to present a bunch of WMV videos via the web. Putting the list of file names in an HTML doc allows users to click on one, which will invoke whatever viewer they have on their PC, like the Windows Media Player. That works fine.
However, even tho the videos have been processed to reduce the file size, I don’t wish to reduce them much more if quality is lost. With running times of 1-3 hours, we are stuck with files of 100-500MB each. This takes time to download, although I’ve found that a 256Kb download will stay ahead of the playing so that the show does not have to halt and wait.
But the Windows Media Viewer or the embedded code sample both require the entire file to be downloaded before you can fast forward, rewind, or select a spot to begin playing. The Media viewer allows pause while the download continues, so that’s good; but the embedded code halts downloading if you pause the display – less good.
So what can I do to allow a user to use the data like a VCR and FF/RW at will? Is there a free, simple, easy to install viewer available? Or is there a different HTML or JS coding that will do the same thing?
No, I don’t feel YouTube is the best option, as they degrade the image quality something fierce. Google Video isn’t as bad, but I really don’t need the storage or data thruput capabilities they offer, since my viewers will be infrequent and I have plenty of storage and bandwidth on my server.
Here’s the test site so far. Notice that the first video is shown as embedded video display code, then a link to the same data file. The rest are only links:
The simplest approach is to offer your web users a choice. They can either download the video or attempt to play it as it downloads, depending upon their connection speed and personal preference.
True video streaming is a pain if you don’t have the money and resources to do it properly.
It’s not just a simple matter of providing a browser plug-in or special HTML or JS code; you have to have something on the server side for it to interact with, and even if you did, data transmission over the net still sucks up a lot of time compared to a local file.
OK, so what can I do on the server side? Any code I can handle that way?
Data transmission time is not the factor I’m worried about here, because we just have to live with it. Manipulation of the video stream to skip ahead or back in a file is important.
OK, so let’s assume I’d like to use the Window Streaming Server concept as described in that article. How do I do that?
In the past I have investigated streaming services (specialized companies), and they were prohibitively expensive, partly because they could handle large volumes of users. That isn’t the need in my case.
If I could implement appropriate software on my (shared, remotely-hosted) server, that might do the trick. Is that possible?
YouTube and Google Video relies on HTML code, and doesn’t require installation of any special software on the client’s workstation. Yet they permit the user to FF and rewind, probably because their server is set up to understand the requests. That seems so simple in concept – why can’t I do that? I don’t need super-high-speed, multi-user, streaming-to-the-max functions, just the ability to jump ahead or back.
Or, looking at this from a very low level of code, when the user positions the slider at X, the software sends a request to begin downloading the file at the corresponding X. This is nearly identical to any media player which interfaces with a DVD or hard drive. Not a wild, new concept.
Even though you don’t want YouTube, don’t dismiss your own Flash encoding to get a better quality image than YouTube offers. It’s faster than WMV, and downloads in a streaming fashion by default. Sort of.
The first search will help you find tools to convert your existing movie files into Flash files (.swf). This is what YouTube does when you upload a video to their site. Their converter does behind-the-scenes stuff to your file to make them compatible with their system - you could set your own settings in the converter you choose, meaning you can have any quality you want.
The second search will help you find pre-made Flash movie players, which are most likely pre-made Flash files into which you can add a Flash movie file, or Flash players that incorporate Javascript controls that let you control your swf file.
You may find some free tools or you may have to pay a little bit to get the tools you want. You can also get a free 30-day trial of Flash (that is, the software from Macromedia/Adobe that lets people create Flash files) from Adobe.com that you could use to change the look/feel of the movie player if you want/need to.
That’s really all YouTube does - converts movies to SWF then uses their own player to play the files. You could do it yourself, too, and it doesn’t have to look as bad as YouTube.
Faster to download directly, because the filesize will be considerably smaller, maybe only a third or quarter as big.
If you just upload the file to a regular server, it won’t strictly “stream” in the proper sense like YouTube does (which deliberately “pushes” it to the player at a rapid speed, ahead of the viewing speed) and instead just downloads at a normal download rate.
Which means it may not be seekable (i.e. you can’t click further in the timeline and it will then start downloading and playing from that point on), or scrubbable (you won’t be able to move the slider, and have the video play in realtime speeds as you do so) until it downloads enough. But as it downloads very quickly, there won’t be much waiting for that.
But I admit my experiments in this field are limited and were done a long time ago, so I may be incorrect. I’d say pay more attention to ZipperJJ on this idea.