PDA

View Full Version : How to add video and other stuff


Exoskeletor
10-09-2007, 05:35 PM
Aloha guys. how are you?
I would like to ask you some questions guys about adding video to our site. I have find this page: http://www.w3schools.com/media/tryit.asp?filename=trymedia_videoaviobject
Can i use .avi files to play with this way? if yes what about the codec? what if i use divx6 and the user dont have it. He wouldnt be able to see the video?
Also is there any way to change this white player into a black one?

Jittor
10-09-2007, 05:43 PM
I don't recommend using .avi for the web. It's very large and there can be codec problems. I would use either Flash, QuickTime, or Windows Media. Here is a link to a page that will give you the code for those:

http://cit.ucsf.edu/embedmedia/step1.php

Jittor
10-09-2007, 05:44 PM
Also, MPEG Stream Clip is a free program that will convert just about anything into just about anything. Do a google search for it if you want to look it over

Exoskeletor
10-09-2007, 05:55 PM
Thank you. i have paste the code into my page in dreamweaver but when im using test in browser i cant see the video

domedia
10-09-2007, 06:04 PM
What are you pasting?

My car won't work. What's wrong?

Exoskeletor
10-09-2007, 06:06 PM
:). the generated code from the friends link
<!-- begin embedded WindowsMedia file... -->
<table border='0' cellpadding='0' align="left">
<tr><td>
<OBJECT id='mediaPlayer' width="320" height="285"
classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<param name='fileName' value="http://servername/path/to/media.file">
<param name='animationatStart' value='true'>
<param name='transparentatStart' value='true'>
<param name='autoStart' value="true">
<param name='showControls' value="true">
<param name='loop' value="true">
<EMBED type='application/x-mplayer2'
pluginspage='http://microsoft.com/windows/mediaplayer/en/download/'
id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1'
bgcolor='darkblue' showcontrols="true" showtracker='-1'
showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="320" height="285"
src="http://servername/path/to/media.file" autostart="true" designtimesp='5311' loop="true">
</EMBED>
</OBJECT>
</td></tr>
<!-- ...end embedded WindowsMedia file -->
<!-- begin link to launch external media player... -->
<tr><td align='center'>
<a href="http://servername/path/to/media.file" style='font-size: 85%;' target='_blank'>Launch in external player</a>
<!-- ...end link to launch external media player... -->
</td></tr>
</table>
But even the code from this page http://www.w3schools.com/media/tryit.asp?filename=trymedia_videoaviobject doesnt have to show anything if i select for video a file from my pc?

domedia
10-09-2007, 06:42 PM
<param name='fileName' value="http://servername/path/to/media.file">

Read the above line of your code twice. Get it? ;)
What file are you expecting to play? It looks like you just pasted someone elses code without even pointing to your own file. You have to at least have a media file you want to play.

Jittor
10-09-2007, 08:01 PM
Dom is right, you need to tell it where the file is to play.

Exoskeletor
10-09-2007, 09:42 PM
i have change that too but nothing happens. the code from tryit which already has the correct links why it isnt working
With local links it should play?

Jittor
10-09-2007, 09:50 PM
You have to upload it in order to preview it. Are you trying to view it by a browser preview?

Exoskeletor
10-09-2007, 09:51 PM
yeah. ok so this is the problem :)
but why i dont even see the player?

Jittor
10-09-2007, 09:58 PM
Try this code:

<object
classid="CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95"
codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,5,715,8,9,10"
type="application/x-oleobject" width="420" height="380"
standby="Loading Microsoft Windows Media Player components..." id="MediaPlayer">
<param name="FileName" value="http://www.yoursite.com/video_name.wmv" />
<param name="SAMIFilename" value="http://www.yoursite.com/video_name.wmv" />
<param name="AnimationatStart" value="true" />
<param name="TransparentatStart" value="true" />
<param name="AutoStart" value="true" />
<param name="ShowControls" value="1" />
<param name="showstatusbar" value="true" />
<embed
src="http://www.yoursite.com/video_name.wmv"
width="420"
height="380" autostart="true" type="application/x-mplayer2"
pluginspage="http://www.microsoft.com/isapi/redir.dll?prd=windows&sbp=mediaplayer&ar=Media&sba=Plugin&"
showcontrols="1" filename="http://www.yoursite.com/video_name.wmv" samifilename="http://www.yoursite.com/video_name.wmv" animationatstart="true" transparentatstart="true" showstatusbar="true"> </embed>
</object>


