westman Posted October 29, 2012 Share Posted October 29, 2012 hi all,i am trying to get an image and duration from a mp4 file and i found this from google ffmpeg -i Video.mpg Pictures%d.jpg what type of code is it? i tried it in php and html.how do i get my image and duration with ffmpeg? Link to comment Share on other sites More sharing options...
birbal Posted October 29, 2012 Share Posted October 29, 2012 you have to install ffmpeg(google it) and use that command through shell http://php.net/exec. check ffmpeg manual to see the use case of it. Link to comment Share on other sites More sharing options...
westman Posted October 29, 2012 Author Share Posted October 29, 2012 i looked at how to install ffmpeg...http://forums.eukhost.com/f15/how-install-ffmpeg-ffmpeg-php-mplayer-mencoder-flv2tool-lame-mp3-encoder-4893/#.UI58Am_MiV8and i do not understand what file these codes are written in or where in my directory i put all the files i downloadedany help? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 29, 2012 Share Posted October 29, 2012 The ffmpeg library is written in C. On that page you linked to the commands are Linux shell commands to download and install the library and its various dependencies. That requires permission to install software on the server. Link to comment Share on other sites More sharing options...
westman Posted October 29, 2012 Author Share Posted October 29, 2012 so how do i get started to install the ffmpeg library? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 29, 2012 Share Posted October 29, 2012 I suppose the first step is to connect to the server using SSH, and then you run the commands given on that page. Link to comment Share on other sites More sharing options...
westman Posted October 29, 2012 Author Share Posted October 29, 2012 how do i connect to my server using SSH? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 29, 2012 Share Posted October 29, 2012 With an SSH client, like Putty. Link to comment Share on other sites More sharing options...
westman Posted October 29, 2012 Author Share Posted October 29, 2012 ok now how do i connect putty with my site? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 29, 2012 Share Posted October 29, 2012 The same way you would with an FTP client. Give it the server's hostname or IP, connect, and it will ask for your credentials. All of this information is online as well, you don't need to wait for a reply here. Link to comment Share on other sites More sharing options...
westman Posted October 30, 2012 Author Share Posted October 30, 2012 ok am stuck... i open putty enter my site ip adders then click open, then it says... login as: so i enter my ftp username then... login as: usernameUsing keyboard-interactive authentication.Password: and it will not let my type anything what am i doing wrong? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 30, 2012 Share Posted October 30, 2012 You can type whatever you want, it just doesn't show anything when you enter a password. It's still receiving input. Link to comment Share on other sites More sharing options...
westman Posted October 31, 2012 Author Share Posted October 31, 2012 ok i got logged in to putty. What is the next step to install the ffmpeg library? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 31, 2012 Share Posted October 31, 2012 The steps are on the page you linked to. Link to comment Share on other sites More sharing options...
westman Posted October 31, 2012 Author Share Posted October 31, 2012 ok my step by step link is http://forums.eukhost.com/f15/how-install-ffmpeg-ffmpeg-php-mplayer-mencoder-flv2tool-lame-mp3-encoder-4893/#.UJGceW_MiV9 do i upload my ffmpeg files to my server 1st? if so where? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 31, 2012 Share Posted October 31, 2012 The wget commands he shows download files. If you search for those commands that you don't know about you'll see that wget is a command line tool to download a file. The first thing he does is change the directory, then download the files. The first command he shows includes the directory that he's downloading files to. Link to comment Share on other sites More sharing options...
westman Posted November 1, 2012 Author Share Posted November 1, 2012 did i do something wrong? i am getting errors -bash-3.2$ cd /usr/local/src/-bash-3.2$ wget http://www.mplayerhq.hu/MPlayer/rele...061022.tar.bz2--2012-11-01 06:28:17-- http://www.mplayerhq.hu/MPlayer/rele...061022.tar.bz2Resolving www.mplayerhq.hu... 143.248.234.110, 131.246.123.5, 192.190.173.45, ...Connecting to www.mplayerhq.hu|143.248.234.110|:80... connected.HTTP request sent, awaiting response... 404 Not Found2012-11-01 06:28:18 ERROR 404: Not Found. -bash-3.2$ wget rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgz--2012-11-01 06:29:03-- http://rubyforge.org/frs/download.php/9225/flvtool2_1.0.5_rc6.tgzResolving rubyforge.org... 50.56.192.79Connecting to rubyforge.org|50.56.192.79|:80... connected.HTTP request sent, awaiting response... 302 FoundLocation: http://files.rubyforge.vm.bytemark.co.uk/flvtool2/flvtool2_1.0.5_rc6.tgz [following]--2012-11-01 06:29:03-- http://files.rubyforge.vm.bytemark.co.uk/flvtool2/flvtool2_1.0.5_rc6.tgzResolving files.rubyforge.vm.bytemark.co.uk... 80.68.94.54Connecting to files.rubyforge.vm.bytemark.co.uk|80.68.94.54|:80... connected.HTTP request sent, awaiting response... 200 OKLength: 24701 (24K) [application/x-gzip]flvtool2_1.0.5_rc6.tgz: Permission denied Cannot write to `flvtool2_1.0.5_rc6.tgz' (Permission denied).-bash-3.2$ wget easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gz--2012-11-01 06:29:51-- http://easynews.dl.sourceforge.net/sourceforge/lame/lame-3.97.tar.gzResolving easynews.dl.sourceforge.net... failed: Name or service not known.wget: unable to resolve host address `easynews.dl.sourceforge.net'-bash-3.2$ Link to comment Share on other sites More sharing options...
justsomeguy Posted November 1, 2012 Share Posted November 1, 2012 For the first one you have the wrong URL, it has "..." in it which should be something else. The second one says that you don't have permission to save the file. For the third one the URL doesn't work any more. It sounds like those instructions are out of date, but a bigger problem is that you don't have permission to do this on the server. You need to either log in to the server as the root user or use sudo or su. That means you need to be the administrator of the server. Link to comment Share on other sites More sharing options...
westman Posted November 1, 2012 Author Share Posted November 1, 2012 ok i am now the host root user and have accessis there any over step by step instructions or can you help? Link to comment Share on other sites More sharing options...
justsomeguy Posted November 1, 2012 Share Posted November 1, 2012 I would probably follow this guide, for CentOS: http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide I've installed several programs on our servers and it can be difficult to find a good list of instructions or dependencies for a given program. I usually end up doing quite a bit of research to make sure that what I'm doing is going to work and isn't going to break the server. That's just the way things go with Linux when you're trying to install programs that you need to compile. That wiki has instructions to use yum to install various prerequisites, and then shows the commands to install the various dependencies and ffmpeg. Note that the # character is not part of the actual command, it's just there to signify that you need to run those commands as root. Link to comment Share on other sites More sharing options...
westman Posted November 2, 2012 Author Share Posted November 2, 2012 (edited) i am getting more errors i am logged in as the main ftp user from when i bought my hosting -bash-3.2$ yum erase ffmpeg x264 x264-devel-bash: yum: command not found-bash-3.2$ yum install gcc git make nasm pkgconfig wget-bash: yum: command not found-bash-3.2$ mkdir ~/ffmpeg-sourcemkdir: cannot create directory `/var/chroot/home/content/31/9408631/ffmpeg-source': File exists-bash-3.2$ Edited November 2, 2012 by westman Link to comment Share on other sites More sharing options...
westman Posted November 2, 2012 Author Share Posted November 2, 2012 and more... -bash-3.2$ cd ~/ffmpeg-source-bash-3.2$ git clone git://source.ffmpeg.org/ffmpeg-bash: git: command not found-bash-3.2$ cd ffmpeg-bash: cd: ffmpeg: No such file or directory-bash-3.2$ ./configure --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264-bash: ./configure: No such file or directory-bash-3.2$ make-bash: make: command not found-bash-3.2$ what am i doing wrong? Link to comment Share on other sites More sharing options...
thescientist Posted November 2, 2012 Share Posted November 2, 2012 read the error messages i am getting more errors i am logged in as the main ftp user from when i bought my hosting -bash-3.2$ yum erase ffmpeg x264 x264-devel-bash: yum: command not found-bash-3.2$ yum install gcc git make nasm pkgconfig wget-bash: yum: command not found-bash-3.2$ mkdir ~/ffmpeg-sourcemkdir: cannot create directory `/var/chroot/home/content/31/9408631/ffmpeg-source': File exists-bash-3.2$you don't have yum installed on your server and the directory ffmpeg-source already exists in your home folder and more... -bash-3.2$ cd ~/ffmpeg-source-bash-3.2$ git clone git://source.ffmpeg.org/ffmpeg-bash: git: command not found-bash-3.2$ cd ffmpeg-bash: cd: ffmpeg: No such file or directory-bash-3.2$ ./configure --enable-gpl --enable-libmp3lame --enable-libvorbis --enable-libvpx --enable-libx264-bash: ./configure: No such file or directory-bash-3.2$ make-bash: make: command not found-bash-3.2$ what am i doing wrong?you don't have git installed on your server, there is no such file/directory as ffmpeg or configure in the pwd you're in, and make is not installed on your server either Link to comment Share on other sites More sharing options...
westman Posted November 2, 2012 Author Share Posted November 2, 2012 lol i have to install yum and git to install ffmpeg.ok how do i install yum and git? Link to comment Share on other sites More sharing options...
thescientist Posted November 2, 2012 Share Posted November 2, 2012 (edited) have you tried searching for an answer? Google for a little while at least. If you find a reference and get stuck, we'll be more than happy to help. make sure you know what server OS you are using to help narrow your search. I just did this myself for practice on rackspace a couple of weekends ago and most of it was straightforward, but it did take a little searching and some patience. fwiw, I chose CentOS 6.3 and installed Apache/PHP, SQL, git, Java, Tomcat, and FTP. Edited November 2, 2012 by thescientist Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now