ASPENSMONSTER

September 11, 2010

Debian Lenny 64 bit Multimedia Overhaul: ALSA, FFMPEG, x264, VLC 1.0.6, mplayer, Kdenlive, recordmydesktop, VDPAU, VAAPI

Filed under: Uncategorized — Tags: , — aspensmonster @ 4:54 am

flattr this!

  • If you have NO idea how to compile software from source, then I suggest you try out my in-depth guide to compiling VLC here from source first. It can be done solely with repository software. However, I do recommend that once you understand the process of configuring and compiling software from source, you remove that VLC and update your libraries as per this guide. THEN you can recompile VLC.
  • While I try to be as thorough as possible, each system is different. By the time I got around to getting all of this installed and operational, I had gone through countless hours of installing this one piece of software and installing that new updated library and running through synaptic to get that dev header file. It is perfectly possible that the instructions below won’t work line for line; you might have to step in at some point and install missing header files from your package manager to get “./configure” commands to complete. Regardless, the overall Architecture and Process outlined here should be helpful to anyone.

This guide is intended to bring a stable Debian Lenny up to speed with current multimedia capabilities with as little use of non-repository software and libraries as possible. By no means is it possible to achieve the above-mentioned goal with the use of official debian stable repositories alone. Some of the latest libraries need to be installed. Indeed, to limit the amount of custom software that needed to be installed, some of the latest versions of the software were installed alongside the repo versions –In particular, the libx264-60 and libx264-65 (but NOT the -dev version, libx264-dev) libraries. While this is generally inadvisable and really just plain bad practice, I experienced no problem with this strategy myself. VLC 1.0.6 and Kdenlive 0.7.6 both seemed smart enough to pick up and use the versions found in the /usr/local directories as opposed to the other directories where the older versions are. You see, I had already done lots of different things to my box by the time I tried all of this out and finally got it working. Should you happen to be working with a clean install, than you really ought to try NOT mixing library versions at all if you can and just start compiling from source.

The Goals

  • Playback (decoding) and encoding of Full HD video (and SD video).
  • Hardware-accelerated decoding of Full HD video (via VDPAU).
  • Editing of Full HD video (and SD video).
  • Screen capture (including microphone and stereo mix sounds).
  • Recording and editing of audio with standard ALSA drivers (no PulseAudio or Jack).
  • Playback of various media files (VLC media player and mplayer).

Source-compiled Software Needed
i.e., apt-get install or use of Synaptic Package Manager won’t cut it for these pieces.

Program Why?
Latest ffmpeg outstanding encoding and decoding; up-to-date media programs require non-crippled ffmpeg libraries.
Latest x264 The best open-source implementation of the H.264 full HD specification available.
libogg-1.1.4 Contains latest ogg libraries. Needed by kdenlive.
libvorbis-1.2.3 Contains latest vorbis libraries. Needed by kdenlive.
live-555 A broadcasting protocol that VLC can use.
VLC 1.0.6 All-purpose media player.
Mplayer Another outstanding media player that can utilize Nvidia’s VDPAU, which enables hardware-accelerated HD video decoding.
Latest ALSA Drivers Installed so that you can use better sound cards like Creative’s X-Fi series.

Audio Considerations

You may notice that I don’t make use of PulseAudio or Jack. Hell, the audio portion of this guide is pretty damn meager. I didn’t have any trouble installing their latest versions or having VLC, kdenlive, etc recognize them in their respective configurations. However, I’m not a huge audiophile, and have next to no knowledge about how to make the best use of these tools. I don’t understand how to setup and configure them either, but that’s a problem between the chair and the keyboard.

I HAVE heard complaints from many Ubuntu users abut Pulse being buggy and a PITA to get working with all of your applications. So I don’t feel entirely bad about not incorporating it. ALSA works just fine for me, though I’m sure some folks will want to utilize Pulse and/or Jack. If you have trouble with Pulse or Jack, then I suggest this.

However, we are going to make use of updated, open-source audio codecs.

