Play videos from folder on server
Moderator: General Moderators
Play videos from folder on server
Can anyone recommend a way to play videos/audio files? I have looked all over the place, and it seems this is the only place where I can get reasonable answers. I have a website where users can upload videos and audio files to a specific folder. When the user logs on these files are links, and open up in a new window, this is a nuisance considering if the user wants to listen to many songs or watch multiple videos. My question is has anyone come across a a way to fix this. I know there is flash player, but I cant find any resources to tell me how to install!
-
ldougherty
- Forum Contributor
- Posts: 103
- Joined: Sun May 03, 2009 11:39 am
Re: Play videos from folder on server
What type of server is your site hosted on, Windows or Linux and is it a shared or private server? The answer to these questions will let people know what your likely hosting limitations could be.
The best bet generally for speed is to link the audio and video clips as you were stating. If the server has the correct mime types then the files will be opened in the correct application.
For reference you can use our listing of mime types on a Windows server.
http://www.hostmysite.com/support/dedic ... _source=bb
The best bet generally for speed is to link the audio and video clips as you were stating. If the server has the correct mime types then the files will be opened in the correct application.
For reference you can use our listing of mime types on a Windows server.
http://www.hostmysite.com/support/dedic ... _source=bb
Re: Play videos from folder on server
It is a linux server, I dont knwo how to find out if it is shared or private..I am using webhostingpad to host my site.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Play videos from folder on server
Your best bet is to convert the videos to a widely supported supported (and compressed format), such as FLV, during the upload. This can be accomplish with a program such as FFMPEG. From there it is a simple matter of using one of the many freely available flash players.
Re: Play videos from folder on server
How can I do it automatically, on upload.?do I have to add a script? I've considered it, but never understood how to implement it.
- John Cartwright
- Site Admin
- Posts: 11470
- Joined: Tue Dec 23, 2003 2:10 am
- Location: Toronto
- Contact:
Re: Play videos from folder on server
After installing FFMEG and correclty configuring it, you could make an exec() call similiar to
Feel free to read the documentation though.
Code: Select all
exec('ffmpeg -y -i /path/to/original/video.avi -acodec mp3 -f flv /path/to/converted/video.flv');