Solved

What is the easiest way to embed a MPEG 4 file into a .html web page?

Posted on 2008-10-30
6
744 Views
Last Modified: 2013-12-07
Hello. I am a begginer in web design. I use DW CS3 to do most of my work. I am trying to embed a Quicktime file (MPEG 4) into a .HTML page. I'm skimmed the net and looks like you have to write a Java Script? I'm not very familiar w/ this. Can someone explain how to do this?

Thanks!
0
Comment
Question by:dsmjeff
  • 4
6 Comments
 
LVL 4

Expert Comment

by:DJDecay
ID: 22845584
Use the Quicktime Export for Web feature (You'll need Quicktime PRO)
It will create a webpage with the embedded code you need, into a folder together with your MOV file.
Copy that code into your HTML and you should be set. It will contain player size, URL to the movie etc...
 

<center>

<h2>Movie</h2>
 

<br>

<p>Quicktime Player Required.

<script type="text/javascript"><!--

	QT_WritePoster_XHTML('Click to Play', 'PosterJPEG.jpg',

		'THEMOVIDEFILE.mov',

		'480', '376', '',

		'controller', 'true',

		'autoplay', 'true',

		'bgcolor', 'black',

		'scale', 'aspect');

//-->

</script>

<noscript>

<object width="480" height="376" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab">

	<param name="src" value="PosterJPG.jpg" />

	<param name="href" value="TheRealMovie.mov" />

	<param name="target" value="myself" />

	<param name="controller" value="false" />

	<param name="autoplay" value="false" />

	<param name="scale" value="aspect" />

	<embed width="480" height="376" type="video/quicktime" pluginspage="http://www.apple.com/quicktime/download/"

		src="PosterJPG.jpg"

		href="TheRealMovie.mov"

		target="myself"

		controller="false"

		autoplay="false"

		scale="aspect">

	</embed>

</object>

</noscript>

</center>

</body>

Open in new window

0
 
LVL 4

Expert Comment

by:DJDecay
ID: 22845611
This is the sample code posted. However if you have Quicktime PRO you should be set.
Also make sure if you're serving it via HTTP compress the mp4/H.264 for progressive-download streaming.
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 250 total points
ID: 22846603
A quicktime solution won't work for the majority of people running Mozilla Firefox and many other browsers without any Apple software, or browsers that don't read CLSID class identifiers.  There is not truly cross browser way to EMBED a MPEG file into a web page.  All samples like the above will just be ignored by many browsers.  You can EMBED music and MP3 into web pages, but if you want a truly cross-browser video, you go with FLASH -- and it is not embedded in the page either -- the user has to click to play it.

The reason for this is that web pages are not yet (and pray to God, never will be) FORCED movie players.  If the web ever gets to the stage that a person can FORCE a movie on you without the option of being able to instantly disable it, you can be certain that programmers will write modules to stop this privacy invasion.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 4

Expert Comment

by:DJDecay
ID: 22849866
scrathcyboy: Agreed yes the "zen" way of doing it would be On2 VP6 encode to FLASH Video (Not Even H.264 as it is a High End Target for Flash 9) and a SWF flv player with swfobject.js -  or a button that asks if you want to download the movie in mov format and a plain link.

But we have to know who the audience for this web page is.





0
 

Author Comment

by:dsmjeff
ID: 22849988
The audience is body shop customers.
I was able to get it to work lastnight. I liked the Quicktime idea, but I had worries about those who may not have Quicktime having to go download it. So I played around with Flash and the Flash video encoder. Coverted it to a FLV and inserted it into a already running slide show on my index page. Added the FLV extension to IIS so it would play and now it is working lovely. It is a short little 18 second video clip for halloween. Very neat. Then on slide two, it goes back into the regular JPEG's.

I am interested in learning different ways to do the same thing. But does everyone agree that Flash is the way to go when dealing with video and websites?
Thanks!
0
 
LVL 4

Assisted Solution

by:DJDecay
DJDecay earned 250 total points
ID: 22871883
Yes, flash for video delivery is the standard now and days.

It takes way longer to encode however then other formats, so if you're producing a lot of video clips to put onto a site, than you may need a fast machine or a dedicated encoding machine.

Just make sure you're encoding for the lowest common denominator which is
 
On2 VP6 FLV Codec
http://www.on2.com/
for now, as flash does have H.264 support, however you may want to avoid that for the moment as the target is only FLASH 9.

It comes pre-licensed with many Adobe Applications such as After Effects for example.

Best bet is to install google analytics, it will give you a fair idea of the versions of flash plugins and browsers visiting the site.

There is also nothing wrong with using Windows Media Encoder and Quicklime and offer two versions of the video for download and retention.


0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Viewers will learn key ranges in Sampler to make their sampled instruments sound more realistic Gather samples of various notes and drag them to Key Range panel: Set proper root key for each sample: Select all the samples with Command-A (or Ctrl…
Viewers will learn how to use LFOs to modulate the sound of their Sampler instruments. Click the Modulation tab in Sampler: Choose one (or more) of the three available LFOs, and click the respective button to turn it on: Select a waveform, an LF…

706 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now