OT: Web Video - Streaming vs Download b4 playing

will-3 wrote on 9/25/2009, 2:01 PM
If I understand it correctly there are two ways to have video on your website…

1 – Your video downloads completely before starting to play.
2 – Your video starts to play before it has completely downloaded (streaming)

I’m hoping someone will help me get a quick understanding of each of these two methods and how to put either on a web site.

A - Can you put either on your site or does number two require a streaming server?
B - Or is it just the way you encode/render the video and code the web page?
C - If so how should the video be rendered?
D – Can anyone share some code snippets for how to do both ways?

Thanks for any help.

Comments

Erik Olson wrote on 9/26/2009, 10:00 AM
A. Yes, you can do both with straight http.

B. The ability to effectively stream over http is dependent on the encoder and the player. Output from mainconcept mp4 doesn't have the proper indexing (at least with the settings I used) to stream with most players I checked -- they download the entire file before it starts playing. But x264/megui rendered output works great for streaming. A lot of folks now seem to use embedded flash players to render the video, such as the Longtail JW player, which allows .mp4 files to be played with flash.

C. As mentioned above, when I rednered mainconcept mp4, I think I needed to run it through some post-processing script in order to generate the proper metadata for streaming. I tried to dig up the original articles I read about this, but couldn't find them. My solution ultimately was to use x264 via frameserver -- it included the proper metadata. I don't know if the Sony AVC renderer will include the metadata or not.

D. For 1, you can just include a straight a href=foo.mp4 link, like any other file. For 2, you're talking about embedding the video, and this will be player-dependent. For the JW Player referenced above (which is itself installed in the same directory as the videos), I have code that looks like this:


<p id='skagit'>You should see a little video window in this spot. If not, you may need to download Flash 9.</p>

<script type='text/javascript' src='swfobject.js'></script>
<script type='text/javascript'>
var s1 = new SWFObject('player.swf','player','360','225','9');
s1.addParam('allowfullscreen','true');
s1.addParam('allowscriptaccess','always');
s1.addParam('flashvars','file=0908 skagit-lo.mp4');
s1.write('skagit');
</script>
amendegw wrote on 9/26/2009, 10:50 AM
"Output from mainconcept mp4 doesn't have the proper indexing (at least with the settings I used) to stream with most players I checked -- they download the entire file before it starts playing"

I've not had a problem using Silverlight 3 and mainconcept mp4 - see: http://www.jazzythedog.com/jazzyhg21.aspx

It's not straight html, but rather asp.net, but it seems to stream just fine.

...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

dlion wrote on 9/27/2009, 11:40 PM
I use MP4FastStart to make an mp4 file stream, and the JW player to play it.
deusx wrote on 9/28/2009, 4:30 AM
If you want real streaming you need a streaming server setup, you can't just upload to your site.

Replies here are talking about progressive download; file starts playing after a certain % has been downloaded and plays while the rest is being downloaded.

With real streaming you could jump to any point within the file and it will play from there even if the part before it has not been downloaded yet. Progressive download doesn't do that, if that part you try to play is not downloaded it just won't do anything.

But, to me progressive download is the best option, don't really care about streaming, I can only see benefits there if file is really long, too long to download in a reasonable amount of time.
will-3 wrote on 9/28/2009, 6:03 AM
Thanks for the remarks and comments.
1 - Is YouTube "progressive" or "real streaming" ?

2 - Can you render "progressive streaming" from Vegas or must you run your video through "converter software?

3 - Will the latest version of Vegas render to both FLV and F4V? If not do you render to format A from Vegas then use a tool to convert to FLV or F4V? If so what tool?

4 - If we choose "real streaming" at some point who are some of the popular streaming vendors who don't try to "own" or "part-own" your content?

Thanks for the help in catching me up.
Earl_J wrote on 9/28/2009, 6:34 AM
Hello Will,
for some purposes, you might consider those sites that do the Flash conversion for you...
Viddler is one, and I am sure that others exist as well... you upload your .mov, .mpg, or .avi files and the host will convert them to Flash for you before making them available to viewers. I use the term for some purposes only because they usually have limits to the size of the files you may upload - usually between 100 and 500 MB...

Good luck... until that time . . . Earl J.
Laurence wrote on 9/28/2009, 7:34 AM