Recommended Installation Timeline
(The guide follows this timeline, top to bottom)

  1. Install latest ALSA drivers [not strictly necessary, but I preferred use of my X-Fi card]
  2. Install latest audio codecs [needed by MLT rendering engine for kdenlive]
  3. Install latest theora codec [needed by MLT rendering engine for kdenlive]
  4. Install libva-0.31.0-sds4 [for use with hardware accelerated decoding of hd video]
  5. Install vdpau-video-0.6.9 [for use with hardware accelerated decoding of hd video]
  6. Install x264 [used extensively by ffmpeg]
  7. Install ffmpeg [needed by kdenlive; a powerful media tool in and of itself]
  8. Install VLC 1.0.6 [all-purpose media player]
  9. Install latest mplayer [can utilize Nvidia's "VDPAU," which enables hardware-accelerated HD decoding.]
  10. Install Kdenlive [promising video editor for linux]

My /etc/apt/sources.list file
CAUTION

Just as a note, the listing for “emerald” (tuxfamily) is not necessary for this guide. I DO use some of the updated software in the backports repository (updated gcc, git-core, etc) , but I doubt it is strictly necessary for the purposes of this guide.

deb cdrom:[Debian GNU/Linux 5.0.4 _Lenny_ - Official amd64 CD Binary-1 20100131-21:33]/ lenny main

deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

#for flash
deb http://www.backports.org/debian lenny-backports main contrib non-free

#for emerald
deb http://download.tuxfamily.org/shames/debian-lenny/desktopfx/unstable/ ./

#for dvd stuff and other multimedia
deb http://www.debian-multimedia.org lenny main non-free

Removal of packaged software; Mixed Library Musings
CAUTION
Be sure to remove the “x264″ and “ffmpeg” packages from your system:

#apt-get remove x264 ffmpeg libx264-dev

As for other libraries, I found that “libx264-60″ and “libx264-65″ were necessary in order to permit packaged install of many of Kdenlive and VLC’s dependencies (such as the freior plugins and dvgrab). I don’t know how adverse an affect this has on the overall media integrity of the system, but I could not notice any significant disadvantages to permitting packages like dvgrab and freior to stay at older releases that use the older x264 shared libraries. So long as I removed the “x264″ and “ffmpeg” packages themselves –the main executables– the updated, source-compiled versions always grabbed the latest libraries they could find when I would check with the command

$ldd /usr/local/bin/ffmpeg

All of the newer libraries (ogg, vorbis, and all the other libs that ffmpeg itself installs) were all properly linked here. And seeing as this is what kdenlive calls to do the encoding and decoding and transcoding, I’m positive that the latest versions of the libraries are being used when cutting the HD video.

Finally, running a mixed install like this is always a bit messy. If there are ever problems, then the libraries are a good spot to check. Which libraries are the problem program using? Are they the right libraries? Etc, etc, etc… In my experience, all of the source-compiled libraries and programs put files in the /local/ directories. This is confirmed with the above “ldd” command.

32-bit compatibility libraries
CAUTION

I don’t know whether or not any of the software or dependencies need 32-bit support. I’d imagine at least a few do, so it’s probably a good idea to install the 32-bit compatibilities:

# apt-get install ia32-libs ia32-libs-gtk ia32-libs-libcurl3 ia32-libs-idn11 ia32-libs-libnspr4 ia32-libs-libnss3 ia32-libs-libssh2 ia32-libs-xulrunner lib32nss-mdns

Part 1: Installation of latest ALSA drivers

The three pieces you absolutely need to download and install are:

  • alsa-driver
  • alsa-lib
  • alsa-utils

You can download their latest versions (1.0.23 as of July 27 2010) here:

http://www.alsa-project.org/main/index.php/Download

Compiling

First install the “alsa-driver” :

:~$ cd alsa-driver-directory
:~$ ./configure
:~$ make
:~# make install

Repeat the process with the libraries, and then the utilities:

:~$ cd alsa-libs-directory
:~$ ./configure
:~$ make
:~# make install

and

:~$ cd alsa-utils-directory
:~$ ./configure
:~$ make
:~# make install

Loading the modules

At this point, the code is all in place. However, it isn’t loaded into the kernel. Do that now:

:~# modprobe snd-pcm-oss
:~# modprobe snd-mixer-oss
:~# modprobe snd-seq-oss

You can check to see what modules are installed by running the command

:~$ lsmod

The sound modules are preceeded by “snd” in the names. Here is an excerpt from my machine:

snd_hda_codec_analog    66120  1 
snd_hda_intel          18435  1 
snd_hda_codec          65180  2 snd_hda_codec_analog,snd_hda_intel
snd_hwdep               5252  1 snd_hda_codec
snd_seq_dummy           1359  0 
snd_ctxfi              74885  1 
snd_seq_oss            23509  0 
snd_pcm_oss            32915  0 
snd_mixer_oss          13534  1 snd_pcm_oss
snd_seq_midi            4128  0 
snd_rawmidi            15425  1 snd_seq_midi
snd_pcm                60577  5 snd_hda_intel,snd_hda_codec,snd_ctxfi,snd_pcm_oss
snd_seq_midi_event      4628  2 snd_seq_oss,snd_seq_midi
snd_seq                41333  6 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_seq_midi_event
snd_timer              15630  2 snd_pcm,snd_seq
snd_seq_device          4717  5 snd_seq_dummy,snd_seq_oss,snd_seq_midi,snd_rawmidi,snd_seq
snd                    46118  18 snd_hda_codec_analog,snd_hda_intel,snd_hda_codec,snd_hwdep,snd_seq_dummy,snd_ctxfi,snd_seq_oss,snd_pcm_oss,snd_mixer_oss,snd_seq_midi,snd_rawmidi,snd_pcm,snd_seq,snd_timer,snd_seq_device

Running alsaconf and getting Creative X-Fi Working

Hopefully, a simple running of “alsaconf” followed by a reboot will do the trick for you:

:~# alsaconf

However, I had problems. I have the standard intel sound (snd-hda-intel), but wanted to use ALSA’s Creative Technologies X-Fi (snd-ctxfi) module so that I could use my X-Fi soundcard instead. I ended up having to load the module manually:

:~# modprobe snd-ctxfi

I then ran alsaconf a second time, rebooted, and all was still a clusterfuck. The kernel kept loading intels sound by default. Turns out I had to modify some files. The first was “/etc/modprobe.d/sound”

:~# nano /etc/modprobe.d/sound

It is possible that this file doesn’t exist. That’s fine. When you run “nano” Just be sure it has the two following pieces in it:

alias snd-card-0 snd-ctxfi
alias sound-slot-0 snd-ctxfi

Hit F3, then Enter, and it should be saved.

Strictly speaking, I’m not sure if this is all that was needed in order to get the X-Fi sound card working. However, upon rebooting, loading the “snd-ctxfi” module, running alsaconf, and then rebooting again, I had sound. As well, I noticed that I could modify the “/etc/modprobe.d/alsa-base” file to better suit my particular flavor of intel’s HDA sound (It is, after all, extremely generic.) I have SPDIF on my mobo and 5.1 surround. The technical model specification is “ALC882/885″ and the model name given by alsa is “6stack-dig”. You can take a look here for a better idea of what specific model name to use:

http://wiki.sabayon.org/index.php?title=HOWTO:_Resolve_Problems_with_HDA-Intel_Sound_Cards

If you want to try this out, the edit the alsa-base file:

:~$ nano /etc/modprobe.d/alsa-base

And add your specific model:

options snd-hda-intel model=6stack-dig

Conclusion

The following timeline has a decent chance of working for getting Creative X-Fi cards working:

  1. Install the latest alsa libraries
  2. Load their modules : “modprobe snd-pcm-oss” etc etc
  3. Load creative’s x-fi module: “modprobe snd-ctxfi”
  4. Modify the “/etc/modprobe.d/sound” file to make sure the X-Fi card takes priority.
  5. Reboot
  6. Run “alsaconf”
  7. Reboot
  8. Sound should work

Troubleshooting

To be honest, the interwebs will be your bestest friend when trying to resolve sound issues with your particular amalgam of sound card, motherboard, kernel, and other hardware/software issues. However, a few good links to look at are:

http://wiki.sabayon.org/index.php?title=HOWTO:_Resolve_Problems_with_HDA-Intel_Sound_Cards ; This link lists lots of Intel HDA model names.

https://help.ubuntu.com/community/HdaIntelSoundHowto ; This is a very useful Ubuntu helpfile for getting HDA working.

http://ubuntuforums.org/showthread.php?t=205449 ; an OUTSTANDING –perhaps a little dated, but still applicable– general-purpose troubleshooting guide for sound on linux systems. Look towards the last pages of the thread for more recent hacks that might be of assistance to you.

Part 2: Installation of audio libraries ; libogg ; libvorbis

I didn’t have any trouble here. It was as simple as configure, make, and make install. I needed these for VLC and ffmpeg. I installed “libogg-1.1.4″ and “libvorbis-1.2.3″. As of now, the latest stable versions are “libogg-1.2.0″ and “libvorbis-1.3.1″. I do not think you will have issues using the latest.

libogg-1.2.0

Download from here:

http://www.xiph.org/downloads/

Then do the following:

:~$ cd /path/to/libogg-1.2.0
:~$ ./configure
:~$ make
:~# make install

If the configure fails, just use Synaptic to download any missing development header files.

libvorbis-1.3.1

Download from here:

http://www.xiph.org/downloads/

Same as above:

:~$ cd /path/to/libvorbis-1.3.1
:~$ ./configure
:~$ make
:~# make install

If the configure fails, then again, just install missing dev header files from Synaptic.

mp3 support

If you haven’t already set up mp3 support (or DVD support for that matter), then check out Part 15 of an earlier post I made:

http://aspensmonster.com/2010/03/18/debian-lenny-64-bit-installation/

Part 3: Installation of Theora codec ; libtheora-1.1.1

I needed to install the latest theora codec in order to permit screencapturing with gtk-recordmydesktop. You can also grab it from the same site as the ogg and vorbis library files:

http://www.xiph.org/downloads/

:~$ cd /path/to/libtheora-1.1.1
:~$ ./configure
:~$ make
:~# make install

Part 4: Installation of gtk-recordmydesktop

I utilize this program for capturing desktop behavior. It’s no capture card, but it gets the job done for my purposes. Believe it or not, the only necessary action on my part was to use Synaptic:

:~# apt-get install gtk-recordmydesktop

Soundcard notes

I originally installed this while using Intels HDA soundcard. Sound would not be saved in the output ogg video files. However, upon setting up the X-Fi Soundcard, sound worked just fine. However, this was also before I updated the ALSA drivers. For all I know, the updated ALSA drivers might also have been the solution to this no audio issue.

Video bitrate problem

Use of the latest libtheora requires that you specify an appropriate bitrate in gtk-recordmydesktop. Otherwise, the quality is very poor. In the gtk-recordmydesktop GUI, click on “Advanced” and then navigate to the “Misc” tab. In the “Extra Options” dialog, add “-v_bitrate 2000000″. This is the maximum bitrate. If you try to use anything higher, gtk-recordmydesktop will complain and exit with an error message:

“recordMyDesktop has exited with status: 256
Description:Error while parsing the arguments.”

Part 5: Using VDPAU and VAAPI, lib-va-0.31, vdpau-video-0.6.9

These provide VDPAU backends to VAAPI, allowing you to use both VDPAU and VAAPI accelerated code. For example, VLC uses VAAPI (I think), but nvidia’s hardware acceleration uses its own VDPAU. With libva in conjunction with vdpau-video, you can get hardware accelerated video with your Nvidia Graphics card.

I’m assuming here that you have the drivers for the card installed. If not, then see Part 3 of my Lenny Installation Guide:

http://aspensmonster.com/2010/03/18/debian-lenny-64-bit-installation/

Now, onto getting that hardware accelerated video!

libva

First, you need to install “libva_0.31.1-1+sds4″. The “sds4″ bit is important; it’s the only one that has mp4 AND mpeg support. You can get it here:

http://www.splitted-desktop.com/~gbeauchesne/libva/

Extract it and then follow standard

:~$ cd /path/to/directory
:~$ ./configure
:~$ make
:~# make install

I honestly don’t remember if I had any problems; there might have been an issue about compiling with PIC (Position Independent Code). If any problems pop up and you are on a 64 bit system (like myself), then look for an option to use PIC in the configuration command (run “./configure –help” to see the available options). It will probably look like “-fPIC” or “-pic” or something like that.

vdpau-video

Now that we have the libva files installed, we need to install the vdpau backends. I recommend vdpau-video-0.6.9. There is always a tarballed “latest,” but I’m not sure how stable it is. Download whatever version you want here:

http://www.splitted-desktop.com/~gbeauchesne/vdpau-video/ ; (I recommend the “vdpau-video-0.6.9.tar.gz” file)

Extract it and then follow standard

:~$ cd /path/to/directory
:~$ ./configure
:~$ make
:~# make install

Verifying a successful installation

Assuming libva and vdpau-video are successfully installed, then the output of

:~$ vainfo

Should look something like this:

libva: libva version 0.31.0-sds4
Xlib:  extension "XFree86-DRI" missing on display ":0.0".
libva: va_getDriverName() returns 0
libva: Trying to open /usr/local/lib/va/drivers/nvidia_drv_video.so
libva: va_openDriver() returns 0
vainfo: VA API version: 0.31
vainfo: Driver version: Splitted-Desktop Systems VDPAU backend for VA API - 0.6.9
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            :	VAEntrypointVLD
      VAProfileMPEG2Main              :	VAEntrypointVLD
      VAProfileH264Main               :	VAEntrypointVLD
      VAProfileH264High               :	VAEntrypointVLD
      VAProfileVC1Simple              :	VAEntrypointVLD
      VAProfileVC1Main                :	VAEntrypointVLD
      VAProfileVC1Advanced            :	VAEntrypointVLD

What if I have an ATI graphics card?

I honestly know next to nothing about this situation. I’ve only ever owned one ATI card, and it was a nightmare. I’ve used Nvidia ever sense without problems. However, I believe that “xvba-video” is the ATI analog to the Nvidia “vdpau-video”. I’d say try installing “xvba-video-0.7.3″ from

http://www.splitted-desktop.com/~gbeauchesne/xvba-video/

And then trying the standard ./configure make make install.

Part 6: Installation of latest x264

“x264″ is an open-source implementation of the H.264 (also called “AVC” in some cases) codec. Quite a lot of HD content uses H.264 with the x264 encoder. If you want to cut and render with HD video, having the latest x264 is an absolute must.

I’d recommend adding the following libraries from your package manager. We’ve installed all the latest ones that we need to at this point:

:~# apt-get install yasm texi2html libfaac-dev libmp3lame-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev

If any other libraries or headers are needed, install them. Using the latest x264 requires using git source:

:~$ git clone git://git.videolan.org/x264.git
:~$ cd x264
:~$ ./configure --enable-pic
:~$ make
:~#make install

If you are running a 64 bit operating system, then it is absolutely necessary that you use the “–enable-pic” flag.

Part 7: Installation of ffmpeg

FFMPEG is the media workhorse of the linux world. It encodes, it has muxers and demuxers, and all sorts of other capabilities that I don’t even understand. However, it is necessary to have the latest version installed in order for your system to be up-to-date.

libvpx (not required)

This section is optional. You can skip it completely if you want. Installing libvpx will let you encode and decode VP8 video. VP8 has some promise to become an open standard for video playback in HTML5, primarily due to Google backing the code. It may or may not happen, but I figure it never hurts to have it on your system in any case.

:~$ git clone git://review.webmproject.org/libvpx.git
:~$ cd libvpx
:~$ ./configure
:~$ make
:~# make install

The configuration line

FFmpeg gives you lots of fine-tuned control over just what features get installed. The “./configure” portion of the install can be a bit tricky. This is mine:

./configure --enable-gpl --enable-version3 --enable-nonfree --enable-postproc --enable-pthreads --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-x11grab --enable-libdc1394 --enable-shared --enable-vaapi --enable-libvpx

You can remove or add whatever you like (for example, if you don’t want to install libvpx, then remove it from the above “./configure” command). Just keep in mind you might have to install some other necessary files from your package manager to get the “./configure” command to complete.

Installing

Execute the following commands to download and install from source:

:~$ svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg
:~$ cd ffmpeg
:~$ ./configure [PUT YOUR SPECIFIC OPTIONS HERE]
:~$ make
:~# make install

Verifying the Install

First, run

:~# ldconfig

Then, you can use the program “ldd” to see what libraries are being used by ffmpeg. This is very useful in determining if the latest vorbis, theora –and any other source-compiled libraries you compiled– are actually being used by your ffmpeg install.

:~$ ldd /usr/local/bin/ffmpeg

If you’ve compiled up-to-date libraries for components such as libtheora, then the *.so file should be located in a “/local/” directory. If it’s just in “/usr/lib” or “/usr/bin/”, then chances are you’re just using a packaged, out-of-date version.

Using ffmpeg and x264 concurrently

I feel that one Robert Swain has already hit the nail squarely on the head here. You can check out his guide to x264 and ffmpeg here:

http://rob.opendot.cl/index.php/useful-stuff/ffmpeg-x264-encoding-guide/

Part 8: Installation of VLC 1.0.6

I originally intended for this to be a short part of the guide. However, it grew into a project all it’s own. Check it out here:

http://aspensmonster.com/2010/07/17/compiling-vlc-1-0-6-from-source-on-debian-lenny-64-bit/

Hardware accelerated playback

Version 1.0.6 (which I documented) does not have hardware accelerated support (not via vdpau, anyway). VLC’s version 1.1.0 and up do, but it is very much so a new and experimental feature. You can try compiling the newest VLC and see if it’s making calls to libva or vdpau-video when you have hardware acceleration enabled. Other than that, I’m not much use for you. Maybe I’ll update this section later if I have time to tinker with it.

I did however find one link that looks to be promising and to the point:

http://strangestone.livejournal.com/107092.html

However, I don’t think you need to patch ffmpeg anymore. Just compile it with the “–enable-vaapi” option.

Part 9: Installation of latest mplayer

Mplayer is another outstanding media player in addition to VLC. It is more minimalistic and command-line aimed then VLC, but I still use it for those occasions when I want to watch 1080p video with hardware acceleration. Keep in mind, I installed mplayer AFTER compiling VLC from source. For all I know, there could be plenty of external software you need to grab from your package manager in order to get mplayer to compile. I found a rather old link that might be of use if you aren’t sure what to do:

http://ubuntuforums.org/showthread.php?t=558538

If you are ready and know how to compile software from source, then just do this:

:~$ svn checkout svn://svn.mplayerhq.hu/mplayer/trunk mplayer
:~$ cd mplayer
:~$ ./configure --enable-gui
:~$ make
:~# make install

Getting skins to work

Even with “–enable-gui” called in the configuration line, there is no gui to start with. You have to download one from here under the “Skins”:

http://www.mplayerhq.hu/design7/dload.html

I use the default “Blue.” However, there were some tricks getting it installed. Ultimately, you need to have a directory structure like this:

“/usr/local/share/mplayer/skins/default”

and in that default folder, you need to have all of the skin files. Mine looks like this:

user@machine:/usr/local/share/mplayer/skins/default$ ls
about.png         eqb.png          mute.png            skin
bareqb.png        exit.png         next.png            skinb.png
barexit.png       font.fnt         playbar.png         stop.png
barffwd.png       font-pl.png      playlist.png        subblue.png
barfwd.png        forward.png      play.png            subload.png
barmute.png       icons            pos.png             symbols2.png
barplay.png       load.png         prefs.png           symbols.fnt
barrev.png        main.png         prev.png            symbolsg.fnt
barrevv.png       main-silver.png  progres-long2c.png  VERSION
barstop.png       menu.png         progres-long2d.png  zoom-3.png
barzoom.png       menus.png        README
Blue-1.7.tar.bz2  minimize.png     rev.png

In short, DON’T put a folder inside the “default” folder. For example with the default “Blue” skin, it comes packaged in a tarball. Extracting gives me a folder called “Blue”. I then open that folder and dump all of the contents (images and a folder labeled “icons”) into the “/usr/local/share/mplayer/skins/default” folder.

Hardware Accelerated Video Decoding

You can check that mplayer does indeed have vdpau working by running:

:~$ mplayer-vo help
"vdpau      vdpau with X11"

Should be one of the listings.

Running

mplayer -vc help

Will list ALL of the codecs. You should see some with “vdpau” labels.

An example command to play an HD file with hardware acceleration is:

mplayer -vo vdpau -vc ffh264vdpau path/to/file.mkv

The same principle works with other kinds of files. Just make sure the video output (vo) is “vdpau”, and then use the appropriate video codec (vc), such as “ffh264vdpau” or “ffmpeg12vdpau” or “ffvc1vdpau”.

Part 10: Installation of Kdenlive

In my opinion, this is Linux’s best bet at an intuitive video editor for common use. It is most definitely a work in progress. The general instructions for compiling from source are pretty good:

http://www.kdenlive.org/user-manual/downloading-and-installing-kdenlive/installing-source

Lots of the libraries will already be installed, and ffmpeg will be updated too (assuming you’ve used this guide). Installing the MLT rendering engine and then kdenlive itself isn’t too difficult after that.

cmake issues

However, the latest version they have (0.7.7.1) uses cmake to compile. The version in Debian Lenny is too old. Download the latest cmake (2.8.2)here:

http://www.cmake.org/cmake/resources/software.html

and install.

When it comes time to use cmake at the end of their guide, it should work. And one last thing: DON’T use the svn version. It is currently using an updated KDE environment that Debian’s “kdelibs5″ is incompatible with. Just download the kdenlive 0.7.7.1 package from sourceforge:

http://sourceforge.net/projects/kdenlive/

frie0r plugins

I remember having a hard time getting these installed from source and needed to use a repository instead. Use the one listed here:

http://www.piksel.org/frei0r

CONCLUSION

As of now, you should have a very updated stable Lenny installation. Make no mistake, it’s a mixed install and that’s always tricky. However, nothing beats having all of the same media capabilities as a windows box (more or less) on a stable distribution of Linux :-)

