Page MenuHome

Video Sequencer, Aspect Ratio issue
Closed, ResolvedPublic


System Information
Linux bubastis 3.10.25-gentoo #10 SMP Thu Jan 30 22:17:35 UTC 2014 x86_64 Intel(R) Core(TM) i7-4800MQ CPU @ 2.70GHz GenuineIntel GNU/Linux

NVIDIA Corporation GK107GLM [Quadro K1100M]

Blender Version
Broken: blender-2.70-linux-glibc211-x86_64

Short description of error

The video sequence editor's preview window does not match up with
the rendered output when a video strip refers to a blender scene
with an aspect ratio different from the aspect ratio of the
compositing scene.

Exact steps for others to reproduce the error

Create first scene with 40x40 resolution. fill it with 3d objects

Create second scene with 1920x1080 resolution. put some text on the right side.

Create third scene with 1920x1080 resolution. This is a VSE project. Incorporate the first scene on top of the second scene.
Check the Image Offset option on the 40x40 scene
Add a transform strip to the 40x40 scene and set the scale and position parameters so it fills the left side of the composite scene with the text from the second scene visible on the right.

Notice how at each stage the rendered output is different from the view in the preview window. This discrepancy confounds new users as they attempt to construct a mental model of how blender works and delays understanding and competence.

I am pretty sure this relates to the TODO regarding a rewrite of the Video Sequence Editor, but I'm going to incorporate my narrative from the sample .blend because I don't want the issues relating to pixel_aspect_ratio to fall through the cracks when this TODO transitions to a todone.

Event Timeline

Robert Forsman (mutantbob) created this task.
Robert Forsman (mutantbob) raised the priority of this task from to Needs Triage by Developer.

I do not have any applications on this linux box that would allow me to drag and drop a .blend file here, so I'll just use

Here is my narrative I composed in a text buffer which also appears in that .blend file. Consider it an RFE:

This .blend file contains a test suite for VSE strips based on scenes. There are some bugs and shortcomings in the VSE's handling of scenes with aspect ratios that differ from the aspect ratio of the VSE scene.

"credits" is a scene with matching aspect ratio. It has a text object and a yellow square that is a "placeholder" which should be obscured by the square video from the "square test pattern" scene.

"square test pattern" is a simple scene designed to make it easy to tell when the scene has been cropped.

In all the compositing scenes we have to change the Blende menu to "over drop". Why this is not the default I have no idea.

"vse 1" illustrates a surprise:

1) the rendered version includes the full copy of the "square test pattern" at the "vse 1" aspect ratio instead of its proper "square test pattern" aspect ratio.
2) the preview window shows a cropped version of the "square test pattern" and does not match the output.

I had hoped the preview window and the rendered output would incorporate the scene at its true aspect ratio. Special care should be taken to respect the pixel aspect ratio specified by the linked scene and the compositing scene. (Consider the case where you take a 4:3 352x480 mpeg video and incorporate it into a 16:9 720x480
compositing scene)

"vse 2" is derived from "vse 1" but adds a transform effect strip which scales the "square test pattern" by 9/16 and offsets it by <-22,0>

  1. the rendered version includes the full copy of the "square test pattern" at the "vse 1" aspect ratio instead of its proper "square test pattern" aspect ratio.
  2. the preview window shows a cropped version of the "square test pattern", but at least it's in the right place.

The preview window matches the rendered output.

We're getting closer to the desired effect, but are still frustrated by blender's failure to respect the shape of the original scene.

"vse 3" is derived from "vse 1" but we activate the "Image Offset" checkbox on the strip referring to "square test pattern". This is the first stage of a workaround suggested by and triggers a number of strange things

  1. the preview window shows the test pattern covering the bottom-left quarter of the screen at the wrong aspect ratio.
  2. the rendered output has the test pattern at the correct aspect ratio and in the bottom left corner, but at its original pixel size. Since the "square test pattern" is a 40x40 scene, this makes it appear very tiny in the 1080p compositing scene.

The mismatches between the preview window and the rendered output are a serious problem that will confuse users, but should take a back seat to fixing the rest of the bugs surrounding scene-based video strips.

Exactly what the Image Offset checkbox does is mentioned at:

I suspect that it would be a little less confusing to users if auto-scaling were controlled by its own appropriately named checkbox.

"vse 4" is where we have achieved the desired effect of incorporating the square scene filling the left side of the composite scene and have the text on the right side.

The way we accomplished this was by adding a strip for the scene "square test pattern" and activating the "image offset" checkbox. Then we scale up the scene from its 40 pixel starting version using a Transform strip. To fill its target space we scale it by a factor of 27, and adjust its position by 1300% of the original pixel size (which corresponds to (27-1)/2 ).

As you might notice, the preview window is horribly wrong.

I suspect most of this confusion comes from the fact that there are a myriad of ways you can describe the size of a video

  1. frame aspect ratio (such as 1:1, 4:3, 16:9)
  2. resolution (such as 1920x1080, 640x480, 720x480, 40x40)
  3. pixel aspect ratio (which is mathematically entangled with the other two)

When both scenes have the same resolution there is no confusion. When they differ, I'm sure you could find people whose intent varies. The primary problem is that their intent does not directly correspond to labels on any user interface element.

I have identified the following theoretical options for incorporating source video of different resolution:

1) scale to full composite frame
2) preserve source aspect ratio and 
    a) scale till it fills horizontal or vertical bounds (whichever is smaller, you might get "letterboxing")
    b) scale till it fills horizontal or vertical bounds (whichever is larger, video might extend beyond rendered bounds and be cropped)
    c) scale till it fills horizontal bounds
    d) scale till it fills vertical bounds
3) pixel-for-pixel import without regard for pixel aspect ratios

I am open to suggestions for other scaling modes, but I suspect these will provide a solid non-confusing base for accomplishing any use case.

An option to align video to top/bottom/left/right of composite scene frame would be gravy, but without that option you can accomplish the effect using a transform strip.

Right now the only options are 1 (the default) and 3 (with Image Offset checked). Accomplishing any of the suboptions from section 2 requires a transform strip. Additionally, since the preview window is very buggy, you also need either

*) a lot of experimentation or 
*) a solid understanding of the mathematical model that governs the transform strip's scale and position parameters.

I propose that the Image Offset checkbox be replaced by a menu that makes the scaling mode explicit rather than being a NiceTip on the wiki.

Additionaly, the preview window should be updated to better reflect the rendered output since new users rely on its display to help them build a mental model of how the various options work. When the preview window does not match the rendered output, users come to defective conclusions that can take a while to straighten out.

Thomas Dinges (dingto) renamed this task from the video sequence editor's preview pane does not correspond to rendered output when using video strips from a scene with a different aspect ratio. this leads to user confusion. to Video Sequencer, Aspect Ratio issue.Apr 18 2014, 11:22 PM
Sergey Sharybin (sergey) triaged this task as Normal priority.Apr 21 2014, 9:42 AM