Bino 1.6.0

Next: , Up: (dir)   [Contents]

Bino

This manual was last updated 11 September 2014 for version 1.6.0 of Bino.

Copyright © 2011, 2012, 2013, 2014 Martin Lambers (marlam@marlam.de), Stefan Eilemann (eile@eyescale.ch), Frédéric Devernay (Frederic.Devernay@inrialpes.fr)

Copying and distribution of this file and the accompanying media files, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. These files are offered as-is, without any warranty.

Short Contents:

Table of Contents


Next: , Previous: , Up: Top   [Contents]

1 Introduction

Bino is a 3D video player with multi-display support.

3D videos are more accurately called stereoscopic videos. Such videos have separate views for the left and right eye and thus allow depth perception through stereopsis.

The left and right view of a stereoscopic video can be stored using different layouts. Sometimes the two views are stored as two separate video streams, but most often both views are packed into a single video stream and need to be unpacked by the video player. Bino supports all commonly used layouts. See Input Layouts.

To display a stereoscopic video, the left and right view have to be prepared in a special way so that the left eye sees the left view and the right eye sees the right view. Different display techniques use different approaches to achieve this separation of the two views. Bino supports a wide variety of such techniques. See Output Techniques.


Next: , Previous: , Up: Top   [Contents]

2 Invocation

This section describes the command line interface of Bino.

Synopsis: bino [option…] [file…]

Bino combines all input files into one media source which is then played. This means you can have video, audio, and subtitle streams in separate files. The files are decoded with the FFmpeg libraries, so URLs and other special constructs are supported.

--help

Print help.

--version

Print version.

-n
--no-gui

Do not use the GUI, just play the given input in a plain window using the parameters given on the command line.

--log-file=FILE

Append all log messages to the given file.

-L
--log-level=LEVEL

Select log level: debug, info, warning, error, or quiet.

--list-audio-devices

Print a list of known audio devices and exit.

-A
--audio-device=N

Use audio device number N. N=0 is the default device.

D
--audio-delay=D

Delay audio by D milliseconds. Default is 0.

-V
--audio-volume=V

Set audio volume (0 to 1). Default is 1.

-m
--audio-mute

Mute audio.

--device-type=TYPE

Type of input device: default, firewire, or x11.

--device-frame-size=WxH

If the input is a device, request the given frame size, e.g. 640x480.

--device-frame-rate=N/D

If the input is a device, request the given frame rate, e.g. 25/1.

--device-format=FORMAT

Request format default or mjpeg from device.

--read-commands=FILE

Read commands from file. See Scripting.

--lirc-config=FILE

Use the given LIRC configuration file. This option can be used more than once.

--quality=Q"

Set rendering quality, from 0 (fastest) to 4 (best, default).

-v
--video=STREAM

Select video stream (1-n, depending on the input).

-a
--audio=STREAM

Select audio stream (1-n, depending on the input).

-s
--subtitle=STREAM

Select subtitle stream (1-n, depending on the input).

-i
--input=TYPE

Select input layout. See Input Layouts.

-o
--output=TYPE

Select output technique. See Output Techniques.

-S
--swap-eyes

Swap left/right view.

-f
--fullscreen

Fullscreen.

--fullscreen-screens=[S0[,S1[,…]]]

Use the listed screens S0, …, Sn in fullscreen mode. Screen numbers start with 1. If the list is empty, the primary screen will be used (this is the default).

--fullscreen-flip-left

Flip left view vertically when in fullscreen mode.

--fullscreen-flop-left

Flop left view horizontally when in fullscreen mode.

--fullscreen-flip-right

Flip right view vertically when in fullscreen mode.

--fullscreen-flop-right

Flop right view horizontally when in fullscreen mode.

--fullscreen-3dr-sync

Use DLP® 3-D Ready Sync when in fullscreen mode.

-z
--zoom=Z

Set zoom for videos that are wider than the screen, from 0 (off; show full video width) to 1 (full; use full screen height). The default is 0.

-C
--crop=W:H

Crop the video to the given aspect ratio, to remove borders. 0:0 disables cropping.

-c
--center

Center window on screen.

--subtitle-encoding=ENC

Set subtitle encoding.

--subtitle-font=FONT

Set subtitle font name.

--subtitle-size=N

Set subtitle font size.

--subtitle-scale=S

