-1

how to convert video into webm format using ffmpeg and libvpx in centos

I have install ffmpeg and libvpx in centos.but it's doesn't convert mp4 format into webm format. but in windows i have check, it's working fine. what's wrong with my code / installation.how to find that.The code below,

FFMPEG path

/usr/bin/ffmpeg

Convert Code

$cmd1= "$ffmpeg -i $video -c:v libvpx -crf 10 -b:v 1M -c:a libvorbis $webmpath";
    $cmdstr = $cmd1;
    $locale = 'en_IN.UTF-8';
    setlocale(LC_ALL, $locale);
    putenv('LC_ALL='.$locale);
    exec($cmd1);

console output while run ffmpeg command

root@ip-104-238-95-12 [~]# ffmpeg
FFmpeg version 0.6.5, Copyright (c) 2000-2010 the FFmpeg developers
built on Jan 29 2012 17:52:15 with gcc 4.4.5 20110214 (Red Hat 4.4.5-6)
configuration: --prefix=/usr --libdir=/usr/lib64 --shlibdir=/usr/lib64 --mandir=/usr/share/man --incdir=/usr/include --disable-avisynth --extra-cflags='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fPIC' --enable-avfilter --enable-avfilter-lavf --enable-libdc1394 --enable-libdirac --enable-libfaac --enable-libfaad --enable-libfaadbin --enable-libgsm --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-librtmp --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libx264 --enable-gpl --enable-nonfree --enable-postproc --enable-pthreads --enable-shared --enable-swscale --enable-vdpau --enable-version3 --enable-x11grab

  libavutil     50.15. 1 / 50.15. 1

  libavcodec    52.72. 2 / 52.72. 2

  libavformat   52.64. 2 / 52.64. 2

  libavdevice   52. 2. 0 / 52. 2. 0

  libavfilter    1.19. 0 /  1.19. 0

  libswscale     0.11. 0 /  0.11. 0

  libpostproc   51. 2. 0 / 51. 2. 0

Hyper fast Audio and Video encoder
usage: ffmpeg [options] [[infile options] -i infile]... {[outfile options] outfile}...

Use -h to get full help or, even better, run 'man ffmpeg'
root@ip-104-238-95-12 [~]#
0

The ffmpeg version packaged in CentOS is too old to understand some of the options provided.

I'd suggest you to download a more recent version. The easy way is to download the latest static build for your platform, you can find it here: http://johnvansickle.com/ffmpeg/ (choose 32 or 64 bit depending on your arch).

For instance:

$ cd /opt/
$ wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz
$ tar xvf ffmpeg-release-64bit-static.tar.xz
$ ln -s /opt/ffmpeg-2.6.3-64bit-static /opt/ffmpeg

And use /opt/ffmpeg/ffmpeg rather than /usr/bin/ffmpeg.

  • Comments are not for extended discussion; this conversation has been moved to chat. – terdon May 20 '15 at 11:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.