3

the subject say it all. I upgraded to Ubuntu 14.10 and for some reason, they took mencoder out of the repos...I need it for a program called universal media server to encode videos to play on my ps3 from my pc. how can I install it on ubuntu 14.10? thanks!

  • I'm not running 14.10 so I hesitate to provide an answer here but you may be able to simply install the 14.04 version mencoder from the .deb file here: http://pkgs.org/download/mencoder Can someone test? – Elder Geek Mar 12 '15 at 15:19
  • 1
    @ElderGeek I tried that: it failed on a couple of dependencies that should be possible to satisfy. To be precise: libavcodec54 (or libavcodec-extra-54), libavformat54, libavutil52 and libswscale2. There is a way around this that I will put into a real answer. – Jos Mar 12 '15 at 15:32
  • I installed mencoder using your advices, but when i try run mencoder i get > mencoder: error while loading shared libraries: libswscale.so.2: cannot open shared object file: No such file or directory I have installed libswscale3 – user1511848 May 23 '15 at 16:05

1 Answers1

5

Step 1: download the Ubuntu 14.04 .deb file from http://pkgs.org/download/mencoder. If you used dpkg at this point to install this, you would run into dependency problems. Specifically, the packages libavcodec54, libavcodec-extra-54, libavformat54, libavutil52 and libswscale2 may not be installed on your system. However, you may have newer packages installed, or there may be newer packages available, that provide the same functionality. Therefore, we are going to modify the .deb file.

Step 2: find out what versions of these packages are already installed on your system:

apt-cache policy libavcodec*

(and likewise for the other packages) will tell you that. If none is installed, but one is available, say libavcodec56 has an installation candidate, install it (sudo apt-get install libavcodec56). Make a note of the version, i.e. the last two digits, of each package. Note, however, that you need either libavcodec54 or libavcodec-extra-54, not both.

Step 3: download a script called videbcontrol. It is available from here. You want to make it executable; and if you don't like vi you may edit the script, find the line that uses vi (line 35 of the current script), and change that to nano or any other preferred editor.

Step 4: run the videbcontrol script against the deb file:

videbcontrol mencoder_1.1+dfsg1_0ubuntu3_amd64.deb

Or whichever deb file you have downloaded. (You may need to specify path names here, but you don't need sudo). This will open the deb's control file. In it you will find a line with "Depends on:" listing the packages that I mentioned in Step 1. Now carefully replace the version numbers with the ones that you have actually installed in Step 2. Closing the editor will save the .deb file als a .modified.deb file.

Step 5: Install the modified .deb file using sudo dpkg -i mencoder[version].modified.deb . Hopefully, all the dependencies will be satisfied at this point.

Incidentally, this is how I installed the nixnote2 beta on my system, with more or less the same dependencies.

Elder Geek
  • 35,476
  • 25
  • 95
  • 181
Jos
  • 28,156
  • 8
  • 82
  • 88
  • Thanks a lot for taking the time to answer my question!! it Worked!! the only problem I had was that if I missed a dependency, when I ran the mencoder deb with the script, I would have to change the version numbers on the ones that I already changed the first time also so it's best to make sure you have everything before you save and exit! now i have the mencoder deb that will work on 14.10! – Christopher Champion Mar 12 '15 at 17:25
  • Yes, I experienced that as well: it is a question of trial and error, and keeping track of what you change to what...Anyway good to see that it worked. Please click the "accept" check mark next to my answer. – Jos Mar 12 '15 at 18:05
  • Nice! Thanks for picking this up and developing a good answer for it! – Elder Geek Mar 12 '15 at 18:42
  • This worked for me as well in Ubuntu 15.04 Desktop AMD64. Thanks. – chest069 Mar 26 '15 at 00:29