Saturday, June 09, 2007

xine: no demuxer plugin available to handle file

I recently installed xine on my Fedora Core 6 virtual machine. Trying to view a file, I get this error:
There is no demuxer plugin available to handle "file xxx"
Usually this means that the file format was not recognized.



After a bit of googling, I found that this error can be caused by a couple things:
1) a corrupted .xine/catalog.cache file
2) a bad xine-libs install

I also learned that you can run "xine-check" to check out your xine installation. Here's the result of my xine-check before fixing things:
[root@localhost ~]# xine-check
Please be patient, this script may take a while to run...
[ good ] you're using Linux, doing specific tests
[ good ] looks like you have a /proc filesystem mounted.
[ good ] You seem to have a reasonable kernel version (2.6.18-1.2798.fc6)
[ good ] intel compatible processor, checking MTRR support
[ good ] you have MTRR support and there are some ranges set.
[ good ] found the player at /usr/bin/xine
[ good ] /usr/bin/xine is in your PATH
[ hint ] No xine-config found. Assuming xine from RPMs
The xine-config script can be used to determine some file locations
used by xine-lib, but you don't have such a script on your system.
However, it looks like you installed xine from the RedHat packages.
So I'll just guess that you are using the standard locations.
If you want me to be sure about those file locations, you can install
the 'xine-lib-devel' package (or 'xine-devel', depend on what packages
you're using, which contains xine-config. However, this package is
not really needed to run xine...
press to continue...

[ good ] plugin directory /usr/lib/xine/plugins exists.
[ good ] found unknown plugin: *.so
[OUCH!!] There are no input plugins.
xine needs at least one input plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...

[OUCH!!] There are no demux plugins.
xine needs at least one demux plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...

[OUCH!!] There are no decoder plugins.
xine needs at least one decoder plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...

[OUCH!!] There are no video_out plugins.
xine needs at least one video_out plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...

[OUCH!!] There are no audio_out plugins.
xine needs at least one audio_out plugin, but none is installed.
You should probably reinstall xine-lib...
press to continue...


OK! So it looks like I have a few problems. But now, at least, I had two avenues to pursue:
1) delete .xine/catalog.cache
2) reinstall xine and xine-libs

I tried the first option, but to no avail. I got the same error.

Secondly, I reinstalled xine-libs, but still received the same error. Since I've had some yum repository conflicts this weekend, I started thinking that Livna or Dries might be at fault here, as they are my main repositories.

So then, I decided to:
1) remove xine and xine-libs
2) try to install xine without the Livna repos online.

Doing this, I got this error with only the Fedora and Dries repos online:
Error: Missing Dependency: xine-lib = 1.1.4 is needed by package xine-lib-moles

Hmmm. OK, so that didn't work. Let me try the next option:
1) remove xine and xine libs
2) install the Freshrpms repositories
3) rerun the install without Livna, but with Dries and Freshrpms

I installed the Freshrpms repos by using the below URL to start the yum graphical installer widget on the Core 6 desktop:
http://ftp.freshrpms.net/pub/freshrpms/fedora/linux/6/freshrpms-release/freshrpms-release-1.1-1.fc.noarch.rpm

After Freshrpms repos were online, I disabled Livna in my yum install request:
[root@localhost ~]# yum install --disablerepo=livna xine
Loading "installonlyn" plugin
Setting up Install Process
Setting up repositories
freshrpms 100% ========================= 2.1 kB 00:00
Reading repository metadata in from local files
primary.xml.gz 100% ========================= 62 kB 00:00
################################################## 168/168
Parsing package install arguments
...
Dependencies Resolved

=======================================
Package Arch Version Repository Size
=======================================
Installing:
xine i386 0.99.5-1.fc6 freshrpms 2.2 M
Installing for dependencies:
libfame i386 0.9.1-12.fc6.rf dries 227 k
xine-lib-moles i386 1.1.6-1.fc6 freshrpms 1.8 M

Transaction Summary
=======================================
Install 3 Package(s)
Update 0 Package(s)
Remove 0 Package(s)

Total download size: 4.3 M
Is this ok [y/N]: y
Downloading Packages:
(1/3): xine-0.99.5-1.fc6. 100% ========================= 2.2 MB 00:21
(2/3): libfame-0.9.1-12.f 100% ========================= 227 kB 00:01
(3/3): xine-lib-moles-1.1 100% ========================= 1.8 MB 00:17
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Installing: libfame ######################### [1/3]
Installing: xine-lib-moles ######################### [2/3]
Installing: xine ######################### [3/3]

