Question

How do I display the video file to my web site?

Asked by: logudotcom

My client asked to provide option to display the video file... I need the script to display the video file... then what is the common format video file ... am just wondering like .DAT, .MPEG ... what format should I suggest to my client to add and display in the site... also he wants to run the movie file when it is published to the users...

i will use mysql to store the video file names and actual file will be stored in the site directory ... to be viewed/run on the web page...

#1 what is the common format to display the video file?

#2 what is script to run/display the video file?

please give your suggestions on this.

This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.

Subscribe now for full access to Experts Exchange and get

Instant Access to this Solution

  • Plus...
  • 30 Day FREE access, no risk, no obligation
  • Collaborate with the world's top tech experts
  • Unlimited access to our exclusive solution database
  • Never be left without tech help again

Subscribe Now

Asked On
2008-02-20 at 23:54:58ID23180359
Tags

video display, video format, to play in the site

Topics

PHP Scripting Language

,

JavaScript

,

WebApplications

Participating Experts
4
Points
500
Comments
28

Trusted by hundreds of thousands everyday for fast, accurate and reliable tech support.

  • "The time we save is the biggest benefit of Experts Exchange to Warner Bros. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange." Mike Kapnisakis, Warner Bros.
  • "Our team likes having a resource that is more secure than just using Google and most experts using this service really know their stuff. It's nice to look here first versus using Google." Dayna Sellner, Lockheed Martin
  • "Anytime that I've been stumped with a problem, 9 out of 10 times Experts Exchange has either the accepted solution or an open discussion of the potential solution to the problem." Kenny Red, eBay Inc.

See what Experts Exchange can do for you.

Got a question?

We've got the answer.

Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.

Screenshot of Experts Exchange Knowledgebase

Need individual assistance?

Our experts are ready to help.

If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.

Screenshot of Experts Exchange Knowledgebase

Want to learn from the best?

Read articles from industry experts.

Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.

Screenshot of an Article

Working on a long term project?

Store your work and research.

Save solutions to your questions, answers you’ve discovered through searching plus helpful articles in your personal knowledgebase for easy future access.

Screenshot of Experts Exchange Knowledgebase

Access the answers to your technology questions today.

Subscribe Now

30-day free trial. Register in 60 seconds.

What Makes Experts Exchange Unique?

Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Trusted by the world's most respected brands.

image of each brand's logo

Faithfully serving IT professionals since 1996.

Experts Exchange Logo

Try it out and discover for yourself.

Subscribe Now

30-day free trial. Register in 60 seconds.

Related Solutions

  1. mpeg video no longer displays
    MPEG VERSION OF "GOODTIMES" VIDEO FROM WIN95 CDROM NO LONGER DISPLAYS ON SCREEN. Original installation of WIN95 (OSR2) included an MPEG subfolder of VIDEOS, with MPEG version of "GoodTimes" and some 50's clip... No problem playing them. Tried again more ...
  2. converting vcd(.dat) or mpeg to quicktime(.mov)
    I want to convert a vcd (.dat) file or a mpeg to a quicktime file.How can I do that.
  3. Playing a .dat movie file
    I have been trying to play a .dat video file off a CD and I know that I can use Active Movie to play it because I used it on another computer and it played but when I tried to play it on my computer I got the error message "No combination of filters could be found to ren...
  4. MPEG Video
    i have a dos mpeg video player. iw ant to know how a mpeg file is read and displayed. can this be done in c. if yes how.
  5. dat to avi
    i have a dat file (video cd format). i need to convert it to avi file. how can i do it. thanks