I’m sure I’ll be updating this guide from time to time. Feel free to leave comments if you have questions or came up with some other work around that you think might help others.

July 17, 2010

Compiling VLC 1.0.6 from Source on Debian Lenny 64 bit

Filed under: Uncategorized — Tags: , — aspensmonster @ 12:43 am

flattr this!

  • VLC has since updated to version 1.1.0. If you want to try out this process with the newest source, then download it here: http://sourceforge.net/projects/vlc/files/1.1.0/vlc-1.1.0.tar.bz2/download. This guide should still serve you well however. I highly doubt that there will be any serious kinks in going from 1.0.6 to 1.1.0, though I do plan on trying it out myself whenever I have more time.
  • UPDATE: I did go ahead and compile 1.1.0 from source. However, it requires a LOT more up-to-date libraries than 1.0.6 does and needed several tweaks that I had to google for. As well, I had more issues with playback, particularly with flv files (nearly HALF of them kept segfaulting VLC). In short, I’m sticking with 1.0.6 for now, even though it lacks 1.1.0′s hardware acceleration (which is still experimental as it is). I’d give it a few weeks, and then grab it from the git repository. My only other hypothesis is that my playback issues could be an issue because of an old glibc version. Seeing as hardware support is coded now, this may very well be the case.

This guide is intended as an introduction to compiling software from source, with the added benefit that the result is something very useful –an up-to-date media player– to the typical user. I have written it in a chronological form, from the moment of downloading the package up to the moment the final tests on the compiled software have been finished. In this regard, it does not follow a formula like this:

  1. # apt-get install  libdvdcss gstreamer-lame [HUGE LIST OF ALL SORTS OF WEIRD PROGRAM NAMES AND STUFF LIKE THAT HERE]
  2. $ ./configure --weird-option-one --what-is-this --what-does-this-button-do --how-do-i-shot-web [LONG LONG LIST OF CONFIGURATION OPTIONS]
  3. $ make
  4. # make install
  5. DONE.

Nobody compiles software in this manner. Very rarely does an up-to-date, complicated piece of software work out as smoothly as:

$ ./configure
$ make
# make install

As well, you don’t just magically know which packages to install and what configuration options to use. Rather, I believe that a play-by-play of my experiences compiling VLC, including all wrong turns and bad ideas, will be far more useful in helping others to understand how to properly compile software (and possibly get a better understanding of how it actually comes together).

Right. Let’s get started.

Part 0: The “/etc/apt/sources.list” file

This is my (abbreviated) sources.list file:

deb cdrom:[Debian GNU/Linux 5.0.4 _Lenny_ - Official amd64 CD Binary-1 20100131-21:33]/ lenny main

deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

# Used for all sorts of necessary media headers and programs
deb http://www.debian-multimedia.org lenny main non-free

The key component here is the debian-multimedia repository. If you don’t already have it enabled, then do the following:

$ wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2008.10.16_all.deb
# dpkg -i debian-multimedia-keyring_2008.10.16.deb

This downloads the keyring and installs it, permitting you to use the multimedia repository. Next, be sure to add the entry into the “/etc/apt/sources.list” as shown above and then update apt:

# apt-get update

You are now ready to get started :-)

Part 1: Downloading and Extracting the Source

VLC has since updated to version 1.1.0. If you want to try out this process with the newest source, than download it here: http://sourceforge.net/projects/vlc/files/1.1.0/vlc-1.1.0.tar.bz2/download

The source for VLC 1.0.6 is here: http://download.videolan.org/pub/videolan/vlc/1.0.6/vlc-1.0.6.tar.bz2

Download the source and then extract it to wherever directory you want. I choose to put installed software in my home directory:

preston@mymachine:~$ tar xjvf vlc-1.0.6.tar.bz2
preston@mymachine:~$ cd vlc-1.0.6

Part 2: The “./configure” Command

Introduction

Herein lies the largest part of the work. Go ahead and give the following command a whirl:

preston@PRESTON-BOX:~/vlc-1.0.6$ ./configure

Chances are, it isn’t going to finish. It will probably throw an error about not finding some library or header file. And even if it does spit out a completed configuration, it’s going to be a hallow, empty shell. DON’T compile that! The output might look something like this:

[LOTS OF STUFF ABOVE]...
checking for FREETYPE... yes
checking fontconfig/fontconfig.h usability... yes
checking fontconfig/fontconfig.h presence... yes
checking for fontconfig/fontconfig.h... yes
checking Carbon/Carbon.h usability... no
checking Carbon/Carbon.h presence... no
checking Carbon/Carbon.h... no
checking for FRIBIDI... configure: error: Package requirements (fribidi) were not met:

No package 'fribidi' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables FRIBIDI_CFLAGS and FRIBIDI_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

Notice the highlighted lines that show where the error was thrown. Here, it’s telling you bluntly what package was not installed.

Or it could look something like this:

[LOTS OF STUFF ABOVE]...
checking for SWSCALE... yes
checking libswscale/swscale.h usability... yes
checking libswscale/swscale.h presence... yes
checking for libswscale/swscale.h... yes
checking for ffmpeg/swscale.h usability... no
checking for ffmpeg/swscale.h presence... no
checking for ffmpeg/swscale.h... no
checking for POSTPROC... yes
checking for libpostproc/postproc.h usability... no
checking for libpostproc/postproc.h presence... no
checking for libpostproc/postproc.h... no
checking for faad.h usability... yes
checking for faad.h presence... yes
checking for faad.h... yes
checking for faacDecOpen in -lfaad... no
checking for NeAACDecOpen in -lfaad... yes
checking for twolame.h usability... no
checking for twolame.h presence... no
checking for twolame.h... no
configure: error: cannot find development header for libtwolame...

Notice in the highlighted line that it’s not naming a package, only a development header it cannot find.

Getting a “./configure” command to “complete”

So… What do you think we’re going to do to get rid of these errors? We’re going to start installing what look like the right packages and headers ( headers are often called “development packages,” the ones that end in “-dev”). We will continue to do this until we can get a ./configure command that completes (i.e., no “errors”). However, we are NOT going to immediately jump into compiling simply because the “./configure” completes (as I will show you, soon).

I prefer using Synaptic Package Manager for this sort of thing, mainly because it has a simple search function that will usually find the right packages to install. For example, searching for package “fribidi” in Synaptic points me right to it. Install it. Now try to “./configure” again. You’ll probably find another problem, perhaps something like the second example. If that’s the case (missing a header file), then use synaptic to search for the name and install the “-dev” package. That should clear it up.

Continue to clear up these little issues. I had to install the following before I could get a configuration to complete:

  • libmad0-dev
  • libavcodec-dev (Led to MANY other packages being installed. I did not keep track of them.)
  • libavformat-dev
  • libswscale-dev
  • libpostproc-dev
  • libfribidi-dev

Hunting “WARNING” flags in a “./configure” command that “completes”

However, while this configuration will complete, it is still a very hollow shell. VLC generates a list of enabled modules, and you’ll no doubt notice the shortness of the list at the bottom.

Your goal is to hunt down the “WARNING” flags that the configuration script will throw. I’ve highlighted them in this example.

