Tuesday, May 20, 2008

 

32-bit MPlayer on 64-bit Linux, again

Almost exactly one year ago, I published here an essay on building 32-bit mplayer on 64-bit RHE Linux (took me a lot of time when, actually). Reading this over a year later, I can hardly understand how I really managed to do it and how the process worked; it must have been some magic which mplayer configuration did. Anyway, here is much more straightforward and comprehensive approach on building not just mplayer, but whole 32-bit Linux (sub-) system within existing 64-bit OS. It is based on Ubuntu 8.04 "Hardy Heron" , but should work with small modifications on any Debian-based system.

The following largely based on this forum post, which in turn references this tutorial. I will assume that code name of your release is "hardy" and 32-bit root is "/sys32"; make sure to replace with values suitable for your system.

(At this moment you might want to edit your sources.list file to your taste, or remove from there things that are specific to 64-bit system, not that there should be any)

Now comes some controversial step. Full-blown debian installation could take gigabytes of disk space, and only small piece of that is binary data which is different for 32-bit. You can reduce the required disk space by "sharing" certain folders with architecture-independent data between the main system and sub-system, but that has also a site-effect of making certain actions in the sub-system break how things work in your main system. Forum post that I referenced above recommend you share /usr/share/fonts this way, but I decided against it; it costs me about 200Mb more, but adds certain piece of mind. Some directories though are worth sharing.

OK, by now you should have a basic Debian-style 32-bit system under /sys32; this command

would switch you to operate from "within" this sub-system. From this point on, we continue setup from within (note that "chroot" automatically puts us into root-privileged shell, so "sudo" isn't needed)

The last command is just an example; feel free to install whatever you feel like you need, including software built from source, or anything else. MPlayer, among other things, could be built this way without any problems.

Note that when installing from source, it may be useful to do everything but the last installation step from your regular user account, like that:

One last remark: you can install some 32-bit support as part of your 64-bit system, including compiler and run-time libraries (you can't however get build libraries and headers other than building them yourself following steps similar to outlined above). Here it is:

This makes it possible to run gmplayer as /sys32/usr/local/bin/gmplayer, without any change in environment or any dependencies on the 32-bit subsystem.

Labels: , ,


Monday, December 17, 2007

 

Russian subtitles in mplayer

After a few attempts, I successfully made Russian subtitles to work correctly in mplayer. Here how it works:

Labels: ,


Friday, September 14, 2007

 

Copy DVD

Well, the next best thing after using gmplayer is copying (protected) DVDs. Number of good utilities exist under Windows, e.g. free DVD Decrypter and non-free but very good Magic DVD Ripper. Here we will cover what is available under Linux.

First, very good review, and only slightly outdated, is available in Gentoo Wiki. In fact, from all the tools mentioned there I only tried the simplest one: dvdbackup.

Here is what to do:

  1. Install libdvdcss ;
  2. Install libdvdread . Run configure command like that: ./configure --with-libdvdcss-libs=/usr/local/lib
  3. Get dvdbackup;
  4. Goto "src" subdirectory;
  5. (optional) Consider applying this patch;
  6. Compile dvdbackup like that: gcc -I/usr/local/include dvdbackup.c -o dvdbackup /usr/local/lib/libdvdread.a /usr/local/lib/libdvdcss.a -ldl (Note: linking libdvdread.so does not work for some reason, but feel free to use libdvdcss.so)
  7. Copy dvdbackup to /usr/local/bin or whatever
  8. Use like that:
    (to copy DVD)
    dvdbackup -v 4 -M -i /media/cdrecorder -o ~/mytopdir -n my_name
    (to get info)
    dvdbackup -i /media/cdrecorder -I
P.S. To use gmplayer to watch a movie dumped to hard drive use command like that:

gmplayer dvd://1 -dvd-device ~/mytopdir/my_name

Labels: , ,


Friday, May 18, 2007

 

Compiling MPlayer on linux-amd64

I now have a new desktop computer (DELL Precision Workstation 390n, RH Enterprise 4) and already spent a few days setting it up in various ways. Most of the time, it has been straightforward, but setting up MPlayer was much less than trivial.

Here is an overview of the main steps required to install it (MPlayer 1.0rc1-4.1.1 © 2000-2006)

1. 64-bit vs. 32-bit problems

(This section will not apply to you if your OS is 32-bit)

MPlayer must be compiled in 32-bit mode since it invokes proprietary Windows codecs and therefore some basic 32-bit environment must be available. 2. Setting up MPlayer problems 3. Mysterious problems Following a successful compilation, mplayer was able to start and to display movie files, however, any attempt to change playback speed was causing a crash in function vo_update_osd, file libvo/sub.c. Here is what I did to solve the problem: 4. Bonus track

Labels: , ,


This page is powered by Blogger. Isn't yours?