There are about 4 place you have to change the code to your link.

Once you put this code into your page click on the gray box and then click on "Parameters" at the bottom of the page. Then change the file name and SAMIFilename to the link to your video then click "OK"

The change the SRC in the propeties panel at the bottom.

Hope that helps.

Jittor
10-09-2007, 09:59 PM
All you will see is a gray box until you upload the page and file.

Exoskeletor
10-09-2007, 10:13 PM
nice its working but is there any way to make the player another colour? my page use black backround and looks kinda strange

Jittor
10-10-2007, 01:47 AM
The new media player is actually black. Try and upgrade your media player to media player 10 and it will change the look of your player online. So, what I am getting at is that player will look like the Windows player that the user has on their computer.

Other than that i don't know how to change the color of the player. i do know that it is called skinning or the skin of the player. Try doing a google or yahoo search for custom windows media player skins.

Jittor
10-10-2007, 01:48 AM
When your finished you should post a link so we can see what it looks like.

Exoskeletor
10-10-2007, 03:57 AM
yeah man, thanx for your help. Is there any other attribute to add a button for full screen? although its not so important

Jittor
10-10-2007, 04:06 AM
The code you used embeds the player so I am pretty sure it can't be expanded.

Exoskeletor
10-10-2007, 01:06 PM
any flash player that support full screen? or any other player
Something more, do i need a special server for my videos? i want to upload them with the site in the same server. am i going to have problems?
Do you have any code for visitor counting?

Exoskeletor
10-10-2007, 01:53 PM
how i can with MPEG Stream Clip to make wmv? it is safe to use mp4 instead or am i going to have problem with the codecs?

Jittor
10-10-2007, 02:36 PM
IF your on a PC windows actually has their own free encoder for turning avi into WMV it's called Windows Media Encoder. It's actually pretty nifty, but limited to just wmv.

Flash can do all sorts of things, but I am not that advanced at Flash. You don't need a special server for video but if you are planning on adding a lot of video you will need a lot of space.

As for the counter - there are all sorts of free code out there for counters. Honestly, back in the day it was cool to add a counter but not it screams amature. If you add one I would add one that only you can see. It's amature because most hosing providers can provide you with some sort of web stats tool that will tell you all sorts of info, like new visitors, most page viewed, and so on. Do a search for free web counters.

Exoskeletor
10-11-2007, 03:09 PM
ok one more silly question. how i can ad a... line in a page? for example when we want to seperate a message from another. it is a noob way to just write __________? :D

domedia
10-11-2007, 03:28 PM
You just hit enter and paragraph tags will be generated

<p>This is a paragraph</p>

Jittor
10-11-2007, 03:48 PM
the paragraph tags <p>text goes here</p> start a new paragraph

the <br /> tag starts a new line.

You should check out some basic HTML site or a book if you want to learn more on the basic HTML coding side, and not just the Design view.

I would have a look at http://www.w3schools.com/ This site will teach you the basics of HTML.

Exoskeletor
10-17-2007, 07:12 AM
Thank you but this is not what i mean. I mean line like this -> _______
One more question. Can i add a simple send me a message form into my site? (Feedback Form) I want guys that don't have e-mail to be able to send me one

(The site is up now. please check it guys at www.igogua.gr (http://www.igogua.gr) and tell me your opinion)

domedia
10-17-2007, 01:54 PM
For margins/padding you need to look into CSS.
We have a tutorial on a contact form on the front of our website.

Exoskeletor
10-17-2007, 02:17 PM
guys i have a problem with some videos. http://www.igogua.gr/Videos.html please go here and try refreshing the page. you should not be able to see all the videos agian. why's that? i have copy paste the code for every video and i have just change the video name for every one

Jittor
10-17-2007, 02:19 PM
sounds like you want just a horazontal bar. try this

<hr />

and check out the tutorial Dom mentioned

Exoskeletor
10-28-2007, 01:36 PM
guys something more:
can i make the contact page when someone send a message, this message to go on the forum instead of a mail?

domedia
10-28-2007, 03:52 PM
Can you make a separate thread in the appropriate forum please so we can keep the integrity of the thread topics? :)