Free Tech Articles

  1. WARNING: 5 Reasons why you should NEVER fix a computer for free.
    It is in our nature to love the puzzle. We are obsessed. The lot of us. We love puzzles. We love the challenge. We thrive on finding the answer. We hate disarray. It bothers us deep in our soul. W...
  2. SCCM OSD Basic troubleshooting
    SCCM 2007 OSD is a fantastic way to deploy operating systems, however, like most things SCCM issues can sometimes be difficult to resolve due to the sheer volume of logs to sift through and the dispe...
  3. Migrate Small Business Server 2003 to Exchange 2010 and Windows 2008 R2
    This guide is intended to provide step by step instructions on how to migrate from Small Business Server 2003 to Windows 2008 R2 with Exchange 2010. For this migration to work you will need the fo...
  4. Create a Win7 Gadget
    This article shows you how to create a simple "Gadget" -- a sort of mini-application supported by Windows 7 and Vista. Gadgets can be dropped anywhere on the desktop to provide instant information, ...
  5. Outlook continually prompting for username and password
    There have been a lot of questions recently regarding Outlook prompting for a username and password whilst using Exchange 2007. There are a few reasons why this would happen and I will try to cover t...
  6. Backup Exchange 2010 Information Store using Windows Backup
    There seems to be quite a lot of confusion around the ability to backup Exchange 2010 using the built in Windows Backup feature. This stems from the omission of this feature prior to Exchange 2007 s...

Cloud Class Webinars

  1. Avoiding Bugs in Microsoft Access
    Alison Balter takes and in-depth look at avoiding bugs in Access. In this webinar you will learn about using the immediate window to debug your applications, invoking the debugger, using breakpoints to troubleshoot, stepping through code, setting the next statement to execute, ...
  2. Top 10 Best New Features in Visio 2010
    Scott Helmers gives live demonstrations of the top 10 new features in Visio 2010. This webinar will teach you how to create compelling diagrams by adding shapes to the page with a single click, linking the shapes in a diagram to data in Excel (or SQL Server, or SharePoint), ...
  3. IT Consultant Business Secrets Revealed
    Michael Munger, Experts Exchange tech pro and IT consultant, pulls back the curtain on his very successful businesses and answers question on every IT consultant and business owner should know about. He shares secrets on what he did to solve the 5 most common problems in IT, ...
  4. Disaster Recovery and Business Continuity
    Quest CTO, Mike Billon, gives an overview of the steps involved in building a dunamic disaster recovery plan. Through case studies and an examination of software/hardware tooles for monitoring and testing, you'll gain a better understandin of where you are, where you want ...
  5. Organize Your Visio Diagrams with Containers and Lists
    Scott Helmers uses cross functional flowcharts, wireframe diagrams, data graphic legends and seating charts to teach you: how to ustilize all three new structured diagram components in Visio 2010, the best practices for organizeing shapes in previous version of Visio, how to organize ...
  6. How to Us Objects, Properties, Events and Methods in Microsoft Access
    Alison Dalter gives an in-depbth look at objects, properties, events and methods in Microsoft Access. In this webinar you will learn about using the object browser, referring to objects, working with properties and methods, working with object variables, understanding the ...

Join the Community

Give a Little. Get a Lot.

Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.

Join the Community

Answers

 

by: logudotcomPosted on 2008-02-21 at 00:18:14ID: 20945898

after go through w3schools.com tutorials... i could see lot of video formats are available ... anyhow i will restrict to display in only windows media player ... so is the below code is ok ...

<object
classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95">
<param
name="FileName"
value="testmovie.wmv" />
</object>

 

by: gawaiPosted on 2008-02-21 at 00:22:50ID: 20945920

first u check from your end. if doest nt work, leave ur comments and code

 

by: logudotcomPosted on 2008-02-21 at 00:31:55ID: 20945942

no... i am asking can i use this code, to have dynamic display on the web page ...for added video files... i need to display dynamically for added files...

my video format may be, "AVI", "MOV"

 

by: Rok-KraljPosted on 2008-02-21 at 00:49:40ID: 20946022

I'm afraid only playable format on the web is .fla.

You must convert avi to fla to play it.

 

by: logudotcomPosted on 2008-02-21 at 01:01:30ID: 20946075

i have seen several pages with displaying "AVI", "MOV" on the html pages...

 

by: Rok-KraljPosted on 2008-02-21 at 01:03:42ID: 20946085

Yes, this is with player plugin:

http://www.w3schools.com/media/media_browservideos.asp

There are written 4 ways to do this...

 

by: Rok-KraljPosted on 2008-02-21 at 01:05:55ID: 20946092