Set subtitle scale factor.

--subtitle-color=COLOR

Set subtitle color, in [AA]RRGGBB format.

--subtitle-shadow=-1|0|1

Set subtitle shadow, -1=default, 0=off, 1=on.

--subtitle-parallax=VAL

Subtitle parallax adjustment (-1 to +1).

-P
--parallax=VAL

Parallax adjustment (-1 to +1).

--crosstalk=VAL

Crosstalk leak level (0 to 1). Comma-separated values for the R,G,B channels.

--ghostbust=VAL

Amount of crosstalk ghostbusting to apply (0 to 1).

-b
--benchmark

Benchmark mode: no audio, no time synchronization, output of frames-per-second measurements.

--swap-interval=D

Frame rate divisor relative to display refresh rate. The default is 0 for benchmark mode and 1 otherwise.

-l
--loop

Loop the input media.


Next: , Previous: , Up: Top   [Contents]

3 Input Layouts

3.1 Overview

The left and right view of a stereoscopic video can be stored using different layouts. Sometimes they are stored in separate files, sometimes in separate streams inside the same file, and often they are packed into a single video on top of each other or next to each other, with or without a reduction of resolution.

By default, Bino autodetects the input layout from meta data stored in the file (for example, the Matroska and WebM formats have a StereoMode field for that purpose). If no meta data is available, Bino tries to autodetect the input layout based on the file name. See File Name Conventions. If that fails, too, Bino guesses based on the resolution of the input.

3.2 Supported Input Layouts

mono

Single view (2D conventional video).
input-layout-mono

separate-left-right

Separate streams: left view first, right view second.
input-layout-separate-left-right

separate-right-left

Separate streams: right view first, left view second.
input-layout-separate-right-left

alternating-left-right

Alternating frames: left view first, right view second.
input-layout-alternating-left-right

alternating-right-left

Alternating frames: right view first, left view second.
input-layout-alternating-right-left

top-bottom

Single stream: left view top, right view bottom.
input-layout-top-bottom

top-bottom-half

Single stream: left view top, right view bottom, both with half height.
input-layout-top-bottom-half

bottom-top

Single stream: right view top, left view bottom.
input-layout-bottom-top

bottom-top-half

Single stream: right view top, left view bottom, both with half height.
input-layout-bottom-top-half

left-right

Single stream: left view left, right view right.
input-layout-left-right

left-right-half

Single stream: left view left, right view right, both with half width.
input-layout-left-right-half

right-left

Single stream: right view left, left view right.
input-layout-right-left

right-left-half

Single stream: right view left, left view right, both with half width.
input-layout-right-left-half

even-odd-rows

Single stream: left view in even rows, right view in odd rows.
input-layout-even-odd-rows

odd-even-rows

Single stream: right view in even rows, left view in odd rows.
input-layout-odd-even-rows

3.3 File Name Conventions

If the meta data stored in a file does not indicate the input layout, Bino tries to guess it by looking at the last part of the file name before the file name extension (.ext).

The following file name forms are recognized:

*-lr.ext

Input layout left-right.

*-lrh.ext
*-lrq.ext

Input layout left-right-half.

*-rl.ext

Input layout right-left.

*-rlh.ext
*-rlq.ext

Input layout right-left-half.

*-tb.ext
*-ab.ext

Input layout top-bottom.

*-tbh.ext
*-abq.ext

Input layout top-bottom-half.

*-bt.ext
*-ba.ext

Input layout bottom-top.

*-bth.ext
*-baq.ext

Input layout bottom-top-half.

*-eo.ext
*-eoq.ext
*-3dir.ext

Input layout even-odd-rows.

*-oe.ext
*-oeq.ext
*-3di.ext

Input layout odd-even-rows.

*-2d.ext

Input layout mono.


Next: , Previous: , Up: Top   [Contents]

4 Output Techniques

4.1 Overview

The left and right view of a stereoscopic video need to be displayed in a way that ensures that the left view is only seen by the left eye of the user and the right view is only seen by the right eye. There are many different techniques to achieve this separation of left and right view, and Bino supports most of them.

With some display techniques, some part of the right view may also seen by the left eye and vice versa. This is called crosstalk and leads to ghosting artefacts that reduce image quality. For some display types, Bino can reduce such artefacts. See Crosstalk Ghostbusting.

