We help IT Professionals succeed at work.

Viewing .mpg movies quickly.

Medium Priority
340 Views
Last Modified: 2010-04-07
I have a 45 second mpg movie that I want people to view on my site.  What is the best way to optimize this movie so people aren't waiting long for it to download?

Thanks,
Dave
Comment
Watch Question

Commented:
Both Google Video and YouTube use Flash Video, if you can convert to FLV that would be the best way for the largest audience to see your movie with minimal initial download.
I converted the mpg to flv and when I test in new browser it loads differently than the mpg.  Before, I had the mpg open in Quicktime in a new browser window.  This isn't happening with the flv file.  What is the best way to show this file to people on the web.  I want them to click on a link and have the movie open in a new browser.

Thanks,
Dave

Commented:
With FLV most people won't have to download anything to view. If you want to make a popup window try this generator:
http://www.javascriptkit.com/popwin/index.shtml
Everytime I put the flv file into the web page a big viewing box appears.  I don't want the box there, I just want a link.  Will this javascript allow me to do this?

Commented:
Yes, if you specify the size of the window you want, and then have the window open an HTML page with an FLV player (see http://www.flvplayer.com/ for players).

For instance I generated this code to open a 400x300 window with google.com as the page. Just put the <script> block into the <head> section, and use the <a> link in the body.
<script type="text/javascript">

//JK Popup Window Script (version 3.0)- By JavaScript Kit (http://www.javascriptkit.com)
//Visit JavaScriptKit.com for free JavaScripts
//This notice must stay intact for legal use

function openpopup(popurl){
var winpops=window.open(popurl,"","width=,height=,status,resizable,width=400px,height=300px")
}
</script>

In the body...

<a href="javascript:openpopup('http://www.google.com')">Click here to open window</a>
Commented:
Sorry about that popup generator link, this one is much better:
http://www.dynamicdrive.com/dynamicindex8/popwin.htm

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts
Sorry about the last response.  It works great.

Thanks a million.
Dave

Commented:
Glad to hear it. Could you please let me know what program you used to create the FLV file, for my own curiosity?
It's called Macromedia Flash 8 Video encoder.  Great program.  Unfortunately, I'm still having problems.

I tried this javascript with a gif animation and it worked great.  However, I just got back to my computer with the .flv file and it's not working.

What I have done:    I have pasted the javascript and now have a link to click.  However, when I click the link, a window opens and asks me to open or save.  When I click open, Flash Player 8 opens and does nothing.  I can't even get the movie to play and I know it works.  The only way I can get the flv file to play is by placing the tv screen like image right on the page.  I do not want this.   Kind of back to square one.  Can you help??

Dave

Commented:
You need to have the FLV load within an SWF, which you can create in flash or try this free player out:
http://www.flashstreamworks.com/flvplayerweb/index.php
Just change the HTML file by replacing "ENTER_YOUR_FLV_FILENAME_HERE" with the path of your FLV file.
That still ends up with a big movie box on my page.  This is what I want below.

Click this video

I want someone to click the above "click this video" text and have the movie open in a new browser.  I can easily do this with my mpg which opens in quicktime but the file is too big.  When I convert the file to a .flv this no longer works.  Why?

Sorry to be monotonous but I am frustrated.

Thanks,
Dave

Commented:
It's understandable; I don't think I'm totally clear on what the problem is. My understanding is: When you say "big movie box" you mean the page navigates away from your current page and displays the movie in the center or top of the browser window. And you want to open a popup window with your movie while keeping the current page in the main browser window.

If that's the case, first of all you can open anything in a new window by adding target="_blank" to any <A> tag, like <a href="http://www.google.com" target="_blank">

Your earlier problem with the browser asking you to "save" or "open" suggests you linked directly to the FLV file. Instead you should link to an HTML page which loads a SWF which loads the FLA. That HTML page can be in a new window of any size with the javascript popup.

If your problem is not what I described, please elaborate.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.