1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Streaming Vidoes via website

Discussion in 'HTML, Graphics & Programming' started by Loki, 12 May 2006.

  1. Loki

    Asus Rep

    Joined: 17 Nov 2004

    Posts: 9,811

    Location: The Republic

    Can anyone give any tips or point em in the direction of any tutorials for streaming media via website. Predominantly these will be .mov type files. Propbably be a few movies played in a loop.

    Whats the best way to do this ?
     
  2. Sirrel Squirrel

    Sgarrista

    Joined: 5 Aug 2003

    Posts: 7,786

    Location: Essex

    To play the videos in a loop, you'll probably be better off using wmv videos as you can set up a playlist using a .asx file, although there is probably a way to do it with quicktime files as well but I don't know how. I take it you know how to encode the videos to wmv already.

    Basically to stream the videos you want various bit rates so people can choose what sort of quality and size they want. Streaming the actual video is easy, just add a media player object onto your website where you want the video to play, and set it to the relevant size, if you're using wnidows media player for the media player you need to add on 72px for the height of the player as this is where the controls go.

    To stream all the videos in a loop you will need an asx file, which you can make in notepad, you can copy the code for my asx file, which is

    <asx version="3">
    <entry><ref href = "hqtitle.wmv"/></entry>
    <entry><ref href = "hq_maxpayne.wmv"/></entry>
    </asx>

    My asx file is in the same folder as the videos so I can use the short files names, to add more videos to the playlist, just add extra
    <entry><ref href = "file.wmv"/></entry> lines.

    My .asx file is saved as stream.asx, you then set this as the file to play in your media player, so the media player code on your page will look something like

    Code:
    <embed
          type="application/x-mplayer2"
          pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/MediaPlayer/"
          width="640"
          height="552"
          src="stream.asx"
          FileName="stream.asx"
          autostart="1"
          showcontrols="1"
          showstatusbar="1"
          showdisplay="0"
          autorewind="0"
          PlayCount="1"
          ShowPositionControls="False"
          EnablePositionControls="False"
          EnableTracker="False"
        ></embed>
    The code I've listed is for the high quality stream of this max payne video on my website http://www.mia-media.co.uk/videopage/maxpayne.html so you can have a look through my source as it is on the actual page as well.

    Hope that helps, let me know if you have any more questions.
     
    Last edited: 13 May 2006
  3. JamesU2005

    Mobster

    Joined: 30 Nov 2005

    Posts: 3,040

    Location: London

    Yes wmv is the best format with file size and quality in mind.
     
  4. weescott

    Sgarrista

    Joined: 25 Feb 2004

    Posts: 9,394

    Location: Heckling for change

    Also, check your hosting supports streaming (mms), an alternative is to convert to swf which which can stream and can be a cheaper alternative.
     
  5. blade007

    Wise Guy

    Joined: 16 Jun 2003

    Posts: 1,862

    there was a link on this forum to a site that is like a wmv-o-matic.

    was very good .., I used it to good effect

    can't remember the link, though
     
  6. Sirrel Squirrel

    Sgarrista

    Joined: 5 Aug 2003

    Posts: 7,786

    Location: Essex

    You don't need to have mms, media player will just automatically stream the video file, as you can see if you click the link in my earlier post so see one of my videos.

    Also should of mentioned that you can freely download windows media encoder from Microsoft's website.
     
  7. weescott

    Sgarrista

    Joined: 25 Feb 2004

    Posts: 9,394

    Location: Heckling for change

    true. my bad
     
  8. Loki

    Asus Rep

    Joined: 17 Nov 2004

    Posts: 9,811

    Location: The Republic

    Does converting to .swf format reduce the file size in anyway. ?
     
  9. Sirrel Squirrel

    Sgarrista

    Joined: 5 Aug 2003

    Posts: 7,786

    Location: Essex

    swf normally takes up more space
     
  10. Loki

    Asus Rep

    Joined: 17 Nov 2004

    Posts: 9,811

    Location: The Republic

    can you sepcify quality on .swf format. Also can anyone recommend a reasonably good peice of software to do this with available as shareware or open source

    Loki
     
  11. Sirrel Squirrel

    Sgarrista

    Joined: 5 Aug 2003

    Posts: 7,786

    Location: Essex

    You can specify the bit rate of an swf file, with flash there are actually 2 ways of having a movie, as an swf or as an flv, which is what google video, youtube etc use as you can have media controls like play, forward, back and volume, theres a program that converts movies to flash format called sorenson squeeze and there is a free program out there but can't remember the name, think its in a thread somewhere.