One of the simplest output techniques is anaglyph glasses. Such glasses use color filters to separate the left and right view. Anaglyph glasses are cheap and work with every display, but the view separation and color reproduction are of relatively low quality. Still, depending on the video material, Bino can achieve high quality results using the Dubois method to produce video output for anaglyph glasses.

With OpenGL, the default method to display stereoscopic 3D content is OpenGL quad buffered stereo, often used with active shutter glasses. However, graphics card manufacturers tend to enable this output technique only on expensive high end hardware.

Many 3D computer displays use polarized glasses to separate left and right view, and some autostereoscopic displays do not require any glasses at all. Most of these 3D computer displays expect left and right view packed in a single video frame, e.g. on top of each other or next to each other or partitioned into even and odd pixel lines or columns. Bino supports all variants of such modes; refer to the manual of your display to find out which mode is required.

Another common way to display 3D stereoscopic content is to use two conventional 2D displays or projectors for the left and right view and combine both views either using a half-transparent mirror, or a single screen with polarized glasses. This is supported in Bino using multiscreen output. See Basic Multi Display Support.

For more complex setups, such as powerwalls or virtual reality installations driven by render clusters, Bino supports distributed video rendering via Equalizer. See Advanced Multi Display Support.

The default output technique for stereoscopic 3D input is OpenGL quad buffered stereo if the graphics card supports it, otherwise red/cyan anaglyph glasses.

4.2 Supported Output Techniques

stereo

OpenGL quad-buffer stereo.
output-type-stereo

alternating

Left and right view alternating. This can be used for shutter glasses on systems that do not support OpenGL quad-buffer stereo, but note that this mode may be unreliable and may swap left/right eyes occasionally, depending on your system. In case of problems, disabling the fullscreen mode screensaver inhibition may help.
output-type-alternating

mono-left

Left view only.
output-type-mono-left

mono-right

Right view only.
output-type-mono-right

top-bottom

Left view top, right view bottom.
output-type-top-bottom

top-bottom-half

Left view top, right view bottom, both with half height.
output-type-top-bottom-half

left-right

Left view left, right view right.
output-type-left-right

left-right-half

Left view left, right view right, both with half width.
output-type-left-right-half

even-odd-rows

Left view in even rows, right view in odd rows.
output-type-even-odd-rows

even-odd-columns

Left view in even columns, right view in odd columns.
output-type-even-odd-columns

checkerboard

Left and right view in a checkerboard pattern.
output-type-checkerboard

hdmi-frame-pack

HDMI frame packing mode (left top, right bottom, plus extra blank lines separating the two views). This mode is only necessary if you are forcing your display into the corresponding HDMI 3D mode. A description how to do this on GNU/Linux can be found in this post to the Bino mailing list.
output-type-hdmi-frame-pack

red-cyan-monochrome

Red/cyan anaglyph glasses, monochrome method.
output-type-red-cyan

red-cyan-half-color

Red/cyan anaglyph glasses, half color method.
output-type-red-cyan

red-cyan-full-color

Red/cyan anaglyph glasses, full color method.
output-type-red-cyan

red-cyan-dubois

Red/cyan anaglyph glasses, high-quality Dubois method.
output-type-red-cyan

green-magenta-monochrome

Green/magenta anaglyph glasses, monochrome method.
output-type-green-magenta

green-magenta-half-color

Green/magenta anaglyph glasses, half color method.
output-type-green-magenta

green-magenta-full-color

Green/magenta anaglyph glasses, full color method.
output-type-green-magenta

green-magenta-dubois

Green/magenta anaglyph glasses, high-quality Dubois method.
output-type-green-magenta

amber-blue-monochrome

Amber/blue anaglyph glasses, monochrome method.
output-type-amber-blue

amber-blue-half-color

Amber/blue anaglyph glasses, half color method.
output-type-amber-blue

amber-blue-full-color

Amber/blue anaglyph glasses, full color method.
output-type-amber-blue

amber-blue-dubois

Amber/blue anaglyph glasses, high-quality Dubois method.
output-type-amber-blue

red-green-monochrome

Red/green anaglyph glasses, monochrome method.
output-type-red-green

red-blue-monochrome

Red/blue anaglyph glasses, monochrome method.
output-type-red-blue

equalizer

Multi-display OpenGL via Equalizer with a 2D canvas setup.

equalizer-3d

