-
FFmpeg Support
I saw that GlowHost is now offering FFmpeg web hosting support. We would like to be able to use streaming video. Currently we are on the 4 Star Budget plan, and wondering if this is available to us and how do we take advantage of it if we are? We currently have a 35MB promotional video on our website (more video's to come) that takes time to download with a dial-up connection (forget about actually playing it off the website!). Broadband connections are much better but the visitor sees choppy play back until the download completes. They must then click on the play button again and everything is OK. FFmpeg sounds like a good solution.
Thanks for any information.
QHF
-
Hello.
Now we provide FFmpeg support of all of our customers, no matter what hosting package is. If you have any problems with it, you just need to open ticket for tech support. We'll definitely help you.:liplick:
-
Thanks for the quick reply. I don't have a problem with FFmpeg because I'm not using it. I just want to know how how to access it. Do I have to open a tech support ticket and request it, or is it available somewhere in cPanel?
QHF
-
The FFmpeg binary is located at /usr/local/bin/ffmpeg if you plan on coding your own software, or, there are some scripts out there that are pre-built that can do the conversions and straming for you. PHPmotion is one such script that comes to mind.
-
Thanks for the information, I'll take a look. I'm not familiar with coding, so some existing script will have to do.
QHF
-
Mat,
I'm in file manager and can't locate the "/usr/local/bin/ffmpeg" path. I have looked in my Home Directory and the Web Directory. is /usr/local/bin/ffmpeg located in some other location?
QHF
-
Its a server module, you cannot access it in your file manager. Your scripts will be able to connect to it however.
-
Listed on the GlowHost features page are several "Pre-installed modules". Does this mean all I need to do is state which one I would like from the selection? Also, how will I add code,
will I be able to cut and past the code to the appropriate spot on my website.
I'm not sure how all this will work, for example;how will I get an mpeg converted to .flv? Does this process happen automatically in the background or is there a conversion process that has to be initiated. Is there a tutorial available?
QHF
-
We don't have any programming tutorials here for FFmpeg though I am sure there are some on the web.
All of those modules play some part in the ability to convert and stream the video.
Typically a script like PHPmotion has all the required components to "talk" to these modules. Essentially, you upload an mpeg through the script, and then on the server-side, the server will perform the necessary conversions to turn the mpeg into .flv and the script will also then embed the video on a page or pages of the script.
I would assume that you can examine the source code of the script and take only the parts you need, for example, the uploader and then the parts of the code responsible for displaying the video.
You would probably need to ask the script vendor how flexible the software is and if it is open source so that they can offer suggestions on how to modify it for your particular needs. Some vendors may even offer to code your site for you if you ask them nicely and the price is right.
PHPMotion may be overkill for your needs but outside of that you would be writing the php code by hand.
-
I want to keep things as simple as possible, so I don't plan on downloading scripts. Mplayer and Mencoder are listed as pre-installed modules, so how would I go about using it?
QHF
-
They to are located in /usr/local/bin/
If you are asking how to code the PHP scripts, I am afraid we cannot offer much information on that as programming is not one of our normal service offerings. I can move this thread to the programming forum and perhaps someone in there will know.
If I come across anything, I will post it for you.
-
I found this when googling:
"how to use ffmpeg in php tutorial"
ONLamp.com -- Creating MyTube with Flex and PHP
I am sure there is a lot more info out there though.
-
Mat, thanks for the info. I'll do some reading and then give it a try and see what happens. I'll keep everyone updated on my progress, or lack their of.
QHF :pray:
-
Advantage?
Matt,
Is there any advantage to use the streamer, rather than converting to .flv here and uploading the flash movie up to my server anyway? Is there a reduction of bandwidth and a retention of quality by using FFmpeg?
CharlesH
-
CharlesH -
Lots of people don't have the software on their PCs to convert the files to .flv because it is spendy. The main idea behind it is it allows any old user on the Internet (read: your site visitors) to upload their mpegs to the website without having to have expensive software on their PCs to perform the conversion.
If you have seen the way youtube and other sites work where any member of the general public can upload content, then you will understand the concepts behind FFmpeg on the server side.
In you case since you and the previous poster probably do not need members of the general public uploading content to your web sites, I would think directly uploading your .flv files and embedding them in your web pages should work fine. I have never tried it that way but I do not see why not.
Maybe you can let us know how it goes :) :) :)
I know that I, for one, am curious.
-
Ah, now that makes perfect sense. Yes, by having people upload video you need a universal converter of sorts - I see the advantage of that now.
I read through the tutorial you gave the link to and looks pretty cool. The problem with movies on websites is, as you mentioned and the tutorial mentions is that bandwidth goes out the roof. It would be cool if you could tell FFmpeg size and quality settings by passing in parameters. I'm sure you can. That, would come in handy. I noticed that youtube does something similar, because their quality is "bandwidth friendly quality".
Charles
-
Well, I've been doing some reading, (additional posts here included - thanks Mat and CharlesH), and this doesn't seem the way to go for us. Am I wrong, or is FFmpeg for visitor's to be able to upload their video(s) to our site? If correct, this is NOT what we want to do and could be a censoring nightmare.
I was trying to avoid purchasing software that creates Flash output so we can buffer and stream video and take advantage of the streaming capabilities here a GlowHost. It looks like we're going to have to spend a few dollars to buy and learn new software. Unless there is a away within FFmpeg to disable or hide the upload features without killing the program. To all you PHP programmers out their, is this possible?
QHF
PS - It's going to be a steep learning curve but I can see that I'm going to have to learn PHP. Does anyone know of any good sources for beginners? I've checked several websites but haven't found one for beginners - the ones I've found so far take it for granted you have some basic understanding of PHP, which I don't, read: Beginner!
-
You can still use FFmpeg just make it so the only one uploading and converting anything is you. That way, you don't have to buy anything expensive.
As far as some good tools to learn PHP, I can certianlt recommend some books, but go to PHP.net and have a look at the echo functiob there are some rally basic type hello world examples and its good to start with the basics. Right now I'm posting from my mobile and will post those suggested books when I get home. Hope that helps.
Charlesh
-
Thanks for the reply. OK, I'm currently in the process of installing (uploading files) for phpmotion and setting up the SQL portion of it. :pray: I'll keep everyone updated; this is going to be interesting.
I will definitely check out PHP.net and any other resources you can recommend. I see your in Wichita, Kansas. I have a very good friend in Derby. Been through your area several times on my way to the west coast and Texas.
QHF
-
Great. My business is in Wichita and we actually live in Derby, just a few miles south. Funny how people here think that Derby is far away from Wichita and we moved here from Roswell, GA, which is about 4 times the distance from Atlanta than Derby is to Wichita.
Here is a great book I would recommend, so is this one and this one. The O'reilley (middle link) has a lot of great basic functions and gives you a good basic overview of the language, so does the first one as well. The other two have a lot of good examples of real-world applications, such as ecommerce, etc.
The best thing about being with Glowhost here is that your server is already set up for you - mySql and PhP. Having a local installation and having gone through trying to get Apache to talk to PHP to talk to MySQL, let me tell you that you've already got a leg up.
start with the basics and look at the examples on the php.net site. Download the php manual from the site as well - it is my primary resource. Another good forum that I use frequently when I get stuck is here. It is called the PHP Developers Network and there are a lot of good developers there to assist and a very good and friendly community like it is here in these forums.
Bottom line is, go write your first script and get a move on!
PHP Code:
<?php
echo "Hello World";
?>
Charles
-
OK, I've done the file uploading as directed in the phpmotion setup document, crated the mysql database and it tested OK. I did the CHMOD settings to folders, files as indicated and up to this point everything looks good. Now the next step as outlined in the setup doc is to open our website http://www.ourdomain/path/path/setup.php. When I do this I get the following error:
Fatal error: phpSHIELD Loader - script was encoded for another version of zend engine in /home/ourdomain/public_html/cgi-bin/classes/config.php on line 2.
When I open the config.php file and look at line 2, there is an extremely long string there that I can't make heads or tails out of. Any help?
QHF
-
PHPmotions chmod instructions are not correct for servers running php as a CGI which is how we run PHP.
All directories need to be 755 and all php files need to be 644
Are you sure your permissions are correct?
-
Mat,
This is what's on the phpmotion setup doc for folder and file permissions and is what I setup. I will change the permissions to what you indicate and let you know the result.
Directories
- uploads 777
- uploads/thumbs 777
- uploads/avi 777
- pictures 777
- cgi-bin 755
- temp 777
- classes 777
- SQL 755
- logs 777
Files
- all the files in cgi-bin 755
- converter.php 777
Are there any other quirks/differences about installing phpmotion? Also, the download of phpmotion came with .php files that were uploaded to /public_html/. I'm assuming all these need their permissions modified, correct?
QHF
-
Thats the only one I have encountered so far. All dirs at 755 and all php at 644. cgi-bin files can remain at 755
-
OK, I guess you reset the permissions because they were all change to your settings, thanks! I'm still getting the following error: Fatal error: phpSHIELD Loader - script was encoded for another version of zend engine in /home/ourdoamin/public_html/cgi-bin/classes/config.php on line 2 when I go through the browser to access the setup.php file, any ideas? I've looked at the config.php file but I'm not sure of what I'm looking at. I must have missed something during the setup but I don't know what, aside from the permissions. I don't understand why the MySQL portions passes the test from the web browser but the setup.php failes with the above error. At this point I'm tempted to remove it all and start over from scratch or just wait until I'm more educated in PHP.
Sorry if I sound frustrated, you have been more than patient and helpfull regarding all my questions.
QHF
-
Please open a help ticket so we can get some of the relevant details like domain name and path to the script so we can see the errors.
-
I'm taking your advice and will open a help ticket. I guess I could use this as a good excuse to sit back a little and take a break! :smash:
-
Mat,
My phpmotion error issue in now resolved. A special thanks to you and especially Sergey who figured out what was wrong. It seems the setup documentation was not clear on several points. Sergey pointed out that php files can't reside in the cgi-bin folder so I created as sub-folder under public_html and moved them there. The mysql test still worked but the setup.php file still failed. When I uploaded the phpmotion files I transferred in ASCII. Sergey point out they should have been uploaded in binary. Segey redid the upload for me and now everything is OK. I just have to actually try to convert an mpeg to flv and test it.
Again, thanks for all your help. If anyone asks about a hosting company, GlowHost will by my recommendation.
QHF (Tony Rodriguez)