checking sys/mount.h presence... yes
checking for sys/mount.h... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking netinet/udplite.h usability... no
checking netinet/udplite.h presence... no
checking for netinet/udplite.h... no
checking sys/eventfd.h usability... no
checking sys/eventfd.h presence... no
checking for sys/eventfd.h... no
checking for net/if.h... yes
checking machine/param.h usability... no
checking machine/param.h presence... no
checking for machine/param.h... no
checking sys/shm.h usability... yes
checking sys/shm.h presence... yes
checking for sys/shm.h... yes
checking linux/version.h usability... yes
checking linux/version.h presence... yes
checking for linux/version.h... yes
checking linux/dccp.h usability... yes
checking linux/dccp.h presence... yes
checking for linux/dccp.h... yes
checking syslog.h usability... yes
checking syslog.h presence... yes
checking for syslog.h... yes
checking whether time.h and sys/time.h may both be included... yes
checking for ssize_t... yes
checking for library containing poll... none required
checking dirent.h usability... yes
checking dirent.h presence... yes
checking for dirent.h... yes
checking for nanosleep in time.h... yes
checking for timespec in sys/time.h... yes
checking pthread.h usability... yes
checking pthread.h presence... yes
checking for pthread.h... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking zlib.h usability... yes
checking zlib.h presence... yes
checking for zlib.h... yes
checking for MINIZIP... no
checking unzip.h usability... no
checking unzip.h presence... no
checking for unzip.h... no
checking for HAL... no
configure: WARNING: libhal >= 0.5.0 was not found. Install libhal-dev ?
checking for UDEV... no
checking for MTP... no
configure: WARNING: MTP library not found
checking for DBUS... yes
checking for ntohl in sys/param.h... no
checking if gcc -std=gnu99 accepts -Wall... yes
checking if gcc -std=gnu99 accepts -Wextra... yes
checking if gcc -std=gnu99 accepts -Wsign-compare... yes
checking if gcc -std=gnu99 accepts -Wundef... yes
checking if gcc -std=gnu99 accepts -Wpointer-arith... yes
checking if gcc -std=gnu99 accepts -Wbad-function-cast... yes
checking if gcc -std=gnu99 accepts -Wcast-align... yes
checking if gcc -std=gnu99 accepts -Wwrite-strings... yes
checking if gcc -std=gnu99 accepts -Wmissing-prototypes... yes
checking if gcc -std=gnu99 accepts -Wvolatile-register-var... yes
checking if gcc -std=gnu99 accepts -Werror-implicit-function-declaration... yes
checking if gcc -std=gnu99 accepts -pipe... yes
checking if $CC accepts -Os... yes
checking if $CC accepts -O4... yes
checking if $CC accepts -O3... yes
checking if $CC accepts -O2... yes
checking if $CC accepts -O0... yes
checking if $CC accepts -ffast-math... yes
checking if $CC accepts -funroll-loops... yes
checking if $CC accepts -fomit-frame-pointer... yes
checking if $CC accepts -bundle -undefined error... no
checking __attribute__ ((aligned ())) support... 64
checking for __attribute__((packed))... yes
checking execinfo.h usability... yes
checking execinfo.h presence... yes
checking for execinfo.h... yes
checking for backtrace... yes
checking if gcc -std=gnu99 groks MMX intrinsics... yes
checking if gcc -std=gnu99 groks MMX inline assembly... yes
checking if gcc -std=gnu99 groks MMX EXT inline assembly... yes
checking if gcc -std=gnu99 groks SSE2 intrinsics... yes
checking if gcc -std=gnu99 groks SSE inline assembly... yes
checking if gcc -std=gnu99 groks SSE2 inline assembly... yes
checking if gcc -std=gnu99 groks 3D Now! inline assembly... yes
checking whether gcc -std=gnu99 accepts -mtune=athlon64... yes
checking for LUA... no
configure: WARNING: lua5.1 not found, trying lua >= 5.1 instead
checking for LUA... no
checking lua.h usability... no
checking lua.h presence... no
checking for lua.h... no
checking lauxlib.h usability... no
checking lauxlib.h presence... no
checking for lauxlib.h... no
checking lualib.h usability... no
checking lualib.h presence... no
checking for lualib.h... no
checking for luaL_newstate in -llua5.1 ... no
checking for luaL_newstate in -llua51 ... no
checking for luaL_newstate in -llua ... no
configure: WARNING: lua >= 5.1 not found!
checking for LIBPROXY... no
checking for NOTIFY... no
checking for TAGLIB... no
configure: WARNING: TagLib library not found
checking liveMedia_version.hh usability... no
checking liveMedia_version.hh presence... no
checking for liveMedia_version.hh... no
checking liveMedia.hh usability... no
checking liveMedia.hh presence... no
checking for liveMedia.hh... no
configure: WARNING: The development files for liveMedia (live555) can't be found
checking dvdread/dvd_reader.h usability... no
checking dvdread/dvd_reader.h presence... no
checking for dvdread/dvd_reader.h... no
checking libdvdread/dvd_reader.h usability... no
checking libdvdread/dvd_reader.h presence... no
checking for libdvdread/dvd_reader.h... no
checking for dvdnav-config... no
checking libsmbclient.h usability... no
checking libsmbclient.h presence... no
checking for libsmbclient.h... no
checking for struct _SMBCCTX.close_fn... no
checking for dvbpsi/dr.h... no
configure: WARNING: cannot find libdvbpsi headers
checking for dvbpsi_GenSDTSections in -ldvbpsi... no
checking linux/videodev2.h usability... yes
checking linux/videodev2.h presence... yes
checking for linux/videodev2.h... yes
checking for LIBV4L2... no
configure: WARNING: LibV4L2 support disabled because libv4l2 development headers were not found
checking for LIBCDIO... no
configure: WARNING: CD Reading and information library not found
checking for VCDINFO... no
configure: WARNING: VCD information library not found
checking for cdrom_msf0 in linux/cdrom.h... yes
checking for scsireq in sys/scsiio.h... no
checking for ioc_toc_header in sys/cdio.h... no
checking for LIBCDDB... no
configure: WARNING: new enough libcddb not found. CDDB access disabled
configure: WARNING: the dvb access module requires libdvbpsi
checking for inet_pton... yes
checking for inet_ntop... yes
checking ogg/ogg.h usability... yes
checking ogg/ogg.h presence... yes
checking for ogg/ogg.h... yes
checking for oggpack_read in -logg... yes
checking ebml/EbmlVersion.h usability... no
checking ebml/EbmlVersion.h presence... no
checking for ebml/EbmlVersion.h... no
checking libmodplug/modplug.h usability... no
checking libmodplug/modplug.h presence... no
checking for libmodplug/modplug.h... no
checking mpc/mpcdec.h usability... no
checking mpc/mpcdec.h presence... no
checking for mpc/mpcdec.h... no
checking mpcdec/mpcdec.h usability... no
checking mpcdec/mpcdec.h presence... no
checking for mpcdec/mpcdec.h... no
configure: WARNING: only static linking is available, you must provide a gme-tree
checking mad.h usability... yes
checking mad.h presence... yes
checking for mad.h... yes
checking for mad_bit_init in -lmad... yes
checking for AVCODEC... yes
checking libavcodec/avcodec.h usability... yes
checking libavcodec/avcodec.h presence... yes
checking for libavcodec/avcodec.h... yes
checking ffmpeg/avcodec.h usability... no
checking ffmpeg/avcodec.h presence... no
checking for ffmpeg/avcodec.h... no
checking libavutil/avutil.h usability... yes
checking libavutil/avutil.h presence... yes
checking for libavutil/avutil.h... yes
checking ffmpeg/avutil.h usability... no
checking ffmpeg/avutil.h presence... no
checking for ffmpeg/avutil.h... no
checking for AVFORMAT... yes
checking libavformat/avformat.h usability... yes
checking libavformat/avformat.h presence... yes
checking for libavformat/avformat.h... yes
checking ffmpeg/avformat.h usability... no
checking ffmpeg/avformat.h presence... no
checking for ffmpeg/avformat.h... no
checking for libavutil/avutil.h... (cached) yes
checking for ffmpeg/avutil.h... (cached) no
checking for SWSCALE... yes
checking libswscale/swscale.h usability... yes
checking libswscale/swscale.h presence... yes
checking for libswscale/swscale.h... yes
checking ffmpeg/swscale.h usability... no
checking ffmpeg/swscale.h presence... no
checking for ffmpeg/swscale.h... no
checking for POSTPROC... yes
checking libpostproc/postproc.h usability... no
checking libpostproc/postproc.h presence... no
checking for libpostproc/postproc.h... no
checking postproc/postprocess.h usability... no
checking postproc/postprocess.h presence... no
checking for postproc/postprocess.h... no
checking sysfs/libsysfs.h usability... yes
checking sysfs/libsysfs.h presence... yes
checking for sysfs/libsysfs.h... yes
checking libtar.h usability... no
checking libtar.h presence... no
checking for libtar.h... no
checking a52dec/a52.h usability... yes
checking a52dec/a52.h presence... yes
checking for a52dec/a52.h... yes
checking for a52_free in -la52... yes
checking for DCA... no
checking for LIBMPEG2... no
configure: WARNING: Could not find libmpeg2 on your system: you may get it from http://libmpeg2.sf.net/ . Alternatively you can use --disable-libmpeg2 to disable the libmpeg2 plugin.
checking vorbis/codec.h usability... yes
checking vorbis/codec.h presence... yes
checking for vorbis/codec.h... yes
checking vorbis/vorbisenc.h usability... yes
checking vorbis/vorbisenc.h presence... yes
checking for vorbis/vorbisenc.h... yes
checking speex/speex.h usability... yes
checking speex/speex.h presence... yes
checking for speex/speex.h... yes
checking for speex_decode_int in -lspeex... yes
checking for SCHROEDINGER... no
checking png.h usability... yes
checking png.h presence... yes
checking for png.h... yes
checking for png_set_rows in -lpng... yes
checking for X264... yes
checking if linker supports -Bsymbolic... yes
checking for FLUIDSYNTH... no
checking for ZVBI... no
configure: WARNING: ZVBI library not found. Enabling the telx module instead
checking for KATE... no
checking kate/kate.h usability... no
checking kate/kate.h presence... no
checking for kate/kate.h... no
checking for TIGER... no
checking for X... libraries , headers 
checking for gethostbyname... yes
checking for connect... (cached) yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking X11/Xlib.h usability... yes
checking X11/Xlib.h presence... yes
checking for X11/Xlib.h... yes
checking for XShmAttach in -lXext... yes
checking for X11/extensions/dpms.h... yes
checking for DPMSInfo in X11/extensions/dpms.h... yes
checking X11/extensions/Xv.h usability... no
checking X11/extensions/Xv.h presence... no
checking for X11/extensions/Xv.h... no
checking for X11/Xlib.h... (cached) yes
checking GL/glu.h usability... yes
checking GL/glu.h presence... yes
checking for GL/glu.h... yes
checking GL/glx.h usability... yes
checking GL/glx.h presence... yes
checking for GL/glx.h... yes
checking X11/extensions/Xinerama.h usability... yes
checking X11/extensions/Xinerama.h presence... yes
checking for X11/extensions/Xinerama.h... yes
checking for XineramaQueryExtension in -lXinerama_pic... no
checking for XineramaQueryExtension in -lXinerama... yes
checking for X11/extensions/xf86vmode.h... no
checking GL/gl.h usability... yes
checking GL/gl.h presence... yes
checking for GL/gl.h... yes
checking for GL/glu.h... (cached) yes
checking for sdl12-config... no
checking for sdl11-config... no
checking for sdl-config... /usr/bin/sdl-config
checking SDL/SDL.h usability... yes
checking SDL/SDL.h presence... yes
checking for SDL/SDL.h... yes
checking SDL/SDL_image.h usability... no
checking SDL/SDL_image.h presence... no
checking for SDL/SDL_image.h... no
checking SDL_image.h usability... no
checking SDL_image.h presence... no
checking for SDL_image.h... no
configure: WARNING: The development package for SDL_image is not installed.
  You should install it alongside your SDL package.
