How to install old version of ffmpeg?

10,307

Solution 1

According to our commentstorm I'll assume that there is either a regression in libav or a bug in your application that is giving you the "Audio format not supported" message. You can try compiling ffmpeg (from the FFmpeg project, not libav). ffmpeg often works when avconv fails, in my experience. This will create a "local" build of ffmpeg, so it won't interfere with your ffmpeg/avconv from the repository:

sudo apt-get install build-essential yasm
cd
wget -O ffmpeg.tar.gz "http://git.videolan.org/?p=ffmpeg.git;a=snapshot;h=HEAD;sf=tgz"
tar xzvf ffmpeg.tar.gz
cd ffmpeg-HEAD-*
./configure
make

Now try ffmpeg. Note the ./ before ffmpeg, and this example assumes the input file is in your home directory. The output will be placed in your home directory:

cd ~/ffmpeg-HEAD-*
./ffmpeg -i ~/input.mp3 ~/output.wav

If this works you may consider actually replacing libav and installing ffmpeg: How To Compile FFmpeg and x264 on Ubuntu.

Solution 2

Browse through the package archive on http://www.packages.ubuntu.com/.
I found the version you asked for in the Oneiric repisoties.

Just download and install the .deb package and, if needed, its dependencies.

Share:
10,307
user784637
Author by

user784637

Updated on September 18, 2022

