jamesxg1 Posted September 10, 2010 Share Posted September 10, 2010 Hiya! Is it possible to play an avi or mpg video file with php? If not is there any other recommeded scripts out there be it jquery, ajax, js ect that will do this? Many thanks, James. Quote Link to comment Share on other sites More sharing options...
schilly Posted September 10, 2010 Share Posted September 10, 2010 What do you want to do? You can have PHP echo out an embed or video tag with all the video info and a video will play. Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted September 10, 2010 Author Share Posted September 10, 2010 Yeah, that's basically all I'm looking for is the avi or mpg to play where I place it. Is this possible then? I don't have ffmpeg, is this a problem? Many thanks, James. Quote Link to comment Share on other sites More sharing options...
schilly Posted September 10, 2010 Share Posted September 10, 2010 Just need the viewer to have the proper video codec. <object CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" width="320" height="256" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab"> <param name="src" value="sample.mov"> <param name="autoplay" value="true"> <param name="loop" value="false"> <param name="controller" value="true"> <embed src="sample.mov" width="320" height="256" autoplay="true" loop="false" controller="true" pluginspage="http://www.apple.com/quicktime/"></embed> </object> Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted September 10, 2010 Author Share Posted September 10, 2010 That's what I was affraid of. LOL! Is there any possible way be it js, ajax, jquery, flash ect thatI could show the view the view regardless of his/her codecs? Many thanks, James. Quote Link to comment Share on other sites More sharing options...
jamesxg1 Posted September 10, 2010 Author Share Posted September 10, 2010 That's what I was affraid of. LOL! Is there any possible way be it js, ajax, jquery, flash ect that I could show the viewer the video regardless of his/her codecs? SORRY FOR THE BAD GRAMMER. Many thanks, James. Quote Link to comment Share on other sites More sharing options...
son.of.the.morning Posted September 10, 2010 Share Posted September 10, 2010 Usually embed sources call out the default media player, if that be the case then to play particular video format (avi) will depend of the users default media player/plug-ins. Quote Link to comment Share on other sites More sharing options...
son.of.the.morning Posted September 10, 2010 Share Posted September 10, 2010 The best way forward when it comes to playing media through a web page is flash!, if you were to to your avi or mpg file and convert it to a .flv file, then find yourself a basic media player tutorial for flash and there you have a fully customized media player.......then just use ya php echo to display your swf embed file containing the video. Why is it you want to use php to display a video? Quote Link to comment Share on other sites More sharing options...
schilly Posted September 10, 2010 Share Posted September 10, 2010 Everything is based on some type of codec. ie. flash, qt, divx, etc. Flash being most popular as almost all browsers have it built in so no codec install required. js, jq or ajax is just a method of outputting the embed code and has nothing to do with playing the actual video. Quote Link to comment Share on other sites More sharing options...
son.of.the.morning Posted September 10, 2010 Share Posted September 10, 2010 Flash is prob the best way or flash video file .flv. Much more browser freindl. Quote Link to comment Share on other sites More sharing options...
beta0x64 Posted September 11, 2010 Share Posted September 11, 2010 Flash is actually slow and plays flv s not avis or mpg. Also you cut out a lot of the mobile market with flash. Just do an embed. The video player is dependent on the user agent. Quote Link to comment Share on other sites More sharing options...
jj20051 Posted September 11, 2010 Share Posted September 11, 2010 Give it a year, HTML5 has support for most video formats so the codex will be built into the browser Its already available on FireFox, Google Chrome and Opera. (IE and Safari need to catch up) Quote Link to comment Share on other sites More sharing options...
schilly Posted September 11, 2010 Share Posted September 11, 2010 Safari supports the video tag. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.