Installed: xine.i386 0:0.99.5-1.fc6
Dependency Installed: libfame.i386 0:0.9.1-12.fc6.rf xine-lib-moles.i386 0:1.1.6-1.fc6
Complete!


This time, no missing dependency! Looks like Freshrpms had the necessary files! Sweet! Now for the final test, to play a video. Sure enough, my videos played and xine-check found my plugins. Hooray. But yeesh..what a headache!

So, the lesson here is that Fedora dependency resolution can be a tricky thing and that you should keep as few repos in your yum repository list as possible. This will minimize your pain. Though I must admit that, on the whole, the repos are doing a better job than they used to.

Finally, if the options above don't work, try compiling from source:
http://www.xinehq.de/index.php/download

May you all be blessed to work with just one repository. Ha!

Update 2/25/2008
This latest post provides further troubleshooting steps. It lists specific information regarding Xine installs on Fedora 7, x86-64:

/2008/02/xine-install-on-fedora-7-x86-64.html

Fedora Core 6 virtual Cinelerra machine for VMware

I got a wild hair yesterday and decided to create a Fedora Core 6 VMware virtual machine for VMware Player. This virtual machine (vm) has the latest Cinelerra CVS version 1009 compiled and installed on it, of course, along with a bunch of supporting applications:
avidemux2 flash mplayer vlc xine

I'm thinking the main use for this vm is for render farms. So that someone who has access to a large number of PCs can setup VMware Player or Server.

Here are some instructions on how to install VMware Player on Linux:
http://www.techanswerguy.com/2007/06/vmware-player-install-on-linux-fedora.html

By the way, I believe audio only works using VMware Player, rather than VMware Server. Also, if you try this vm for actual editing, you'll probably get a lot of audio drops unless the machine hosting the virtual guest is very, very powerful (greater than 3.0Ghz single core).

In case you try this vm and get no audio, here's a solution:
http://www.techanswerguy.com/2007/06/vmware-player-no-sound-bad-directsound.html

Also, I've left the default display at 1024x768.

The virtual machine is gzipped and is about a gigabyte in size (1,151,131,294 bytes). Have fun downloading it!
http://www.stormpigs.com/vm/fc6cinelerra.tar.gz

Root password is crazedmule
The nonroot user is "cinelerra" with the password cinelerra

Update 2009/04/03
Update:
I've superceded this VM with a 64-bit version. This vm uses Fedora 10, x86-64 and will only play on Intel machines that support 64-bit OSs:
http://www.stormpigs.com/fedora10Vm.html
*** end update *** ~3GB

Hopefully, someone will find this useful. Please drop me a line..love to hear from you.
The Mule!

dreaded x264 compile error: 'struct ' has no member named 'b_cbr'

For fun, I built out a virtual Fedora Core 6 machine with Cinelerra and all supporting apps installed to share with the world (fedora-core-6-virtual-cinelerra-machine.html). During the process, however, I received an error while compiling the package:
 gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -DHAVE_AV_CONFIG_H -I./.. -g -O2 -MT x264.lo -MD -MP -MF .deps/x264.Tpo -c x264.c  -fPIC -DPIC -o .libs/x264.o