Comments

  • user784637
    user784637 over 1 year

    I'm having trouble with the current release of ffmpeg, it transcodes .mp3 to .wavs in a format that is unsupported by my client.

    How can install this version?

    ffmpeg version 0.7.3-4:0.7.3-0ubuntu0.11.10.1, Copyright (c) 2000-2011 the Libav developers
      built on Jan  4 2012 16:08:51 with gcc 4.6.1
    

    EDIT

    The problem I am trying to resolve is transcoding an .mp3 to .wav. Our client has an identification service that determines a song from the .wav. When I pass the .wav that ffmpeg has generated

    exec ("ffmpeg -ss $start -t $duration -i $shellArgSongPath -f wav -ar 44100 somefile.wav");
    

    I receive an "Audio format not supported"

    My guess is that the default codec used to transcode from .mp3 to .wav has changed. Would anyone happen to know what that was in the previous version?

    EDIT

    (Reading database ... 31284 files and directories currently installed.)
    Preparing to replace ffmpeg 4:0.7.3-0ubuntu0.11.10.1 (using ffmpeg_0.7.3-0ubuntu0.11.10.1_amd64.deb) ...
    Unpacking replacement ffmpeg ...
    Replaced by files in installed package libav-tools ...
    dpkg: dependency problems prevent configuration of ffmpeg:
     ffmpeg depends on libavcodec53 (<< 4:0.7.3-99) | libavcodec-extra-53 (<< 4:0.7.3.99); however:
      Version of libavcodec53 on system is 4:0.8.1-0ubuntu1.
      Package libavcodec-extra-53 is not installed.
     ffmpeg depends on libavdevice53 (<< 4:0.7.3-99) | libavdevice-extra-53 (<< 4:0.7.3.99); however:
      Version of libavdevice53 on system is 4:0.8.1-0ubuntu1.
      Package libavdevice-extra-53 is not installed.
     ffmpeg depends on libavfilter2 (<< 4:0.7.3-99) | libavfilter-extra-2 (<< 4:0.7.3.99); however:
      Version of libavfilter2 on system is 4:0.8.1-0ubuntu1.
      Package libavfilter-extra-2 is not installed.
     ffmpeg depends on libavformat53 (<< 4:0.7.3-99) | libavformat-extra-53 (<< 4:0.7.3.99); however:
      Version of libavformat53 on system is 4:0.8.1-0ubuntu1.
      Package libavformat-extra-53 is not installed.
     ffmpeg depends on libavutil51 (<< 4:0.7.3-99) | libavutil-extra-51 (<< 4:0.7.3.99); however:
      Version of libavutil51 on system is 4:0.8.1-0ubuntu1.
      Package libavutil-extra-51 is not installed.
     ffmpeg depends on libpostproc52 (<< 4:0.7.3-99) | libpostproc-extra-52 (<< 4:0.7.3.99); however:
      Version of libpostproc52 on system is 4:0.8.1-0ubuntu1.
      Package libpostproc-extra-52 is not installed.
     ffmpeg depends on libswscale2 (<< 4:0.7.3-99) | libswscale-extra-2 (<< 4:0.7.3.99); however:
      Version of libswscale2 on system is 4:0.8.1-0ubuntu1.
      Package libswscale-extra-2 is not installed.
     libav-tools (4:0.8.1-0ubuntu1) breaks ffmpeg (<< 4:0.8~) and is installed.
      Version of ffmpeg to be configured is 4:0.7.3-0ubuntu0.11.10.1.
    dpkg: error processing ffmpeg (--install):
     dependency problems - leaving unconfigured
    Processing triggers for man-db ...
    Errors were encountered while processing:
     ffmpeg
    

    EDIT Output when I run ffmpeg command from the server that produces the well-formed .wav

    ffmpeg version 0.7.3-4:0.7.3-0ubuntu0.11.10.1, Copyright (c) 2000-2011 the Libav developers
      built on Jan  4 2012 16:08:51 with gcc 4.6.1
      configuration: --extra-version='4:0.7.3-0ubuntu0.11.10.1' --arch=amd64 --prefix=/usr --enable-vdpau --enable-bzlib --enable-libgsm --enable-libschroedinger --enable-libspeex --enable-libtheora --enable-libvorbis --enable-pthreads --enable-zlib --enable-libvpx --enable-runtime-cpudetect --enable-vaapi --enable-gpl --enable-postproc --enable-swscale --enable-x11grab --enable-libdc1394 --enable-shared --disable-static
      libavutil    51.  7. 0 / 51.  7. 0
      libavcodec   53.  6. 0 / 53.  6. 0
      libavformat  53.  3. 0 / 53.  3. 0
      libavdevice  53.  0. 0 / 53.  0. 0
      libavfilter   2.  4. 0 /  2.  4. 0
      libswscale    2.  0. 0 /  2.  0. 0
      libpostproc  52.  0. 0 / 52.  0. 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'
    

    Output from when I run ffmpeg command from server that produces ill-formed .wav

    ffmpeg version 0.8.1-4:0.8.1-0ubuntu1, Copyright (c) 2000-2011 the Libav developers
      built on Mar 22 2012 05:09:06 with gcc 4.6.3
    This program is not developed anymore and is only provided for compatibility. Use avconv instead (see Changelog for the list of incompatible changes).
    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'
    
    • Admin
      Admin almost 12 years
      Please show your command(s) and complete console output(s). Usually issues like this are easier to solve with a command change than reverting to an earlier version; unless you are experiencing an actual regression.
    • Admin
      Admin almost 12 years
      @LordNeckbeard Thanks for the advice, I just revised my post with the help I need
    • Admin
      Admin almost 12 years
      Can you run the ffmpeg command manually as in outside of the script? Can you show the complete console output of the command?
    • Admin
      Admin almost 12 years
      Sure thing, I'll edit my OP
    • Admin
      Admin almost 12 years
      I meant the complete console output that you get after you enter the complete ffmpeg command; not the output of just ffmpeg. Here is an example of what I mean. FFmpeg will output a bunch of information that may be useful in figuring out what the issue is. Do this for both the working and non-working commands if possible.
    • Admin
      Admin almost 12 years
      Here's the output from the good one: pastebin.com/e3W186ta
    • Admin
      Admin almost 12 years
      Here's the output from the bad one: pastebin.com/UJziWmb9
    • Admin
      Admin almost 12 years
      Does it work correctly if you use avconv -i 6.mp3 test.wav? If not then I'll assume there is a bug or regression in libav-tools, and I'd recommend compiling ffmpeg from FFmpeg and I can provide those instructions in an answer.
    • Admin
      Admin almost 12 years
      No it doesn't work, I get the 'Audio format not supported'. Please provide instructions on how I can compile those programs
  • user784637
    user784637 almost 12 years
    Sorry if this sounds stupid, but is this version compatible with 12.04? When I tried installing this on 12.04 I get the following dpkg: error processing ffmpeg (--install): dependency problems - leaving unconfigured Processing triggers for man-db ... Errors were encountered while processing: ffmpeg
  • RobinJ
    RobinJ almost 12 years
    How did you try to install this? Software Centre, Dpkg, Gdebi, ...? Please give the complete output.
  • user784637
    user784637 almost 12 years
    I ran this wget http://security.ubuntu.com/ubuntu/pool/main/liba/libav/ffmpe‌​g_0.7.3-0ubuntu0.11.‌​10.1_amd64.deb, then I ran this dpkg -i ffmpeg_0.7.3-0ubuntu0.11.10.1_amd64.deb I appended the output to my original post. Thanks in advance
  • RobinJ
    RobinJ almost 12 years
    Ok, use Gdebi in stead of Dpkg.
  • user784637
    user784637 almost 12 years
    I tried that and the error Dependency is not satisfiable: libavcodec53 (< 4:0.7.3-99)|libavcodec-extra-53 (< 4:0.7.3.99)
  • RobinJ
    RobinJ almost 12 years
    @user784637 Ok, first install this package then (using Gdebi!) packages.ubuntu.com/oneiric/libavcodec53
  • user784637
    user784637 almost 12 years
    When I tried to install libavcodec I get the following Dependency is not satisfiable: libavutil51 (< 4:0.7.3-99)|libavutil-extra-51 (< 4:0.7.3.99) Thanks much, I'm appreciating it, almost there...
  • RobinJ
    RobinJ almost 12 years
    Do the same for that package. Find it in the oneiric repository. Congratulations, you're now experiencing what they call a dependency hell :p
  • llogan
    llogan almost 12 years
    It's not recommended to install packages from older Ubuntu repositories.
  • RobinJ
    RobinJ almost 12 years
    @LordNeckbeard It's not recommended to install packages for Debian or from PPA's either. But everyone does it all the same. If you know a better way, then feel free to post your way as an answer.
  • llogan
    llogan almost 12 years
    @RobinJ That is my intent as soon as I get enough information from the OP.
  • user784637
    user784637 almost 12 years
    I went through about 10 dependencies and successfully installed the old version of ffmpeg but my .wav files are still being malformed
  • RobinJ
    RobinJ almost 12 years
    @user784637 Then it has nothing to do with the version, which I suspected in the first place. I assumed you had read somewhere it had something to do with the new version, because your question specifically stated that you wanted to install an older version.
  • user784637
    user784637 almost 12 years
    Been compiling for ~15min, will let you know how it turns out. On the other hand mpg123 is producing well-formed .wav files. I posted a question if you don't mind taking a look at it. askubuntu.com/questions/150971/…
  • user784637
    user784637 almost 12 years
    Okay it just finished, I'm still getting 'Audio Format not supported'
  • llogan
    llogan almost 12 years
    Then the issue, if it is due to ffmpeg, may lie in a commit that affects both FFmpeg and libav. What is giving you the message of "Audio Format not supported"? How can someone duplicate this issue?