Not exactly. The two options are streaming or progressive download and they are described http://www.streamingmedia.com/article.asp?id=8456&page=1&c=11here.[/link]

Progressive download is the one you described as "streaming": the video downloads to your hard drive but starts playing after a small amount has downloaded as a buffer.

Streaming never actually downloads to your hard drive. It "streams" data directly to your media player and each bit is thrown away rather than stored after it is played.

Most of the time progressive download is the better option. Streaming is a lot more expensive, requires dedicated "streaming" servers which are paid for by how many streams you want to allow at once. Streaming is good if you want to force an end viewer to watch specific ads or don't want him to be able to save a copy after it is viewed. Streaming can also be set up so that the end viewer can skip ahead.

Progressive download has a number of advantages: Repeated views play back off the local hard drive instead of having to come over the Internet again in their entirety. Progressive download doesn't have to come through at an exact speed. As long as the download is faster than the playback rate, it will seem very smooth. If the download rate is too slow, you can wait a little for the rest of the video to buffer. I personally have never done anything but progressive download as it is much simpler and cheaper.
Coursedesign wrote on 9/28/2009, 9:09 AM
I've been really impressed with Netflix' use of Silverlight streaming.

It works great in every way, simply impressive.

Simple Silverlight tools and services for less geeky users seem to have been a bit slow in the coming.

Anyone here have any recommendations (or alternatives for that matter)?
amendegw wrote on 9/28/2009, 1:55 PM
"I've been really impressed with Netflix' use of Silverlight streaming.

I'm not sure that "straight" Visual Studio is any less Geeky than Silverlight Expression Blend & Expression Encoder, but it's certainly a lot cheaper -- you can get a free version at http://www.asp.net/downloads/essential/

Here's a video showing how simple it is to integrate a Silverlight Mediaplayer into an ASP.NET/Visual Studio project:

http://www.asp.net/learn/3.5-SP1/video-243.aspx

The video is a little dated in that it deals with beta code.

Here's the ASP.NET code for the webpage I referenced above (note the reference to the mp4 file as the mediasource; also notice the error in the way the code block displays the html title tag) :

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="JazzyHG21.aspx.vb" Inherits="JazzyHG21" %>

<%@ Register Assembly="System.Web.Silverlight" Namespace="System.Web.UI.SilverlightControls"
TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
Jazzy the Dog

<script src="js/myJScript.js" type="text/javascript"></script>

</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<div style="width: 1024px; height: 768px; margin: 0 auto; background-color: Gray;
text-align: center;">
<br />
<h2 style="color: #00FFFF;">
Jazzy the Dog[/title]
<br />
<p style="color: white;">
If you see an "Install Microsoft Silverlight" icon, click on it to install the browser
plugin that will allow you to view the video.</p>
<asp:MediaPlayer ID="MediaPlayer1" runat="server" Height="405px" Width="720px" MediaSource="videos/JazzyHD.mp4"
MediaSkinSource="Mediaskins/simple405B.xaml" AutoPlay="true" OnClientMediaEnded="onEnd">
</asp:MediaPlayer>
<p style="color: #FFCC66;">
Double Click anywhere in the image to view fullscreen</p>
</div>
</form>
</body>
</html>


...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

amendegw wrote on 9/28/2009, 3:16 PM
One more thing. In order to take full advantage of Silverlight 3's HD smooth streaming capabilities, your Hosting Service must implement this on IIS. See: http://silverlight.net/getstarted/silverlight3/

...Jerry

System Model:     Alienware M18 R1
System:           Windows 11 Pro
Processor:        13th Gen Intel(R) Core(TM) i9-13980HX, 2200 Mhz, 24 Core(s), 32 Logical Processor(s)

Installed Memory: 64.0 GB
Display Adapter:  NVIDIA GeForce RTX 4090 Laptop GPU (16GB), Nvidia Studio Driver 566.14 Nov 2024
Overclock Off

Display:          1920x1200 240 hertz
Storage (8TB Total):
    OS Drive:       NVMe KIOXIA 4096GB
        Data Drive:     NVMe Samsung SSD 990 PRO 4TB
        Data Drive:     Glyph Blackbox Pro 14TB

Vegas Pro 22 Build 239

Cameras:
Canon R5 Mark II
Canon R3
Sony A9

Coursedesign wrote on 9/29/2009, 3:20 PM
Jerry,

Thanks for this info, much appreciated!

Bjorn