SoC 2011/Stereoscopic Video
This project is part of Google Summer of Code 2011.
|
Contents
Building from Source
At the present state you must acquire the source code of the stereoscopic 3D branch and build it yourself. [1]
There are build instructions in a file named 'STEREOSCOPY README' but I'll also repeat the instructions here.
Build Environment
I use 32-bit MSYS/x86 Windows 7. To set up your build environment first follow through the instructions on [Win32CompileMSYSNew] to make sure you're able to build VLC successfully on your system.
The following build instructions should work on any Windows system.
Building
Create a new empty directory somewhere, and at the MSYS terminal type:
git pull git://github.com/MessiahAndrw/Stereoscopic-VLC.git
To bootstrap the build I use the following:
cd vlc cp -v /usr/win32/share/aclocal/* m4/ cp -v /usr/share/aclocal/* m4/ PATH=/usr/win32/bin:$PATH ./bootstrap
Then to configure:
sh extras/package/win32/configure-msys.sh
Finally to build:
PATH=/usr/win32/bin:$PATH make package-win32 -j6
(The -j6 switch is optional and tells makefile to use 6 threads, it speeds up the build time on my 6-core machine.)
'make package-win32' will exit with the following error but that's normal and VLC has still been built:
cp: cannot stat `./npapi-vlc/installed/lib/npvlc.dll': No such file or directory
If everything else was successful you will now have built VLC with stereoscopic support! You will find this build in the directory 'vlc-1.2.0-git'.
Note on 3D Vision support
nVidia 3D Vision only activates for windowed-mode programs which are supported by the nVidia driver. At the present state VLC is not supported by the nVidia driver. However, the driver only performs a simple file-name check of the application, so as a workaround you can rename vlc.exe to the same file-name as a supported application. This can be done simply by:
cd vlc-1.2.0-git mv vlc.exe wow.exe
Splitting
To play a stereoscopic 3D video you must tell the stereoscopy module how to get the image for each eye. The stereoscopic module is takes a 2D input picture, and produces 2 output pictures (one for the left eye, and one for the right eye).
Command line
To enable the stereoscopic module you should add the following command line parameters when you start vlc:
--video-filter="stereoscopy" --stereoscopy-left="<left>" --stereoscopy-right="<right>"
Where <left> and <right> are valid input formats (see the table below).
QT4
You can configure the stereoscopy module through the QT4 interface. To do this, open the 'Tools' menu and click on 'Effects and Filters'. In the 'Adjustments and Effects' dialog that opens navigate to the 'Video Effects' tab. Then find the sub-tab titled 'Stereoscopy'. Check 'Split' to enable the stereoscopy module to split the image into separate left and right frames. Select your video's input formats for the 'Left Eye and the 'Right Eye'.
Input formats
Developer notes
picture_t contains a new field i_eye that is the eye the picture represents. Valid values at the moment are:
0 | The picture is 2D. |
1 | The picture is destined for the left eye. |
2 | The picture is destined for the right eye. |
The default value for i_eye is 0, and all present video codecs output frames where i_eye is 0. It is up to the stereoscopy module to split it into left and right. But it's possible for someone to develop a video codec that output pictures where i_eye>0, for example for a container format where the data is stored as separate left/right images. In this case the stereoscopy module does nothing, and forwards the pictures on as is.