Check which option fits you most and which is good browser supported.

EE: http://www.experts-exchange.com/Web_Development/Miscellaneous/Q_21441674.html

 

by: jk2001Posted on 2008-02-21 at 01:12:14ID: 20946132

There are several competing video formats, and different codecs, but the most popular one now is Flash video, which is .FLV, and it nearly universal on PCs because it runs on Mac, Windows, and 32-bit Linux.

I recently used FFMpeg to encode MPEG-2 video to FLV.  I think the codec I used was H.236 or regular FLV video and MP3 or AAC audio.  Can't recall at this time, but it was pretty basic.

The FLV file isn't enough, though.  You also need to get a Flash video player app, which is a SWF file.  There are dozens of free or shareware ones out there.  You embed this into your page, and give it the URL to the video file.

 

by: simonkinPosted on 2008-02-21 at 01:18:49ID: 20946165

Hi,

jk2001 made a good suggestion in recommending ffmpeg to encode the file from any video format to any video format, I used it to convert .avi and .mpeg files to .swf and then I use the flv player at http://www.jeroenwijering.com/?item=JW_FLV_Media_Player to play the files embedded.

With the flv player there is so much interaction you can make like view full screen, display a screenshot from any frame as the opening image for the video, use xml lists to display videos in a manner similar to what itunes do.

The javascript api is a dream... http://www.jeroenwijering.com/?item=Javascript_interaction

The only problem is ffmpeg is a pain to install

 

by: Rok-KraljPosted on 2008-02-21 at 01:33:24ID: 20946233

I already said that:

>>>I'm afraid only playable format on the web is .fla.
>>>
>>>You must convert avi to fla to play it.


simonkin, ffmpeg is not pain to install: :D

sudo apt-get install ffmpeg


It is more problem you have to call exec() command to transform video.

 

by: Rok-KraljPosted on 2008-02-21 at 01:34:42ID: 20946238

So, to make the last conclusion:

If you are not willing to spend long hours on establishing fla and ffmpeg system, then use plugins and you have work done in minutes.

 

by: logudotcomPosted on 2008-02-21 at 01:47:27ID: 20946283

yes, that what i need to do.. i don't want to spend much time on the web page (like you tube or any other) ... i just want to display the video files and to be played ... that all...

 

by: logudotcomPosted on 2008-02-21 at 02:00:57ID: 20946337

also i cannot ask my client to convert into flash format ... always.. may be these formats possible by him,  .WMI, .AVI, .MOV, MPEG ... so i will use the object id tag to display those...

 

by: logudotcomPosted on 2008-02-21 at 02:22:17ID: 20946402

@ simonkin

how to convert .wmi, .avi, mov, .mpeg  files into .flv format.. so that i can use the flv player ..,

 

by: logudotcomPosted on 2008-02-21 at 02:23:11ID: 20946406

@ Rok-Kralj

your suggest also good ...

 

by: Rok-KraljPosted on 2008-02-21 at 03:16:05ID: 20946591

If you want to convert videos from all other formats, there are requirements:

- Server is on linux
- You are not on a shared host (you must have dedicated server)
- At least 4 GB ram
- At least AMD 2400+ processor


My other solution (with plugins), will work regardless of the server, but you risk it won't work on client.

 

by: logudotcomPosted on 2008-02-21 at 03:19:55ID: 20946607

oh... i don't have those requirement to do  ... it is simple web site to display the minimal video files on the  page...


My other solution (with plugins), will work regardless of the server, but you risk it won't work on client.

>> what do you mean this? could you explain bit please?

 

by: logudotcomPosted on 2008-02-21 at 03:22:02ID: 20946612

i understand that if I use the <OBJECT > tag, I will face the problem in other OS 's...  (i.e it will work on windows... if they have client in the machine)

 

by: Rok-KraljPosted on 2008-02-21 at 05:03:06ID: 20947218

If you don't have these requirements, then just use object tag.

Object tag works on both mac, win and linux... But it is not 100% garenteed it will play.

If you wold be converting here is the list:

