stereoscopic mplayer working again part 2

One year ago I provided a patch for mplayer which included support for quad-buffered stereo, enabling mplayer to display stereoscopic movies. In the meanwhile mplayer-1.0_rc4_p20101114 arrived in portage. As before with the original patch from Stuart Levy, my one does not work anymore due to some changes in mplayers gl2 driver. So I had to modify the patch again to work again with newer mplayer versions. You may download the updated patch from here:

[download#54]

The patch should work at least with nvidia quadro boards, probably with some others. It can be used with CRT and generic shutter glasses or HMDs like the Vusix VR920. Some stereoscopic sample movies for trying it out can be found on www.3d.wep.dk.

The Gentoo way

For Gentoo users I again modified the mplayer ebuild from portage to include the patch. The modified ebuild is available here:

[download#53]

The older ebuild and patch are still available on mygnu.de.

To use the ebuild it just copy it to /usr/local/portage/media-video/mplayer and copy the the patch to the “/usr/local/portage/media-video/mplayer/files” directory. You probably have to create these directories. Then run

ebuild /usr/local/portage/media-video/mplayer/mplayer-1.0_rc4_p20101114-r1.ebuild digest

Be sure to include the following line in your /etc/make.conf.

PORTDIR_OVERLAY=”/usr/local/portage”

Then just re-emerge mplayer.

Now start mplayer with -vo gl2:stereo and enjoy the experience in the 3rd dimension again.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

bino 0.8.1 released

Last year I wrote about bino, a stereoscopic video player that is usable with linux and also supports quad buffered stereo. In the meanwhile the versions 0.8 and 0.8.1 have been released. Thanks  for your work, Martin. The new versions contain some bug fixes and the following new features:

  • Adjustable ghostbusting to reduce crosstalk artifacts.
  • Parallax adjustment.
  • Mouse-based seeking.
  • Initial support for choosing an audio stream.
  • Improved compatibility with many video types.

Bino still does not work properly with linux, at least it does not display anything on my gentoo box. The good news is that my patch for bino, I provided here, still works.

The Gentoo way

For gentoo users here is my overlay including the ebuild: [download#52] Download the overlay (it includes the patch) and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge bino and enjoy viewing your 3d movies.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

bino – viewing 3d stereo videos with linux

A while ago I updated the stereocopic mplayer patch to work again with newer mplayer versions. This patch worked to display side by side stereo movies in quad buffered stereo mode but it did not enable mplayer to display stereo videos consisting of two separate video streams for the right and the left eye like those produced with Fujifilm Real 3D cameras.  A player capable of displaying these files and many other stereoscopic movie formats is bino. I recognized that bino is also capable of displaying a single video stream in quad buffered stereo mode. For a future version it would be really nice to have it calculating a 3D version of the stream on the fly and displaying this fake stereo video. There are some algorithms known that are capable of doing this calculation. It should be possible to do this in parallel on the GPU, so processing power should not be the problem… Of course such a fake stereo video cannot have the quality of a real stereo one, but it may be the only possibility to watch ones favorite movie in stereo.

Problems

At least on my gentoo box bino failed to display anything. When requesting quad buffered stereo (bino -o stereo) it failed with:

bino: [err] display does not support stereo mode

When trying to start bino without quad buffered stereo it failed with:

bino: [err] cannot set GL context format

The reason for this was found quickly. Bino was requesting an alpha visual, which did not succeed. I have not seen the point in requiring an alpha visual for bino, so I just removed this. You may download the patch from here: [download#51]

Current patches for can be found here.

Getting things to work

Download Bino from here: bino-0.7.tar.xy and extract it.

tar -xf bino-0.7.tar.xz

Afterwards apply my patch and compile Bino.

cd bino-0.7

patch -p0 < bino-0.7-quad-buffered-stereo.patch

./configure

make

make install

The Gentoo way

For gentoo users here is my overlay including the ebuild: [download#50] Download the modified overlay (it includes the patch) and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge bino and enjoy viewing your 3d movies.

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

gentoo ebuild for glsldevil-1.1.5

Some days ago I wanted to get some information on how OpenSceneGraph internally performs the rendering, to prepare for my B.Sc. thesis. Especially I wanted to know if it really uses Vertex Buffer Objects when I “force” Graphics Nodes to do so. Code analysis would have taken to long and would not have been proof enough for me. Thus I needed an OpenGL debugger. A nice one I found is glsldevil, which was developed at the university of Stuttgart. It can not only debug pure OpenGL, but also GLSL shaders.

glsldevil screenshot

glsldevil

For gentoo I found an old ebuild somewhere in the web and modified it for the new version of glsldevil. Here is my overlay including the modified ebuild: [download#47]

Download the overlay and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge glsldevil.

regards

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

FlightGear with quad buffered stereo

With my upcoming new headtracking driver for the vusix vr920 hmd it is likely that I manage to get the famous flight simulator FlightGear to work with it. This led me again to the problem that FlightGear does not work in quad buffered stereo, as  I described in my comment to FlightGEAR 2.0.0 on GENTOO.

One expects to enable stereoscopic mode in FlightGear starting it with the following line:

export OSG_STEREO_MODE=QUAD_BUFFER;export OSG_STEREO=ON; fgfs

When starting flightgear this way, one gets the following console output and no stereoscopic view:

Warning: detected OpenGL error ‘invalid operation’ after RenderBin::draw(,)

Getting FlightGear to work with quad-buffered stereo

Doing some code analysis in OpenSceneGraph-2.8.0 I discovered the following lines of code in View.cpp:

osg::DisplaySettings* ds = osg::DisplaySettings::instance();
if (ds->getStereo())
{
switch(ds->getStereoMode())
{
case(osg::DisplaySettings::QUAD_BUFFER): traits->quadBufferStereo = true; break;
case(osg::DisplaySettings::VERTICAL_INTERLACE):
case(osg::DisplaySettings::CHECKERBOARD):
case(osg::DisplaySettings::HORIZONTAL_INTERLACE): traits->stencil = 8; break;
default: break;
}
}

It seems that the stereo context in FlightGear does not get initialized properly in WindowBuilder::makeDefaultTraits(bool stencil). Thus these lines have to be added to WindowBuilder.cxx. For convenience here is the patch against  FlightGear-2.0.0: [download#43]

Perhaps some nice FlightGear developer can include this into upstream code. You have to use a professional graphics board that supports quad buffered stereo, like a NVIDIA Quadro FX or a Ati FireGL and proper display hardware, like shutter glasses, a HMD or a stereoscopic projection system, to benefit from it.

Problems remaining

When using the quad buffered stereo mode in flightgear there occur some graphics errors. These are not very annoying, but they are there. Some cockpit controls and other scene details contain yellow lines, like a wireframe,  which are not there when starting FlightGear in “normal” display mode. I suspect this to be another bug in FlightGear, which has still to be located. See the screenshots below for details. The problematic parts of the scenes are marked red. Especially the night pictures show the problem. This problem does not only exist in quad buffered stereo mode, but also in other stereo modes like HORIZONTAL_SPLIT.

flightgear_1

FlightGear by day, quad-buffered stereo, with errors

flightgear_2

FlightGgear by day, no stereo, without errors

flightgear_3

FlightGear by night, quad-buffered stereo, with errors

flightgear_4

FlightGear by night, no stereo, without errors

The Gentoo way

For gentoo users here is my overlay including the modified ebuild: [download#44] Download the modified overlay (including the patches) and extract it in /usr/local/portage. Be sure to include the following line in your /etc/make.conf:

PORTDIR_OVERLAY=”/usr/local/portage”

Then emerge flightgear and enjoy it in three dimensions.

Have fun

Jürgen

Tool to increase your alexa rank instantly

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

grep for pdfs

Did you ever miss the functionality to perform a full text search in multiple pdf files from the command line in linux?

With the linux command grep one can search for a given text in multiple files.  If you don´t know it already you can find some information about grep here.  Sadly it can not be used for searching in pdf files, which is certainly an important task. Imagine you have some thousand pdf files archived on your harddrive and you are looking fore some information contained in them. It is far to much work to open each of them in your pdf viewer and search for the needed information. In this situation a tool like grep is quite handy.

A few days ago I found the interesting tool pdfgrep. It works similar to grep, but can search in pdf files. You can download it from SourceForge. Then build pdfgrep from source.

For gentoo users, as usual there is a more easy way. I wrote a simple  ebuild for pdfgrep. You can download the  ebuild here: [download#41]

To use the ebuild, just copy it to/usr/local/portage/app-text/pdfgrep/. You probably have to create the directory. Then run

ebuild /usr/local/portage/app-text/pdfgrep/pdfgrep-1.1.ebuild digest

Be sure to include the following line in your /etc/make.conf.

PORTDIR_OVERLAY=”/usr/local/portage”

Afterwards just emerge pdfgrep.

Sadly pdfgrep is not capable of recursively searching complete directory structures like one can do with egrep -r. This would enable one to search complete pdf collections. Not a big problem. Just use the following line of code:

find -name “*.pdf”  -exec pdfgrep -C50 -Hni $1 ‘{}’ ‘;’

For convenient use place it into a script file:

echo “find -name \”*.pdf\”  -exec pdfgrep -C50 -Hni \$1 ‘{}’ ‘;'” > /usr/local/bin/pdfrgrep

And make it executable:

chmod +x /usr/local/bin/pdfrgrep

Now you can just cd to the directory of your pdf collection and search it by entering:

pdfgrep [searchterm]

Regards

Jürgen

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)
Loading...

pulseaudio – flash blocks the audio device

On my x86_64 gentoo box, running gnome and therefore pulseaudio, I experienced the problem that when and after playing some flash videos (i.e. youtube) the sound device was blocked and no other application was able to play sound.  After killing the plugin sound worked just normal, but that was no convenient way.

64-bit flash plugin for Firefox

My first suspective was the 32-Bit flash plugin I used  in my 64-bit Firefox until now. So I replaced it by the new 64-bit plugin, which did not solve the problem, since it does also not use pulseaudio for playback. But I include the steps for completeness here:

echo “=www-plugins/adobe-flash-10.2.161.22_pre20100915 **” >> /etc/portage/package.keywords

emerge adobe-flash

For other linux distributions  like Debian, Ubuntu, Redhat or Suse you obviously have  to search the appropriate plugin and  install it the distribution-specific way. Afterwards you have to remove the 32-bit plugin from nspluginwrapper, which makes 32-bit plugins available for 64-bit firefox:

nspluginwrapper  -r /usr/lib/mozilla/plugins/npwrapper.libflashplayer.so

As I stated before this does not solve the problem, but at least it gives one a 64-bit flash plugin 😉

Make alsa applications use the pulseaudio server

There is a pulseaudio plugin for alsa, which is necessary for playback of alsa sound via the pulseaudio server. So the next step is to install this plugin. For gentoo it is contained in the alsa-plugins package. So for the gentoo way:

emerge alsa-plugins

Afterwards make sure that your /etc/asound.conf contains the following lines:

pcm.pulse {
type pulse
}
ctl.pulse {
type pulse
}
pcm.!default {
type pulse
}
ctl.!default {
type pulse
}

After restarting alsa everything that is playing sound via alsa now uses pulseaudio via the plugin and the sound device is no more used concurrently. One can playback via pulseaudio after using flash sites or even at the same time. Mission accomplished!

OSS emulation for pulseaudio

Sadly the above only works for applications directly using the alsa sound system. Applications depending on OSS (i.e. all Java Applications), using the kernel layer alsa oss emulation, still block the audio device, so the the kernel layer OSS emulation is a no go with pulseaudio. Include the corresponding modules in /etc/modprobe.d/blacklist.conf or remove the emulation completely from your kernel configuration.

screenshot

Of course this only shuts off these applications completely but is neccesary for the further steps to work. We´re lucky, we can use a daemon which provides the OSS devices (/dev/dsp, etc.) and links them via fuse to the pulseaudio daemon. For this we need to load the cuse kernel module (add it to /etc/modules.autoload.d/kernel-2.6 and it gets loaded automatically on next reboot)  or when not available add the functionality  to your kernel configuration and rebuild your kernel.

kernel configuration for cuse

Now we´re ready to install ossp, the daemon I mentioned before. It is available from Sourceforge, probably also in your distributions package repository. For gentoo users, as usual there is a more easy way. I found an ebuild for ossp on gentoo bugzilla, which I got to work with minor modifications. You can download the modified ebuild here: [download#40]

To use the ebuild, just copy it to/usr/local/portage/media-sound/ossp/ . You probably have to create the directory. Then run

ebuild /usr/local/portage/media-sound/ossp-1.3.2.ebuild digest

Be sure to include the following line in your /etc/make.conf.

PORTDIR_OVERLAY=”/usr/local/portage”

Also include ossp into your /etc/portage/package.keywords

echo “media-sound/ossp **” >> /etc/portage/package.keywords

Afterwards just

emerge ossp

For having osspd started automatically on every system boot I lazily included it in my /etc/conf.d/local.start.

echo /usr/sbin/osspd >> /etc/conf.d/local.start

Now sound should just work as one expects it to. Different sources can playback at the same time. No blocked devices occur because of concurrency, no matter which sound API the applications use.

Jürgen

References:

BombStrike´s blog: How to use two different computers with two differents OSes seemlessly

H3X.SE: FAQ

Linux Live: ALSA and Jack Cooperate using PulseAudio

Gentoo Bugzilla: osspd ebuild

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

siteinfo

Translator