Multi-display OpenGL via Equalizer with a 3D screen setup.

4.3 Crosstalk Ghostbusting

Many stereoscopic display devices suffer from crosstalk between the left and right view. This results in ghosting artifacts that can degrade the viewing quality, depending on the video content.

Bino can optionally reduce the ghosting artifacts. For this, it needs two know

  1. the amount of crosstalk of your display device and
  2. the amount of ghostbusting that is adequate for the video you want to watch.

Please note that ghostbusting does not work with anaglyph glasses.

To measure the display crosstalk, do the following:

  1. Display the gamma-pattern-tb.png image and correct the display gamma settings according to the included instructions. You need to have correct gamma settings before measuring crosstalk.
  2. Display the crosstalk-pattern-tb.png image and determine the crosstalk levels using the included instructions.

You now have three crosstalk values for the red, green, and blue channels. You can now tell Bino about this using the --crosstalk option. For example, if you have measured 8% of crosstalk for red, 12% for green, and 10% for blue, use

$ bino --crosstalk 0.08,0.12,0.10

Once you know the crosstalk levels of your display device, you can set the amount of ghostbusting that Bino should apply using the --ghostbust option. This will vary depending on the content you want to watch. Movies with very dark scenes should be viewed with at least 50% ghostbusting (--ghostbust 0.5), whereas overall bright movies, where crosstalk is less disturbing, could be viewed with a lower level (e.g. --ghostbust 0.1).

To check if you crosstalk calibration is correct, display the crosstalk patterns with full ghostbusting, like this:

$ bino --crosstalk 0.08,0.12,0.10 --ghostbust 1.0 crosstalk-pattern-tb.png

The remaining crosstalk should optimally be 0%.

4.4 Basic Multi Display Support

For basic multi display support, Bino requires that all displays are connected to a single computer and are configured to display one large desktop. For such a setup, you can configure which screens Bino should use in fullscreen mode.

For example, if you have two projectors L and R that project onto a single screen with polarization filters, and you have configured your desktop to cover both projectors next to each other (LR), then you can configure fullscreen mode to use both projectors and select the left-right output technique.

For similar setups, it is sometimes useful to mirror either the left or the right view horizontally or vertically. This, too, can be configured in Bino’s fullscreen settings.

Of course, you can also combine multiple monitors to form one large display and use this with some other output technique, e.g. anaglyph glasses.

For more advanced setups, e.g. involving multiple computers and/or graphics cards or non-planar projection surfaces, you can use Bino’s advanced multi display support via Equalizer.

4.5 Advanced Multi Display Support

Bino supports distributed multi-display output via the Equalizer framework.

This is how it works:

4.5.1 Building Bino with Equalizer Support

First, install Equalizer 1.0 or later. See http://www.equalizergraphics.com/. Verify that it works by running the included eqHello example.

Then, build Bino with Equalizer support. The output of configure should contain the following line:

Equalizer: yes

Now you need an Equalizer configuration file for your display setup.

4.5.2 Configuring Equalizer and Starting Bino

Bino needs a two-dimensional Equalizer canvas (= combined screen area), subdivided into segments (= single display areas). For example, if you have two projectors that project onto a 2m x 1m screen side-by-side, then your canvas is 2m x 1m large, and you have two segments: the first segment fills the left half of the canvas, and the second segment fills the right half.

Next, Equalizer needs to know how to render into each segment. For this purpose, you define several hierarchical objects: nodes (= processes, possibly on different systems), pipes (= graphics cards), windows (= output windows with OpenGL contexts), and channels (= parts of windows). The video output happens at the channel level: each channel is assigned to one segment of the canvas. Most probably you just have one fullscreen window per pipe, and a single output channel per window.

Note that one node is special: the application node, which is the node that you initially start (the other nodes are started automatically by Equalizer). The application node is called ’appNode’ in the Equalizer configuration, and Bino will play audio only on the application node. All video output is then synchronized to this audio output.

Once you have your configuration file (examples are given below), you can check if it works correctly using the eqHello example:

$ eqHello --eq-config configuration.eqc

Once you made sure that this works, you can start Bino using this command:

$ bino -o equalizer --eq-config configuration.eqc video.mp4

Note that all your nodes need access to the video file using the same name, so a shared filesystem is helpful if you use multiple systems.