checking for FREETYPE... yes
checking fontconfig/fontconfig.h usability... yes
checking fontconfig/fontconfig.h presence... yes
checking for fontconfig/fontconfig.h... yes
checking Carbon/Carbon.h usability... no
checking Carbon/Carbon.h presence... no
checking for Carbon/Carbon.h... no
checking for FRIBIDI... yes
checking for XML2... no
checking cascade/graphics/CascadeScreen.h usability... no
checking cascade/graphics/CascadeScreen.h presence... no
checking for cascade/graphics/CascadeScreen.h... no
configure: WARNING: Not building Roku HD1000 compatible video output
checking cascade/graphics/CascadeBitmap.h usability... no
checking cascade/graphics/CascadeBitmap.h presence... no
checking for cascade/graphics/CascadeBitmap.h... no
configure: WARNING: Not building Roku HD1000 compatible video output
checking linux/fb.h usability... yes
checking linux/fb.h presence... yes
checking for linux/fb.h... yes
checking soundcard.h usability... no
checking soundcard.h presence... no
checking for soundcard.h... no
checking sys/soundcard.h usability... yes
checking sys/soundcard.h presence... yes
checking for sys/soundcard.h... yes
checking for main in -lossaudio... no
checking for PULSE... yes
checking alsa/asoundlib.h usability... yes
checking alsa/asoundlib.h presence... yes
checking for alsa/asoundlib.h... yes
checking for main in -lasound... yes
checking deschutes/libraries/hdmachinex225/PCMAudioPlayer.h usability... no
checking deschutes/libraries/hdmachinex225/PCMAudioPlayer.h presence... no
checking for deschutes/libraries/hdmachinex225/PCMAudioPlayer.h... no
checking for UpnpInit in -lupnp... no
checking for QT4... yes
checking for moc-qt4... /usr/bin/moc-qt4
checking for rcc... /usr/bin/rcc
checking for uic-qt4... /usr/bin/uic-qt4
checking Ph.h usability... no
checking Ph.h presence... no
checking for Ph.h... no
checking for BONJOUR... yes
checking for XCB... yes
checking for XCB_KEYSYMS... no
configure: WARNING: XCB keysyms was not found
checking for libgcrypt-config... /usr/bin/libgcrypt-config
checking for LIBGCRYPT - version >= 1.1.94... yes (1.4.1)
checking LIBGCRYPT API version... okay
checking for GNUTLS... yes
checking whether to enable RAOP plugin... yes
checking whether byte ordering is bigendian... no
checking for osso_display_blanking_pause in -losso... no
checking for XSPSetPixelDoubling in -lXsp... no
configure: creating ./vlc-config.in
configure: creating ./config.status
config.status: creating extras/package/win32/vlc.win32.nsi
config.status: creating extras/package/macosx/Info.plist
config.status: creating extras/package/macosx/Resources/English.lproj/InfoPlist.strings
config.status: creating extras/package/macosx/plugin/Info.plist
config.status: creating extras/package/macosx/plugin/InstallerInfo.plist
config.status: creating Makefile
config.status: creating projects/activex/Makefile
config.status: creating projects/activex/axvlc.inf
config.status: creating doc/Makefile
config.status: creating extras/package/ipkg/Makefile
config.status: creating libs/loader/Makefile
config.status: creating libs/srtp/Makefile
config.status: creating libs/unzip/Makefile
config.status: creating modules/Makefile
config.status: creating projects/mozilla/Makefile
config.status: creating m4/Makefile
config.status: creating po/Makefile.in
config.status: creating projects/activex/axvlc_rc.rc
config.status: creating projects/mozilla/npvlc_rc.rc
config.status: creating projects/mozilla/vlc.r
config.status: creating projects/mozilla/install.js
config.status: creating share/Makefile
config.status: creating share/vlc_win32_rc.rc
config.status: creating share/libvlc_win32_rc.rc
config.status: creating compat/Makefile
config.status: creating src/Makefile
config.status: creating src/test/Makefile
config.status: creating bin/Makefile
config.status: creating test/Makefile
config.status: creating modules/access/Makefile
config.status: creating modules/access/bd/Makefile
config.status: creating modules/access/bda/Makefile
config.status: creating modules/access/dshow/Makefile
config.status: creating modules/access/dvb/Makefile
config.status: creating modules/access/mms/Makefile
config.status: creating modules/access/cdda/Makefile
config.status: creating modules/access/rtp/Makefile
config.status: creating modules/access/rtsp/Makefile
config.status: creating modules/access/vcd/Makefile
config.status: creating modules/access/vcdx/Makefile
config.status: creating modules/access/screen/Makefile
config.status: creating modules/access/zip/Makefile
config.status: creating modules/access_output/Makefile
config.status: creating modules/audio_filter/Makefile
config.status: creating modules/audio_filter/channel_mixer/Makefile
config.status: creating modules/audio_filter/converter/Makefile
config.status: creating modules/audio_filter/resampler/Makefile
config.status: creating modules/audio_filter/spatializer/Makefile
config.status: creating modules/audio_mixer/Makefile
config.status: creating modules/audio_output/Makefile
config.status: creating modules/codec/Makefile
config.status: creating modules/codec/avcodec/Makefile
config.status: creating modules/codec/cmml/Makefile
config.status: creating modules/codec/dmo/Makefile
config.status: creating modules/codec/shine/Makefile
config.status: creating modules/codec/subtitles/Makefile
config.status: creating modules/codec/spudec/Makefile
config.status: creating modules/codec/wmafixed/Makefile
config.status: creating modules/codec/xvmc/Makefile
config.status: creating modules/control/Makefile
config.status: creating modules/control/http/Makefile
config.status: creating modules/control/globalhotkeys/Makefile
config.status: creating modules/demux/Makefile
config.status: creating modules/demux/asf/Makefile
config.status: creating modules/demux/avformat/Makefile
config.status: creating modules/demux/avi/Makefile
config.status: creating modules/demux/mkv/Makefile
config.status: creating modules/demux/mp4/Makefile
config.status: creating modules/demux/mpeg/Makefile
config.status: creating modules/demux/playlist/Makefile
config.status: creating modules/gui/Makefile
config.status: creating modules/gui/beos/Makefile
config.status: creating modules/gui/pda/Makefile
config.status: creating modules/gui/macosx/Makefile
config.status: creating modules/gui/maemo/Makefile
config.status: creating modules/gui/minimal_macosx/Makefile
config.status: creating modules/gui/qnx/Makefile
config.status: creating modules/gui/qt4/Makefile
config.status: creating modules/gui/skins2/Makefile
config.status: creating modules/gui/wince/Makefile
config.status: creating modules/meta_engine/Makefile
config.status: creating modules/misc/Makefile
config.status: creating modules/misc/dummy/Makefile
config.status: creating modules/misc/lua/Makefile
config.status: creating modules/misc/memcpy/Makefile
config.status: creating modules/misc/notify/Makefile
config.status: creating modules/misc/testsuite/Makefile
config.status: creating modules/misc/playlist/Makefile
config.status: creating modules/misc/osd/Makefile
config.status: creating modules/misc/stats/Makefile
config.status: creating modules/misc/xml/Makefile
config.status: creating modules/misc/probe/Makefile
config.status: creating modules/mux/Makefile
config.status: creating modules/mux/mpeg/Makefile
config.status: creating modules/packetizer/Makefile
config.status: creating modules/services_discovery/Makefile
config.status: creating modules/stream_filter/Makefile
config.status: creating modules/stream_out/Makefile
config.status: creating modules/video_chroma/Makefile
config.status: creating modules/video_filter/Makefile
config.status: creating modules/video_filter/atmo/Makefile
config.status: creating modules/video_filter/dynamicoverlay/Makefile
config.status: creating modules/video_output/Makefile
config.status: creating modules/video_output/msw/Makefile
config.status: creating modules/video_output/qte/Makefile
config.status: creating modules/video_output/x11/Makefile
config.status: creating modules/visualization/Makefile
config.status: creating modules/visualization/visual/Makefile
config.status: creating modules/visualization/galaktos/Makefile
config.status: creating config.h
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing po-directories commands
config.status: creating po/POTFILES
config.status: creating po/Makefile
config.status: creating vlc-config
Enabled modules: a52tofloat32 a52tospdif access_alsa access_mmap access_oss adjust alphamask alsa aout_file aout_sdl atmo audio_format audioscrobbler avcodec avformat bandlimited_resampler blend blendbench bluescreen bonjour canvas cdda chain clone cmml colorthres converter_float crop croppadd dbus deinterlace dolby_surround_decoder dtstospdif dynamicoverlay equalizer erase extract fake fb float32_mixer folder freetype gaussianblur gestures glx gnutls gradient grain headphone_channel_mixer hotkeys http i420_rgb_mmx i420_rgb_sse2 i420_ymga i420_ymga_mmx i420_yuy2 i420_yuy2_mmx i420_yuy2_sse2 i422_i420 i422_yuy2 i422_yuy2_mmx i422_yuy2_sse2 inhibit invert linear_resampler logo magnify marq memcpy3dn memcpymmx memcpymmxext mosaic motion motionblur motiondetect mpgatofixed32 mux_ogg noise normvol ogg opengl opengl osd_parser osdmenu oss panoramix param_eq png podcast postproc psychedelic pulse puzzle qt4 rc remoteosd ripple rotate rss rv32 sap scale scaletempo scene screensaver sharpen shout showintf signals simple_channel_mixer skins2 spatializer spdif_mixer speex stream_out_raop swscale telepathy telnet telx transform unzip v4l2 vcd visual vmem vorbis vout_sdl wall wave x11 x11_screen x264 yuv yuvp yuy2_i420 yuy2_i422 zip 


libvlc configuration
--------------------
version               : 1.0.6
system                : linux
architecture          : x86_64 mmx sse sse2
build flavour         : devel 
vlc aliases           : cvlc rvlc svlc qvlc
plugins/bindings      :

You can tune the compiler flags in vlc-config.
To build vlc and its plugins, type `./compile' or `make'.

What do you think we’re going to do now? That’s right. We’re going to keep looking for software to install from this. Notice in my example that it cannot find the “libdvbpsi” headers. Search synaptic and install them. Repeat ad naseum. This is what I had to install to get this particular configuration script looking prettier (having fewer WARNING flags).

  • liblivemedia-dev
  • libtag1-dev
  • libhal-dev
  • libmtp-dev —> led to libusb-dev
  • liblua5.1-0-dev –> led to 3 others: libltdl3-dev, libreadline5-dev, libtool
  • libdvbpsi4-dev
  • libv4l-0
  • libv4l-dev
  • libcdio-dev
  • libvcdinfo-dev –> led to lib9660-dev
  • libcddb2
  • libcddb2-dev
  • libmpeg2-4-dev
  • zvbi
  • libzvbi0
  • libzvbi-common
  • libzvbi-dev
  • libsdl-image1.2-dev —> led to libtiff4-dev libtiffxx0c2
  • libxcb-keysyms0
  • libxcb-keysyms0-dev

After this, most of the warnings were gone. Some remained, such as support for hardware I didn’t have or for features I simply didn’t care about. However, at this point, most of your dependencies will be installed. Most of the work SHOULD be done :P

Setting up the “full” configuration line

Now we are ready to try a full configuration command, one that specifies what features we do (and perhaps don’t) want installed. If you run the command

:~$ ./configure --help

Then you should have a list of ALL of the different flags and options available to you. Most of them are never really needed, though I’m sure you could have fun trying all sorts of different screwy hacks with various parts of the compilation procedure. The key point here though is that it will tell you which features are enabled and disabled by default. To save you some time, this was the full configuration command I ran:

:~$ ./configure --disable-nls --disable-mozilla --enable-x11 --enable-xvideo --disable-gtk --enable-sdl --enable-avcodec --enable-avformat --enable-swscale --enable-mad --enable-libdvbpsi --enable-a52 --enable-libmpeg2 --enable-dvdnav --enable-faad --enable-vorbis --enable-ogg --enable-theora --enable-faac --enable-mkv --enable-freetype --enable-fribidi --enable-speex --enable-flac --enable-live555 --with-live555-tree=/home/preston/live --enable-caca --enable-skins --enable-skins2 --enable-alsa --disable-kde --enable-qt4 --enable-ncurses --enable-release --enable-snapshot --enable-dbus-control --enable-shout --enable-taglib --enable-x264 --enable-v4l --enable-cddax --enable-vcdx --enable-realrtsp --enable-xvmc --enable-svg --enable-dvdread --enable-twolame --enable-real --enable-flac --enable-tremor --with-ffmpeg-mp3lame --with-ffmpeg-faac --enable-quicktime --enable-dirac 

The following

  • –disable-nls
  • –disable-mozilla

Are required to be disabled. If you don’t, then the configuration line won’t complete.

As well, as the configuration scripts change with each release, certain flags might not exist any more. VLC’s configuration –though not necessarily other softwares’ configuration scripts– will tell you which flags it doesn’t recognize. There are a few up there in my configuration line that aren’t recognized and as such don’t do anything (like “–disable-gtk”). You can leave them in the configuration command or take them out; it is, as far as I know, irrelevant.

Getting the “full” configuration line to “complete”