1. Upload file
2. Convert file with ffmpeg (you have to have linux, with enough permissions to run php command line - dedicated server or virtual private server)
3. Server file .flv


Oh, and with object tag, uer must have codec to play.

 

by: logudotcomPosted on 2008-02-21 at 08:02:54ID: 20948973

ok..thank you Rok-Kralj... at present i need to use OBJECT tag...

 

by: jk2001Posted on 2008-02-21 at 10:18:50ID: 20950326

Simonkin's link is pretty rad.

If you can go the Linux route, I recommend Ubuntu.  It's easy to install.  You may have to compile the latest ffmpeg from sources, as I did.  I did my encoding on an old 800 Mhz Pentium 3 that was not really being used, and it didn't take too long.  (Don't do it on the web server, because that machine's already hitting the disk a lot, and will slow your encoding, and slow the web-server.)

I found the command line I used to encode a DVD to Flash:
cat FASTING/VIDEO_TS/VTS_01_*.VOB | /usr/local/bin/ffmpeg -i - -f flv -s 320x240 -acodec libmp3lame -ar 22050 -ab 64k fasting.flv

What this does is dump all the .VOB files into ffmpeg, which is told to take input from standard input.  The video is transcoded to FLV with mp3 audio, and "flv" video (which is some proprietary format I guess).  I had to build the latest ffmpeg from sources, though, to get the FLV feature.

If you're really constrained for resources, you might try to find a commercial video-hosting company that will do the conversion for you.  They work like youtube, but are private.   I can't recommend one, but they turn up in web searches.

 

by: logudotcomPosted on 2008-02-21 at 19:34:17ID: 20954329

how to split the points now?

 

by: logudotcomPosted on 2008-02-21 at 23:10:06ID: 31432796

thanks guys

 

by: Rok-KraljPosted on 2008-02-22 at 00:22:52ID: 20955452

@jk, but you still need decicated computer :D

 

by: jk2001Posted on 2008-02-22 at 00:28:16ID: 20955469

@Rok-Kralj, true, but it's always nice to have a Linux box around to warm up the room.

 

by: simonkinPosted on 2008-02-22 at 00:41:08ID: 20955503

ffmpeg can support numerous formats, its just al about getting the right mix for audio and video

here's a sample command to run with exec()

just chnage the formats to suit and you can pass whatever parameters are necessary like frame rate, bitrate, audio codec and lots lots more...

ffmpeg -i video.avi -ar 22050 -ab 32 -f swf -s 320x240 video.swf
ffmpeg -i video.avi -ar 22050 -ab 32 -f fla -s 320x240 video.fla
ffmpeg -i video.avi -ar 22050 -ab 32 -f mov -s 320x240 video.mov
etc...

                                              
1:
2:
3:
4:

Select allOpen in new window

 

by: Rok-KraljPosted on 2008-02-22 at 00:43:36ID: 20955514

Yes, ffmpeg is great, but you have to have linux maschine with enough rights.

20120131-EE-VQP-002

3 Ways to Join

30-Day Free Trial

The Experts

98% positive feedback on 31,087 answers since March 2000. angeliii is a Microsoft Most Valuable Professional for his work with MS SQL Server & Develoment.

He has also proven his knowledge of Visual Basic Programming, PHP Scripting and Oracle Databases.

The Experts

97% positive feedback on 10,752 answers since July 2000. lrmoore has more than 18 years experience in the networking industry.

The six-time Mircosoft MVPs specialties include firewalls, virtual private networking, and network management.

Testimonials

"...and excellent source for support... Kind of like having your very own IT dept." Electriciansnet

Testimonials

"I was apprehensive at signing up at first. However... it has already made my life as an IT administrator much easier." JaCrews

Testimonials

"WOW! You guys have great, active, and knowledgeable people on here." moore50

Business Clients

Business Clients

In the Press

"If you’ve got a question... Experts Exchange can supply an answer.”

In the Press

"...an invaluable aid for both IT professionals and those who require tech support."

In the Press

"where IT professionals provide quick answers on just about any topic"

Business Account Plans

Loading Advertisement...