bino-list
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bino-list] Question about parallax correction / ffmpeg


From: Goetz Dapp
Subject: Re: [Bino-list] Question about parallax correction / ffmpeg
Date: Mon, 27 Aug 2012 13:31:49 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0

Hi Martin,

thank you very much for your answer! I actually ended up going another route and adjusted the video files using kdenlive... there might have been a much simpler way with ffmpeg but this way I could verify my adjustments on the fly.

Thanks again,
Goetz

On 08/25/2012 11:23 PM, Martin Lambers wrote:
Hi Goetz!

On Sat, 25 Aug 2012 19:38:04 -0600, Goetz Dapp wrote:
  From what I understand Bino uses ffmpeg for its video input/output.
FFmpeg is used only for input. Output is done via OpenGL (video) and
OpenAL (audio).

I am curious to find out if that means that I can use some ffmpeg
settings/filters to re-render the video to incorporate the parallax
correction.
That is currently not possible with Bino, but you probably can create
an FFmpeg filter pipeline that does the necessary corrections
independent of Bino (first crop, then shift left and right view relative
to each other).

I am not quite sure what the "0.15" translates to or how
to convert this into a ffmpeg command. Does it affect both video
sources or does it only "move" one in relation to the other?
Both left and right view are used as textures. Both horizontal and
vertical texture coordinates range from 0 to 1. The parallax only
affects the horizontal texture coordinate.

For a given horizontal texture coordinate t that addresses the
corresponding columns in the left and right view, the following
adjusted texture coordinates are computed (see the use of the
'parallax' variable in video_output.cpp and
video_output_render.fs.glsl):
t_l = t + parallax * 0.05;      // for the left view column
t_r = t - parallax * 0.05;      // for the right view column

The result is that both left and right view are shifted relative to
each other.

The 0.05 value is arbitrary: it limits parallax adjustment in Bino to
1/20 of the frame width. Larger settings would cut off too much from
each view, but of course you could set a different limit.

For an FFmpeg filter pipeline, you probably have to use pixel
coordinates (which depend on the resolution of your material) instead
of texture coordinate (which always use the [0,1] range).

Martin





reply via email to

[Prev in Thread] Current Thread [Next in Thread]