Converting flv and mp4 video format to '.ogg' using FFmpeg

1

I have HostGator VPS server with FFmpeg installed. It allows me to convert .wmv to .flv as well as .mp4 files successfully using the following commands for flv and mp4:

ffmpeg -i WantsABath.wmv -b 600k -r 24 -ar 22050 -ab 96k WantsABath.flv 
ffmpeg -i WantsABath.wmv WantsABath.mp4 

but it won't allow me to convert any file format to .ogg.

I tried using the command:

ffmpeg -i input.mp4 -acodec libvorbis -vcodec libtheora -f ogv output.ogv 

by mondain but no luck with it. I am doubting that my VPS doesn't have libtheora installed. I tried configuring it by using SSH but I don't know how to make sure if it is installed or not. I tried checking with php_info but can't find anything regarding libtheora.

Here's my FFmpeg version:

FFmpeg version SVN-r19795, Copyright (c) 2000-2009 Fabrice Bellard, et al. configuration: --enable-libmp3lame --enable-libvorbis --disable-mmx --enable-shared --prefix=/usr/ --enable-gpl libavutil 50. 3. 0 / 50. 3. 0 libavcodec 52.35. 0 / 52.35. 0 libavformat 52.38. 0 / 52.38. 0 libavdevice 52. 2. 0 / 52. 2. 0 libswscale 0. 7. 1 / 0. 7. 1 This details doean't show libtheor

Can anyone please suggest me something?

user163906

Posted 2012-10-09T08:17:01.997

Reputation: 11

Answers

1

Your configuration string shows --enable-libvorbis, which would allow you to encode to Vorbis audio, however you can't create Theora video nor write to an OGG container.

Also, your version is quite outdated — it's from 2009. Three years is a long time for a tool like FFmpeg, which is constantly developed. Hundreds of bugs have been fixed since then.

You now have the following options:

  1. In your package manager, try to install a newer version if available. That'd be yum install ffmpeg or yum install ffmpeg-devel.

  2. On the FFmpeg download page, you will find links to static builds (like gusari or relaxed), which enable both libtheora and libvorbis as well as several other important ones you are missing, like libx264 (for high quality h.264 video) and libvpx (for WebM).

    Simply download the file, extract the archive, and run the ffmpeg binary with ./ffmpeg instead of the system one. There is no need to ./configure or anything.

  3. Compile FFmpeg yourself, using the right configuration flags. You can find an in-depth guide for compilation under Ubuntu or CentOS, both on the FFmpeg wiki.

slhck

Posted 2012-10-09T08:17:01.997

Reputation: 182 472

to install the new version i have to delete the old one ? – user163906 – 2012-10-10T09:11:23.097

No no, you just download it somewhere, then run the ffmpeg binary, e.g. /home/username/downloads/ffmpeg. You might have to make it executable before with chmod +x ffmpeg. – slhck – 2012-10-10T09:12:44.843

if i write command using my SSH yum install ffmpeg ffmpeg-devel will it help me installing the new verson ? – user163906 – 2012-10-10T09:20:34.830

It depends on what Linux distribution you run. The packages provided by yum will always be outdated – how much depends on your distro and when it was released. But give it a shot and see what you get. If not, you can always use the static builds, which is what I would recommend anyway. – slhck – 2012-10-10T09:23:01.807

min is centos x86_64 should i follow the link http://ffmpeg.org/trac/ffmpeg/wiki/CentosCompilationGuide

– user163906 – 2012-10-10T09:26:26.027

You can compile FFmpeg yourself but you don't have to. Try the yum install ffmpeg ffmpeg-devel and see if it works, if not use the static build instead and be happy with it, and if for whatever reason this doesn't work then try compiling yourself. Please try these options and if they don't work for you let me know.

– slhck – 2012-10-10T09:27:58.510

ok i really appreciate your support ad help by heart i will try them – user163906 – 2012-10-10T09:32:46.733

using the static build ffmpeg.static.64bit.2012-10-10.tar.gz i tried extracting it using SSH, it extracted one file ffmeg but not the folder ffmpeg which is not allowing me to execute ./confiure command – user163906 – 2012-10-10T10:28:56.417

You don't need to configure anything. The static build is just one executable file called ffmpeg. Run it as ./ffmpeg and it'll work without compiling – slhck – 2012-10-10T10:31:11.640

FATAL: kernel too old <br> segmenation fault this is the error it is showing ow – user163906 – 2012-10-10T10:36:03.160

i mainly did is i went to my SSH wget http://ffmpeg.gusari.org/static/64bit/ffmpeg.static.64bit.2012-10-10.tar.gz tar xzvf ffmpeg.static.64bit.2012-10-10.tar.gz and it isgiving the abve error the above commands extracted ffmpg i executed ./ffmpeg

– user163906 – 2012-10-10T10:42:24.887

Well, as the error reads, your VPS' kernel is too old. Your only option will be to install ffmpeg-devel via yum or try and compile it from source. – slhck – 2012-10-10T12:05:24.110

The static builds by burek (gusari.org) support kernel 3.2.x+. The static ffmpeg builds by relaxed support 2.6.26+. Perhaps your kernel will work with those.

– llogan – 2012-10-10T19:53:24.473

i did execute command dl.dropbox.com/u/24633983/ffmpeg/builds/ffmpeg-linux64-20121006.tar.bz2 tar xjvf ffmpeg-linux64-20121006.tar.bz2 ./configure Error appear: no such file or directory exist cd ffmpeg-linux64-20121006 – user163906 – 2012-10-11T09:17:34.310

@user163906 You downloaded a static build. As I already said, you don't need to configure a static build. Simply run the ./ffmpeg binary. – slhck – 2012-10-11T09:21:41.237

should i use the command yum install dl.dropbox.com/u/24633983/ffmpeg/builds/ffmpeg-linux64-20121006.tar.bz2 or wot plz tell me – user163906 – 2012-10-11T09:42:35.293

when i simply use the command ./ffmpeg it gives me the error of kernal too old – user163906 – 2012-10-11T09:44:41.157

@user163906 Well, then your kernel is too old, sorry. Contact your hosting provider to supply you with a more up to date system, or alternatively try to install FFmpeg via yum, or compile it from source as already explained. I cannot help you any further if you don't try the alternatives I suggested multiple times now, sorry. – slhck – 2012-10-11T09:45:32.893

am sorry for being irritated but am doing this very first time thats why trying to understand your instructions and do according to them ... i really appreciate your help and support am highly gratefull for yr assistance ... and do accept my apologies for being stupid ... Thankx – user163906 – 2012-10-11T10:16:16.810

0

You could try my free script from here:

http://gnome-look.org/content/show.php/Audio%2BVideo%2BImage%2BText%2BISO+Convert?content=92533

This does many conversions: multimedia, audio, images, text, and more. Might do exactly what you want. For Linux, tested on Fedora, Ubuntu, Mint, and others.

marc41

Posted 2012-10-09T08:17:01.997

Reputation: 46