Now that you have all of the relevant features enabled or disabled, you are going to once again repeat the process you did the first two times, hunting for warning flags and other issues that prevent the configuration from properly completing. I personally had to install the libdvdread headers. Other than that, the configuration completed with a nice long list of modules ready to be installed. It then gave me the go ahead to try the “make” command.

Notes about software that is “too old”

When I went through this process, the configuration script complained that my livemedia packages (live-555) were too old. The error looked like this:

[MORE OF CONFIGURATION OUTPUT ABOVE]
checking liveMedia_version.hh usability... yes
checking liveMedia_version.hh presence... yes
checking for liveMedia_version.hh... yes
checking for liveMedia version >= 1214895600 ... no
configure: error: Your version of liveMedia is too old: you may get a more recent one from http://www.live555.com/liveMedia.
Alternatively you can use --disable-live555 to disable the liveMedia plugin.

If this is the case, then you ought to remove the repository version and install the latest if you think it is necessary or worth it. That is what I did. Go ahead and jump down to Part 4 if you want a guide on how to do so.

Part 3: The “make” command ; fixing errors that occur in this stage

This is the point where you hope a whole bunch of gibberish goes rushing past without stopping until saying something along the lines of being successfully installed. Of course, it doesn’t always work that way. There were two issues I encountered:

  1. Missing header files
  2. Improperly compiled supporting software

Missing Header Files

Perfect evidence that even the best configuration files can be thwarted –I’d presume by faulty assumptions that the installation of one package means that such a header file would HAVE to be installed on the machine. Can’t say for sure. Regardless, when I first ran the “make” command, I got this error:

[LOTS OF GIBBERISH ABOVE (relating to the "cdda" module)]
In file included from access.c:30:
cdda.h:70:27: error: cdio/paranoia.h: No such file or directory
In file included from access.c:30:
cdda.h:104: error expected specifier-qualifier-list before 'paranoia_mode_t'
access.c: In function 'get_audio_position':
access.c:170: error: 'cdda_data_t' has no member named 'b_audio_ctl'
access.c:181: error: 'cdda_data_t' has no member named 'b_nav_mode'
[MORE ERROR MESSAGES BELOW]

If you’ve ever written code before, then you’ll know better than to try fixing the last error. The rule is that you hunt down the very FIRST error, and solve IT’S complaint. The list of errors the compiler spits out will almost always originate from the first error. This case is no exception; the “access.c” errors like “has no member named” are symptoms of the first error:

cdda.h:70:27: error: cdio/paranoia.h: No such file or directory

If it cannot find the header file (“paranoia.h”) , than the source code (“access.c”) will of course be unable to resolve the pieces that came from the header.

I had to try a few different packages from synaptic to get this to go away. I installed them in this order:

  1. libcdio-cdda-dev –> libcdio-cdda0 [tried since the problem occured in the cdda module; FAILED]
  2. libcdparanoia-dev [tried since it was a paranoia development file; FAILED]
  3. libcdio-paranoia-dev —> libcdio-paranoia0 [tried since it was a more specific development file including the input/output in the filename; SUCCESS]

After installing the “libcdio-paranoia-dev” file, this error went away and VLC continued to compile.

Improperly compiled supporting software

I had compiled the latest livemedia from source, but apparently, VLC didn’t like how I did it. I got issues like this:

[MORE STUFF ABOVE RELATING TO COMPILING LIVEMEDIA]
/usr/bin/ld: /home/preston/live/liveMedia/libliveMedia.a(Media.o): relocation R_X86_64_32S against 'vtable for Medium' can not be used when making a shared object; recompile with -fPIC
/home/preston/live/liveMedia/libliveMedia.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make[5]: *** [liblive555_plugin.la] Error 1
make[5]: Leaving directory '/home/preston/vlc-1.0.6/modules/demux'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/preston/vlc-1.0.6/modules/demux'
make[3]: *** [all] Error 2
make[3]: Leaving directory '/home/preston/vlc-1.0.6/modules/demux'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory '/home/preston/vlc-1.0.6/modules/'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory '/home/preston/vlc-1.0.6'
make: *** [all] Error 2

As it turns out, this is apparently a consequence of using a 64 bit operating system. “-fPIC” is a compiler option, something you can tell the compiler to do to your code when compiling it that makes it easier for other software to then use your code. But how do we fix our livemedia installation to use fpic? Well, you need to recompile livemedia with the “-fpic” compiler option. It turns out that livemedia makes this a (relatively) painless process. Read part four.

Part 4: Installing Live-555 and Solving the “recompile with -fPIC” Issue

I don’t actually use this plugin. However, I thought it would be a good idea to practice compiling other supporting software when using the repositories wasn’t sufficient.

Installing correctly

The website gives instructions on how to install.

Download from here:

http://www.live555.com/liveMedia/public/

A filename like “live.2010.07.13.tar.gz” is what you’ll want from that page.

Now, run the following command inside the live directory:

username@computer:~/live$ ./genMakefiles linux

You may notice on the website that the developer says you might need to tweak certain files. Tweak the one called “config.linux” to look like this:

COMPILE_OPTS =		$(INCLUDES) -I. -O2 -DSOCKLEN_T=socklen_t -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -fPIC
C =			                c
C_COMPILER =		cc
C_FLAGS =		        $(COMPILE_OPTS)
CPP =			        cpp
CPLUSPLUS_COMPILER =c++
CPLUSPLUS_FLAGS =	$(COMPILE_OPTS) -Wall -DBSD=1 -Wno-deprecated
OBJ =			        o
LINK =			        c++ -o
LINK_OPTS =		        -L.
CONSOLE_LINK_OPTS =	$(LINK_OPTS)
LIBRARY_LINK =		ar cr 
LIBRARY_LINK_OPTS =	
LIB_SUFFIX =			a
LIBS_FOR_CONSOLE_APPLICATION =
LIBS_FOR_GUI_APPLICATION =
EXE =

I highlighted the lines where I made changes. In the first line, I added the “-fPIC” option so that VLC won’t whine when using it. As a result, livemedia will be compiled with “-fPIC” and VLC will be able to use the code. The website also suggested adding “-Wno-deprecated” to the CPLUSPLUS_FLAGS if your gcc is 3.0 or greater (mine is). I did, and didn’t notice any difference; you’re probably fine not adding it if you don’t want to.

Now, for once, the procedure is as simple as:

username@computer:~/live$ ./configure
username@computer:~/live$ make
username@computer:~/live$ su
username@computer:~/live# make install

Fixing an improper install

Supposing you didn’t add the “-fPIC” flag where you were supposed to. First, execute the following commands in the livemedia directory:

:~$ make clean
:~# make uninstall [may or may not actually work; i can't remember if livemedia has this option or not; if not, don't worry about it. just do the "make clean" and go back to the first section of part four]

Now, go back up to the first section of part four and install as shown. The problem will be resolved.

Part 5: The “make install” Command and Troubleshooting

If you’ve made it this far, congratulations. Chances are, your software is good to go. Assuming that the “make” command completes without errors, then you are ready to install the software by executing this command:

:~# make install

This puts all of the appropriate executables in the right directories and such. I’d also recommend doing this to update the dynamic libraries before running the software:

:~# ldconfig

Now try running vlc:

:~$ vlc

It will probably tell you that you have a buggy glibc version. However, it should still run just fine :-)

How to add features you forgot to include in the ./configure line or have since installed

So, you finally have the program working. It can even read all of your files! Oh, wait… it doesn’t read a certain type. Don’t panic. It happened to me. It wouldn’t open files that were in matroska containers (“*.mkv” files). If this happens, do the following in the vlc directory:

:~$ make clean
:~# make uninstall

Now, since I wasn’t able to play matroska containers, I installed the following packages from synaptic:

  • libmatroska-dev
  • libebml-dev

I then reinstalled vlc with the “./configure” command I used before (the one with all of the enable/disable switches), then “make” and “make install”. I once again executed “ldconfig” as root, and I then had a fully functional VLC media player.

Conclusion

Congratulations. You now have the second latest VLC out there :-)

March 18, 2010

Debian Lenny 64 bit Installation

Filed under: Uncategorized — Tags: — aspensmonster @ 12:21 am

flattr this!

PART 0: Preliminaries and Notes about Free Software