x264.c: In function 'X264_init':
x264.c:139: error: 'struct ' has no member named 'b_cbr'
make[5]: *** [x264.lo] Error 1
make[5]: Leaving directory `/opt/hvirtual/quicktime/ffmpeg/libavcodec'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/opt/hvirtual/quicktime/ffmpeg/libavcodec'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/opt/hvirtual/quicktime/ffmpeg'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/opt/hvirtual/quicktime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/opt/hvirtual'
make: *** [all] Error 2

Good Lord! What is this? When I did my first Cinelerra CVS install back in April (fedora-core-6-cinelerra-dependencies.html), I didn't encounter this error. And I was only using the same dries, livna and standard Fedora repositories. So something must have changed with the repositories between the beginning of April and now, early June. But what gives with the compile failure?

No sense complaining about it. Let's just see if someone else has encountered it and we'll fix it. Sure enough, folks on the Ubuntu boards had seen it:
http://ubuntuforums.org/showthread.php?t=215252

Essentially, the problem is that the version of Cinelerra is incompatible with the version of x264. The x264 from Livna is rev. 537 and Cinelerra is version 2.1 (at this time, rev. 1009). We'll use x264 rev. 536 to alleviate the problem.

The solution is hard to pick through on that forum posting, so I will condense the steps to fixing it here:
1) uninstall x264
2) download x264 revision 537
3) compile x264 with specific options
4) reinstall packages that were removed when we uninstalled x264
5) install x264 program files
6) patch directories in the Cinelerra source tree
7) configure Cinelerra with specific options
8) compile Cinlerra and hopefully, install!

1) uninstall x264
yum remove x264

This will remove a bunch of other packages:
Running Transaction
Removing : mjpegtools ####################### [ 1/10]
Removing : mjpegtools-devel ####################### [ 2/10]
Removing : mjpegtools-libs ####################### [ 3/10]
Removing : ffmpeg ####################### [ 4/10]
Removing : ffmpeg-libs ####################### [ 5/10]
Removing : x264 ####################### [ 6/10]
Removing : mencoder ####################### [ 7/10]
Removing : x264-devel ####################### [ 8/10]
Removing : libquicktime ####################### [ 9/10]
Removing : mjpegtools-gui ####################### [10/10]


Don't worry, we'll replace them in Step 4.

2) download x264 revision 537
Assuming you have subversion installed, go get rev 536 of x264:
svn checkout svn://svn.videolan.org/x264/trunk x264 -r536

3) compile x264 with specific options and make the x264 program files
From the directory in which you downloaded the x264 source code, run:
./configure --extra-cflags=-fPIC --extra-asflags=-D__PIC__
make


4) reinstall packages that were removed when we uninstalled x264
yum --disablerepo=dries install ffmpeg libquicktime mencoder mjpegtools*

Note that I have the Fedora Core, Extras, Updates, Livna and Dries repositories only listed in yum when I run the install.

Here we see the final result of the install:
Running Transaction
Installing: x264 ######################### [1/9]
Installing: ffmpeg-libs ######################### [2/9]
Installing: ffmpeg ######################### [3/9]
Installing: libquicktime ######################### [4/9]
Installing: mjpegtools-libs ######################### [5/9]
Installing: mencoder ######################### [6/9]
Installing: mjpegtools ######################### [7/9]
Installing: mjpegtools-devel ######################### [8/9]
Installing: mjpegtools-gui ######################### [9/9]


Notice that installing the programs will also the bad version of x264. In the next step, I will overwrite the program files of the conflicting version of x264 with the working, rev. 536 version.

5) install x264 program files
In the directory you compiled x264, run:
make install

Doing this, I have overwritten the conflicting version of x264 with the one that works with Cinelerra.

6) patch directories in the Cinelerra source tree
In the Cinelerra source tree directory, hvirtual, create these missing directories and fill with appropriate files:
mkdir plugins/chromakey-hsv && cp plugins/chromakeyhsv/* plugins/chromakey-hsv
mkdir plugins/seltempavg && cp plugins/denoiseseltempavg/* plugins/seltempavg/


Take a look at them to make sure they exist and have files in them:
[root@localhost hvirtual]# ls plugins/chromakey-hsv/
chromakey.C chromakey.h Makefile Makefile.am Makefile.in picon.png picon_png.h
[root@localhost hvirtual]# ls plugins/seltempavg/
Makefile Makefile.in picon_png.h seltempavg.C seltempavgwindow.C
Makefile.am picon.png restart_marker.png seltempavg.h seltempavgwindow.h


7) configure Cinelerra with specific compiler options
./configure --with-pic

for Ubuntu 64-bit users, this configure syntax may need to change to this:
./configure --with-pic --disable-shared --enable-static

I cannot confirm this as I am not an Ubuntu user.

To explain: as a general rule, Cinelerra themes and plugins are loaded dynamically as modules. If static linking is defined (the --enable-static part of the command), the SUV theme will not get built as it is not designed for static linking in the CVS tree. A corrolary to this is that if you disable shared libraries (the --disable-shared part of the command), the SUV theme also doesn't get built. My testing on FC6 bears this out.

The unfortunate thing is that if the SUV theme is not built, you'll get this nasty error when you try to startup Cinelerra and the program won't start for love or money:
MWindow::init_theme: theme S.U.V not found

I have not found a workaround, so if at all possible, do not use those two switches in your configure command.

8) compile Cinlerra and hopefully, install!
make
make install


These steps fixed my problem. Hopefully, they will fix it on your system.

Good luck!

Sunday, June 03, 2007

how to backup a LVM volume

excellent tutorial on LVM:
http://www.howtoforge.com/linux_lvm

how to back them up
http://www.howtoforge.com/linux_lvm_snapshots