To play live video from a webcam or TV card, you can set up a streaming server using ffserver (part of FFmpeg) or vlc, and then give the appropriate URL to Bino. You can use multicast to stream the video to multiple systems efficiently.

The output mode -o equalizer-3d allows to configure non-planar projections. Bino projects the video onto a virtual screen in 3D space. The screen is located in the distance of the biggest front-facing segment, and sized to fill the wall optimally. By configuring the output segments accordingly, various advanced display configurations can be used, e.g. displays rotated around the Z axis by an arbitrary angle or non-planar screens.

4.5.3 Example Configurations

Simple 2D video output

In this example, you have a 2m x 1m screen and two projectors: one for the left half of the screen, and one for the right half. The two projectors are connected to two graphics cards on the same system.

In this situation, you have one node with two pipes, and each pipe has a fullscreen window with a single output channel. The first output channel is assigned to the left segment, and the second output channel is assigned to the right channel. The resulting configuration looks like this:

server
{
    config
    {
        appNode
        {
            pipe { device 0 window { attributes { hint_fullscreen ON } channel { name "left" }}}
            pipe { device 1 window { attributes { hint_fullscreen ON } channel { name "right" }}}
        }
        observer {}
        layout { view { observer 0 }}
        canvas
        {
            layout 0
            wall
            {
                bottom_left  [ 0.0  0.0 -1 ]
                bottom_right [ 2.0  0.0 -1 ]
                top_left     [ 0.0  1.0 -1 ]
            }
            segment { channel "left" viewport [ 0.0 0.0 0.5 1.0 ] }
            segment { channel "right" viewport [ 0.5 0.0 0.5 1.0 ] }
        }
        compound
        {
            compound { channel ( view 0 segment 0 ) swapbarrier {} }
            compound { channel ( view 0 segment 1 ) swapbarrier {} }
        }
    }
}

3D video output across multiple systems

In the following example, you have a 4m x 3m screen for 3D projection via passive stereo (e.g. polarization). You have two systems, "render1" and "render2", each equipped with two graphics cards. The two cards on "render1" generate two images for the left half of the screen: one for the left eye view and one for the right eye view. The two cards on "render2" generate left and right view for the right half of the screen. Additionally, you have a system called "master" which has a sound card and should display a small control window.

This setup is very similar to the situation shown in multi-display-vrlab.jpg.

The configuration looks like this:

server
{
    connection { hostname "master" }
    config
    {
        appNode
        {
            connection { hostname "master" }
            pipe { window { viewport [ 100 100 400 300 ] channel { name "control" }}}
        }
        node
        {
            connection { hostname "render1" }
            pipe { device 0 window { attributes { hint_fullscreen ON } channel { name "render1left" }}}
            pipe { device 1 window { attributes { hint_fullscreen ON } channel { name "render1right" }}}
        }
        node
        {
            connection { hostname "render2" }
            pipe { device 0 window { attributes { hint_fullscreen ON } channel { name "render2left" }}}
            pipe { device 1 window { attributes { hint_fullscreen ON } channel { name "render2right" }}}
        }
        observer {}
        layout { view { observer 0 }}
        canvas
        {
            layout 0
            wall
            {
                bottom_left  [ 0.0 0.0 -1 ]
                bottom_right [ 4.0 0.0 -1 ]
                top_left     [ 0.0 3.0 -1 ]
            }
            segment { channel "render1left"  viewport [ 0.0 0.0 0.5 1.0 ] }
            segment { channel "render1right" viewport [ 0.0 0.0 0.5 1.0 ] }
            segment { channel "render2left"  viewport [ 0.5 0.0 0.5 1.0 ] }
            segment { channel "render2right" viewport [ 0.5 0.0 0.5 1.0 ] }
            segment { channel "control"      viewport [ 0.0 0.0 1.0 1.0 ] }
        }
        compound
        {
            compound { eye [ LEFT  ] channel ( view 0 segment 0 ) swapbarrier {} }
            compound { eye [ RIGHT ] channel ( view 0 segment 1 ) swapbarrier {} }
            compound { eye [ LEFT  ] channel ( view 0 segment 2 ) swapbarrier {} }
            compound { eye [ RIGHT ] channel ( view 0 segment 3 ) swapbarrier {} }
            compound {               channel ( view 0 segment 4 ) swapbarrier {} }
        }
    }
}