This document is intended to provide assistance to other individuals who are attempting to install Lenny and various other software packages onto their machines. Each section includes links to forums I searched through to originally find the answers to my problems (they are preceded by a “###” hash; just ctrl-f it). It is hoped that if this guide isn’t sufficient, I can consolidate your efforts in finding a solution by putting those links in each appropriate section. I’ve also provided a pdf file above that consolidates this entire post. Finally, I’ve backed up onto this blog some of the custom files I’ve found that have made installation of certain software easier. I will do my best to give credit to others where it is due, as it is due in almost all cases : )

In regards to FOSS… I’ll say from the get-go that while I’m installing Debian here, I am not adhering to the strict free-software guidelines as outlined by the GNU FSF. In simple terms: I make use of the contrib and nonfree repositories and download proprietary drivers. To anyone who goes strictly by the guidelines –well, as strict as you can with Debian, seeing as even the OS itself isn’t technically free software– I applaud your efforts. However, it cannot be denied that not everything is consistently up to par for the average user’s need. This is especially true with Debian; what it gains in rock-solid stability it loses in up-to-date software. Most users expect up-to-date software, as they aren’t interested in running servers or constructing computing clusters.

Nevertheless, Debian has improved dramatically from Etch to Lenny, and I’m sure it will improve drastically once more in the next stable release. Perhaps a day will come when FOSS can completely erradicate the necessity of non-free software! In fact, the hardware NIGHTMARES I experienced with Etch were basically non-existent when installing Lenny. To what extent this is dependent on the different hardware setups I had for each machine at the time of installation, I don’t know. But installing Lenny was, for me, much easier this go ’round than with Etch.

PART 1: Hardware Specifications and Software List

My new machine has the following specs:

Power Supply: Tagan BZ Series 1100W
Motherboard: ASUS P5E Deluxe
Processor: Intel Core2 Extreme QX9650 @ 3.0 Ghz (1333Mhz bus)
Graphics Card: Nvidia GTX 280
RAM: 4x1GB DDR3 @ 1333MHz
CD/DVD/BD/RW: Sony BDU-X10S
Hardware RAID: Adaptec AAC-RAID
Fake RAID: Intel Matrix
Mouse: Logitec MX-518

These are the pieces of software I want to install:

Software Purpose
Nvidia Drivers Enable 3D Graphics Acceleration
kchmviewer reads .chm files
gscan2pdf scans pages directly to pdf
*Wireshark network analyzer
*VLC all-purpose media player
Skype VoIP
Compiz-fusion + Emerald desktop effects + themes
Vuze Bit Torrent client
Latex LaTeX word processing
Truecrypt Encryption
*Java 6 RE Java Run-time environment
*Java 6 Plugin Java Plugin for Iceweasel
Flash Plugin for Iceweasel
Kernelcheck Automated kernel updating

*Means that this software came directly from Debian repositories (i.e., apt-get install ______) Obviously, these will not be current version pieces of software. I typically explain why I either didn’t need the latest or stopped trying to get the latest in the appropriate section.

PART 1.5: Important Installation Timeline Notes

The following is an explanation of little tweaks that will prevent common installation problems from occuring with the software. As I went through the process it became clear that it would be nice to have known certain things “before hand” instead of having to backtrack constantly to solve miniproblems that got in the way of getting the software running. As well, there were certain installation requests that were common to several pieces of software. I list them here. If you can’t get a piece of software to run when only following the below sections then the solution might be here.

FIRST: 32-bit compatibility libraries

These allow various 32-bit operations to work on the 64 bit system.

# apt-get install ia32-libs ia32-libs-gtk ia32-libs-libcurl3 ia32-libs-idn11 ia32-libs-libnspr4 ia32-libs-libnss3 ia32-libs-libssh2 ia32-libs-xulrunner lib32nss-mdns

SECOND: Enabling the contrib and nonfree repositories

I use nano to get the job done:

# nano /etc/apt/sources.list

Change the official debian repository entries to look like this:

deb http://ftp.us.debian.org/debian/ lenny main contrib non-free
deb-src http://ftp.us.debian.org/debian/ lenny main contrib non-free

deb http://security.debian.org/ lenny/updates main contrib non-free
deb-src http://security.debian.org/ lenny/updates main contrib non-free

Be sure to update apt:

# apt-get update

THIRD: Preventing python problems

The best option for me was simply to not install different versions of python. It became very difficult to install kernelcheck after doing so. Debian has both 2.4 and 2.5 in the official repositories and if you don’t need the newer ones, don’t use them. However, if you’re like me and have to continually back track, then this little hack can do the trick:

# ln -s /usr/local/bin/python /usr/bin/python2.5
# ln -s /usr/bin/python /usr/bin/python2.5

This isn’t exactly an elegant solution, but it does make sure that python 2.5 is used as opposed to a different version of python you might have installed.

FOURTH: Preventing repository conflicts

When using the www.debian-multimedia.org repositories, certain packages are duplicated in both this repository and the official debian ones. This spelled disaster for my VLC player. It would not play ANY video. Only audio would start. BEFORE installing vlc (and any of the library packages below like lbavdevice52), make a file called preferences in /etc/apt :

# nano /etc/apt/preferences

Put the following in there:

Package: ffmpeg libavcodec51 libavdevice52 libavformat52 libavutil49 libpostproc51 libswscale0
Pin: origin debian.org
Pin-Priority:999

###(http://sidux.com/PNphpBB2-viewtopic-t-11182.html ; Fourth post by “hubi” from the top)

If you’ve already installed VLC (or VLC and one of the above listed packages), then jump down to the VLC section to see how to reverse that pesky no video problem. If you had already installed any of the packages above (but not installed VLC) then remove them first and implement the VLC workaround below.

(This again is not a particularly elegant solution, but it does prevent problems from cropping up.)

PART 2: Installing Debian

Installing Debian this time was much easier. I had my Vista Ultimate 64 bit install on the Intel Matrix fakeraid and wanted to put Debian Lenny on the Adaptec hardware raid. The graphical installer was great. It went off without a hitch up until the GRUB installation portion. It put the bootloader on the first drive of the intel fakeraid as opposed to the Adaptec raid. Having had nightmares trying to deal with this problem before, I simply wiped the incomplete install of Lenny, unplugged all the fakeraid drives and reinstalled on the Adaptec raid without the hassle. I have a BIOS that can switch boot priority from the fakeraid to the Adaptec raid and, seeing as I rarely use the Vista install anyway, this was sufficient enough for my needs. I then unplugged the Adaptec raid, put the fakeraid drives back in, and ran the fixmbr off of the Vista install disk. The installation fixed itself and I promptly went back to booting from the adaptec raid and my shiny new Lenny install.

PART 3: Setting up Proprietary Nvidia Drivers

###(http://www.howtoforge.com/installing-nvidia-drivers-on-debian-lenny-manually ; primary source of this section)

First, download the drivers from Nvidia:

http://www.nvidia.com/Download/index.aspx?lang=en-us

The latest Nvidia drivers are compiled using gcc 4.1. The kernel that comes with Lenny is not compiled with this version. If you try to jump straight to building the drivers, the installer will complain about this and abort. So, do the following first:

# apt-get install make gcc gcc-4.1 linux-headers*

Shut down the graphical display manager (GNOME) and change to the directory that you downloaded the drivers to:

# /etc/init.d/gdm stop

Then, be sure to tell bash to use gcc-4.1 by executing this line:

# export CC=/usr/bin/gcc-4.1

Finally, run the installer (your precise file name will probably be different):

# sh NVIDIA-Linux-x86_64-195.36.08-pkg2.run

Once this is done, restart GNOME:

user@location:~/$ gdm

If you’re eager to verify that the 3D-accelerated drivers are indeed installed and functional, then you can try installing mesa-utils and running glxgears:

# apt-get install mesa-utils
user@location:~/$ glxgears -info

This is however, a very poor excuse for a test*. My fps was in excess of 13000 (GTX 280) before installing compiz-fusion and emerald. After installing those and running lots of stuff at the same time and using the sphere and throwing anything else I could think of at it, I still couldn’t get the fps below 2000 (I had glxgears open while doing it to get the FPS value). If you want a better benchmark, then try gtkperf.

*###(http://wiki.cchtml.com/index.php/Glxgears_is_not_a_Benchmark ; explains why not)

PART 4: Setting up Compiz-Fusion + Emerald

###(http://www.pendrivelinux.com/how-to-install-compiz-fusion-on-debian-lenny/ ; I did NOT follow the same apt-get install portion)

I don’t actually use the debian repositories for this. Apparently, the developer responsible for maintaining these packages is no longer doing so and as such, they don’t show up in the debian officials. However, they are in another repository. It is from here that I installed the required packages.

First, add the following to /etc/apt/sources.list :

deb http://download.tuxfamily.org/shames/debian-lenny/desktopfx/unstable/ ./

Update apt:

# apt-get update

Then apply the gpg key:

# wget http://download.tuxfamily.org/shames/A42A6CF5.gpg -O- | apt-key add -

Finally, install the following packages:

# apt-get install fusion-icon emerald emerald-themes compiz compiz-core compiz-backend-gconf compiz-settings-manager compiz-fusion-bcop compiz-fusion-extras compiz-fusion-gnome compiz-fusion-plugins-extra compiz-fusion-plugins-main compiz-gnome compiz-manager compiz-plugins

I can’t honestly say that I know whether or not every one of those packages is necessary (I suspect not). However, upon installing those, compiz and emerald should be working. Add the “fusion-icon” executable to the startup list to have the icon load at startup so you can easily switch between window managers and window decorators.

Modifications to the xorg.conf file:

As well, several posts and sites said to add certain modifications to the xorg.conf file. Whether they are still necessary in 2010 or not, I don’t know. But I don’t notice any adverse effects upon including them.

First, include the following under the “screen” section:

    Option         "XAANoOffscreenPixmaps" "true"
    Option         "AllowGLXWithComposite" "true"
    Option         "AddARGBGLXVisuals" "true"
    SubSection     "Display"
        Depth       24
    EndSubSection

Then, make a new section like this:

Section "Extensions"
    Option         "Composite" "Enable"
EndSection

Finally, be sure to load the glx module by adding the folowing to the module section

    Load           "glx"

PART 5: Setting up Java and Flash Plugins (and JRE)

Java

I used the java plugin from sun in the non-free repositories:

# apt-get install sun-java6-bin sun-java6-jre sun-java6-plugin

If apt says it can’t find the packages, go back to section 1.5 and enable the contrib and non-free repositories.

Flash

UPDATE(September 17 2010): Adobe has just released (as of September 15 2010, I believe) a developer prerelease of Flash 10.2 with, you guessed it, Linux 64 bit support. You could continue using the nspluginwrapper solution until they put the finishing touches on 64 bit flash in linux (and then install from a repository). Or, you can download the prerelease now. Adobe makes it clear that all updating of this prerelease is on you –any bugs or security holes between here and formal release will stick unless you manually update. You want to install it now, you say? Me too.

First off, the folks at the debian forums here http://forums.debian.net/viewtopic.php?f=16&t=53036&sid=8019536786b463ab42f3397f28122174&start=45 are all saying they aren’t having issues with the prerelease. I haven’t either so far. Regardless, be sure to follow the backup instructions unless you’re comfortable doing it yourself. And now, here’s what I did:

First, search your computer for instances of “flashplayer”. I found it in the following directories (you may find it in others, but the process is the same):

/usr/lib/nspluginwrapper/plugins/npwrapper.libflashplayer.so [actual library]
/usr/lib/firefox/plugins/npwrapper.libflashplayer.so [link to library]
/usr/lib/iceweasel/plugins/npwrapper.libflashplayer.so [link to library]
/usr/lib/mozilla/plugins/npwrapper.libflashplayer.so [link to library]

Do not delete the actual library. If the 64-bit plugin goes south again (keep in mind it already did that once), it’ll be nice to have a fallback. Instead, make a backup directory in a place you’ll remember, and then move the proper library links there. To do this, go into a shell and become root:

user@machine:~$ mkdir /path/to/backup/directory/
user@machine:~$ su
root@machine:~# mv /usr/lib/firefox/plugins/npwrapper.libflashplayer.so /path/to/backup/directory/npwrapper.libflashplayer.so-from-usr-lib-firefox-plugins-directory
root@machine:~# mv /usr/lib/iceweasel/plugins/npwrapper.libflashplayer.so /path/to/backup/directory/npwrapper.libflashplayer.so-from-usr-lib-iceweasel-plugins-directory
root@machine:~# mv /usr/lib/mozilla/plugins/npwrapper.libflashplayer.so /path/to/backup/directory/npwrapper.libflashplayer.so-from-usr-lib-mozilla-plugins-directory

Now, download the prerelease from this page:

http://labs.adobe.com/downloads/flashplayer10.html

Then extract the libflashplayer.so file and put it in a new directory. Then create links to this library in the appropriate plugin directories:

user@machine:~$ tar -xvwf /path/to/tarball/flashplayer_square_p1_64bit_linux_091510.tar.gz [or just use a graphical program. doesn't really matter how you extract the "libflashplayer.so" file.]
user@machine:~$ su
root@machine:~# mkdir /usr/lib/adobe-flash-prerelease/
root@machine:~# mv /path/to/tarball/libflashplayer.so /usr/lib/adobe-flash-prerelease/
root@machine:~# ln -s /usr/lib/adobe-flash-prerelease/libflashplayer.so /usr/lib/firefox/plugins/libflashplayer.so.0
root@machine:~# ln -s /usr/lib/adobe-flash-prerelease/libflashplayer.so /usr/lib/iceweasel/plugins/libflashplayer.so.0
root@machine:~# ln -s /usr/lib/adobe-flash-prerelease/libflashplayer.so /usr/lib/mozilla/plugins/libflashplayer.so.0

Restart firefox/iceweasel/mozilla derivative of browser, and flash should be working. Once a polished release is ready, I would recommend removing the prerelease version (much in the same fashion that you did for nspluginwrapper here) and following your distro’s installation process. I doubt any distro will waste time in pushing the release as soon as it’s ready. Either that, or I doubt it will be long before the backports get upgraded like below and the process becomes as simple as installing from them :P

UPDATE (June 23 2010): It appears that this mechanism of updating flash for 64-bit systems is broken: (here && here). From what I can tell, the 64-bit beta from Flash is a security nightmare. As well, Adobe recently announced that they will, “for the time being,” remove support for 64-bit Linux flash plugins. Following this news, no distro is continuing to package the 64-bit version.

You CAN however follow these instructions. If you have pulseaudio issues, then this post might help.

This used apt, but required using a backport. Add the following to your /etc/apt/sources.list file:

deb http://www.backports.org/debian lenny-backports main contrib non-free

Then do the folowing:

# apt-get update
# apt-get -t lenny-backports install debian-backports-keyring flashplugin-nonfree

If you ever want to update the flash player, execute this in a shell

# update-flashplayer-nonfree --install


Why I used the repository

Honestly? Convenience. The flash version is the latest. The java version is the latest. However, if you absolutely HAVE to have a 64-bit java jre (NOT a plugin for applet support) then you CAN install Sun’s x86_64 beta jre here:

http://java.com/en/download/manual.jsp

And follow the instructions here:

http://java.com/en/download/help/5000011400.xml

PART 6: Setting up Skype

###(http://forum.skype.com/index.php?showtopic=102268 ; explains what packages need to be installed to work on Lenny)

First, be sure to have the ia32-libs-* packages installed (see section 1.5). Then, install the following:

apt-get install libqt4-dbus libqt4-network libqt4core libqtgui4

Now, get the Debian .deb file from Skype:

http://www.skype.com/download/skype/linux/choose/

When you try to install this, it will complain that the architecture is 64 bit but the package is 32 bit. The only way to get this to install is to use the –force-all flag

# dpkg -i --force-all skype.deb

There IS a 64 bit .deb file for Ubuntu. I do not know if it will compile under a Debian Lenny system though.

PART 7: Setting up Truecrypt

###(http://wiki.archlinux.org/index.php/TrueCrypt ; I used method two to modify the sudoers file)

First, download the x86_64 tarball from the truecrypt website:

http://www.truecrypt.org/downloads

Then install some required dependencies:

# apt-get install fuse-utils dmsetup

Extract the tar-ball. This will present a runable file. Execute this file:

user@location:~/$ tar -zxvf truecrypt-6.3a-ubuntu-x64.tar.gz
# ./truecrypt-6.3a-setup-ubuntu-x64

It will ask you whether or not you want to create a .deb file. Do so. You will then have a .deb file. Build it:

# dpkg -i truecrypt.deb

Preventing root and user permissions problems

Before creating any containers or encrypting any partitions –if you try to do so before following this, you get a prompt for a password that won’t recognize the root password as being such– add a line to the sudoers file by executing the following program as root:

# visudo

This will drop you into a nano-like editing environment. Add this, replacing USERNAME with your username:

# for truecrypt
USERNAME ALL=NOPASSWD: /usr/bin/truecrypt

If you want to instead create a “group” that can access the truecrypt program (as opposed to a single user), then follow method two in the given link at the top of this section.

PART 8: Setting up Vuze (BitTorrent client)

###(http://www.myscienceisbetter.info/install-vuze-on-ubuntu-64bit.html ; Explains the trick to get it to work on a 64 bit system)

First, be sure to have Java installed (see section 5). Then download the latest version of Vuze here:

http://www.vuze.com/

Extract it to whatever directory you want.

Now the trick: the swt.jar file that comes with the latest version is 32 bit. We need the latest 64 bit one. Get it here:

http://eclipse.ialto.org/eclipse/downloads/drops/R-3.5-200906111540/

The particular file you are looking for (as of March 17 2010) is “swt-3.5-gtk-linux-x86_64.zip” . If the above link is a dead-end (404, whatever), keep going further up the tree, checking higher and higher directories until you can re-navigate towards something else that looks like the given filename.

Extract the file and move the new swt.jar file into the vuze folder:

user@location:~/$ unzip swt-3.5-gtk-linux-x86_64.zip
$ mv swt.jar /location/to/extracted/vuze/

Run vuze by executing “vuze” at a shell:

user@location:~/$ vuze

PART 9: Setting up VLC

Preventing playback issues due to repository conflicts

###(http://sidux.com/PNphpBB2-viewtopic-t-11182.html ; Fourth post by “hubi” from the top)

IMPORTANT: If you have installed VLC or any of the below library packages (like ffmpeg or libavdevice52), please do the following FIRST to “purge” your system (not in the actual ‘apt’ sense, but to get this to work) by following this set of instructions. If you have NOT installed VLC or the library packages (but HAVE followed the fourth piece of advice in section 1.5) then jump down to the install portion.

First, remove certain libraries and such from your machine. Remove VLC as well if it is installed:

# apt-get remove ffmpeg libavcodec51 libavdevice52 libavformat52 libavutil49 libpostproc51 libswscale0
# apt-get remove vlc vlc-nox

If VLC was installed, also remove this directory:

user@location:~/$ rm ~/.vlc/cache/*.dat 

Then, go into your /etc/apt/sources.list and disable the debian-multimedia.org repositories. I use nano:

# nano /etc/apt/sources.list

A “#” character in front of the debian-multimedia repository entry should do the trick. Like such:

#deb http://www.debian-multimedia.org lenny main

Then, reinstall the libs:

# apt-get update
# apt-get install ffmpeg libavcodec51 libavdevice52 libavformat52 libavutil49 libpostproc51 libswscale0

Then, create a file called preferences in /etc/apt :

# nano /etc/apt/preferences

Put the following in there:

Package: ffmpeg libavcodec51 libavdevice52 libavformat52 libavutil49 libpostproc51 libswscale0
Pin: origin debian.org
Pin-Priority:999

This ensures that future updates to those packages come from debian repositories and not the debian-multimedia.org repository.

Now, re-enable the debian-multimedia repository by using nano:

# nano /etc/apt/sources.list

And then removing the “#” character you put in front of the debian-multimedia repository earlier.

Then, apt-update:

# apt-get update

Installing VLC

NOW, install vlc:

# apt-get install vlc vlc-nox

Why I used the repository

Because the version in the repository was able to play everything I could throw at it without hassle. Since this was the case, I felt no need to go through a nightmarish headache of trying to get the latest version to compile under Lenny. I might try that out later if I have time :P

PART 10: Installing LaTeX stuff

LaTex lets you type mathematical equations and such in a very systematic and neat way. It is superior to any other typesetting language or set-up in this regard. I’ve used it for years to type up mathematics assignments (and in posts on this blog). A google search for “LaTeX tutorials linux texlive” ought to bring about good results if you want to learn how to use it.

# apt-get install texlive texlive-latex-extra texlive-math-extra

This gives all of the necessary command-line tools to use LaTeX.

PART 11: Installing gscan2pdf

This is a much better –well, perhaps more intuitive– GUI than Xine. It lets you scan directly to pdf, which I find highly useful when archiving paperwork onto my machine:

# apt-get install gscan2pdf

Using English OCR

If you want to use tesserect (Google’s open-source OCR) in English, then install this library:

# apt-get install tesseract-ocr-eng

PART 12: Setting up Wireshark

Wireshark (formerly known as Ethereal) is a network analyzer. I won’t go into the specifics about all the amazing stuff this program can do. You can read about it here:

http://www.wireshark.org/about.html

Install via apt-get:

# apt-get install wireshark wireshark-common

Why I used the repository

The Debian Lenny repositories have the “old stable” (1.0.2) version of Wireshark. The latest stable build is 1.2.6. However, I only use Wireshark as a means of lightly inspecting network traffic –usually when I want to see what certain applications send and receive– and making sure torrents are handled correctly on my network. The old stable version is fine for this purpose.

PART 13: Setting up kchmviewer

This allows me to view downloaded .chm files on a linux box.

# apt-get install kchmviewer

PART 14: Setting up kernelcheck

UPDATE (April 1 2010): The patched file is no longer being hosted at the old link further down this section. Download it here instead:
http://www.mediafire.com/?inrmjitykjy

###(http://ubuntuforums.org/showthread.php?t=618563&page=48 ; This entire thread is very helpful. Pages 48 and 49 are probably most relevant)

###(http://kcheck.sourceforge.net/pool/Documentation-Lumen.pdf ; Official documentation (pdf) )

Kernelcheck makes updating to the latest kernel an automagical experience. This was the LAST program I installed. Even then, it compiled the latest kernel (and added it to GRUB automatically too) without any hassle besides installing the Nvidia drivers again.

(April 1 2010: Download the file from link at top of this section)
Getting the PATCHED kernelcheck:
https://sites.google.com/site/stevosfilehideaway/Home/kernelcheck-1.2.5_mlrepo3.zip?attredirects=0

Extract the file and compile the .deb file:

user@location:~/$ unzip kernelcheck-1.2.5_mlrepo3.zip
# dpkg -i kernelcheck_1.2.5-4mlrepo3_all.deb

The GUI is very self-explanatory and makes installing the latest (2.6.32.9 candella) kernel a snap. When you reboot, just make sure to reinstall your video drivers as in section 2. (The key thing will be reinstalling the appropriate kernel headers; the other programs are already installed.)

PART 15: Setting up Media Playback (DVD + mp3)

###(http://www.linwik.com/wiki/configuring+media+and+dvd+playback+in+debian+gnu+linux+5.0 ; good explanation)

I make extensive use of VLC to play lots of different media (avi, x264, mpeg, etc). However, I still like to have mp3 and dvd support on the system. You can enable dvd playback and mp3 support by setting up the debian-multimedia repository and then installing some libraries.

Setting up the debian-multimedia repository

IMPORTANT: Be sure to create the /etc/apt/preferences file mentioned in section 1.5. This will ensure that you don’t break VLC when using the debian-multimedia repository.

First, add the following line to /etc/apt/sources.list (I use “nano /etc/apt/sources.list” at a shell to do the job) :

deb http://www.debian-multimedia.org lenny main

Now, get the multimedia keyring so apt doesn’t complain about it:

# wget http://www.debian-multimedia.org/pool/main/d/debian-multimedia-keyring/debian-multimedia-keyring_2008.10.16_all.deb
# dpkg -i debian-multimedia-keyring_2008.10.16_all.deb

Finally, update apt:

# apt-get update

Installing the appropriate libraries

Install the following to have mp3 and dvd playback support:

# apt-get install gstreamer0.10-plugins-bad gstreamer0.10-plugins-ugly gstreamer0.10-lame libdvdcss2

PART 16: Hardware Notes

IMPORTANT: These notes are under the assumption that you have used kernelcheck to upgrade to 2.6.32 kernel. However, I’d imagine that my hardware would have behaved the same on 2.6.22 as well; it isn’t bleeding edge equipment.

Mouse

My model is a Logitech MX-518. It behaved as expected. The increase and decrease dpi buttons gave me the low, medium and high settings. The mousewheel behaved properly. The two side buttons (near the thumb) worked.

Printer

My model is a HP Officejet 5610 All-In-One. I plugged it in, but could not get it to work for the life of me. I did a cold reboot (shutdown completely, turn back on) and all the problems disappeared. The printer behaved flawlessly.

Microphone

I use an analog Logitech microphone for use with Skype. I cannot for the life of me find a model number; it was sold at best-buys as being “for use with Skype.” Setting up the microphone for use with soundrecorder (and Audacity and Skype) required the following setup:

1.) Open volume control (right-click the audio icon in the top-right corner, click volume control).
2.) Go to preferences (edit->preferences) and be sure the following are enabled:

  • Master
  • PCM
  • Front
  • Line-In
  • cd
  • Microphone
  • Microphone Boost
  • Capture
  • Digital
  • Headphone
  • Input Source
  • Input Source
  • Input Source

You may or may not have each of these available depending on your setup. The key components however are the microphone, microphone boost, capture, and input sources.

Upon doing this, you should have four tabs in the volume control program: PLAYBACK, RECORDING, SWITCHES, OPTIONS. Go to PLAYBACK and ensure that microphone and microphone boost are enabled; I have the boost at 2/3 of max. Go to RECORDING and be sure that both capture and digital are enabled and maxed. For some reason that I cannot figure out, I could not use one and not the other. They appear to be linked and will not function separately. Then go to OPTIONS and select “Mic” for the first input source.

Varying capture levels with soundrecorder, Audacity, and Skype

For soundrecorder, I had to lower the microphone boost option. Setting it too high would just result in lots of distortion.
In Audacity, I needed the microphone boost to be at 2/3 of max to properly pick up voice. In Skype, 2/3 boost appeared effective as well.

PART 17: Conclusions

I highly doubt that EVERYTHING listed here is 100 percent accurate. I’m just a user, not a guru. If you try something here that doesn’t work, PLEASE leave a comment. I’ll do my best to help you or to fix whatever errors you’ve found in this blog post. I hope I’ve been of help to someone and would appreciate any comments indicating such.

Older Posts »