--- Operating System, Graphics card ---
Windows 7 64-bit Service Pack 1, Mobile Intel 4 Series Express Chipset
--- Blender version with error, and version that worked ---
Error:
* Blender 2.67 64-bit (official binary)
* Blender r56837 64-bit (http://builder.blender.org/download/blender-2.67-r56837-win64.zip)
Working: none I know of
--- Short description of error ---
The vertical line which represents the end of the video is shown one frame too early in the video sequence editor (VSE). For example, if the last frame of the video is frame 250, I would expect the vertical line to be shown at the end of frame 250, but it is shown at the beginning of frame 250 instead. Because of this, it looks as if the last frame were frame 249.
--- Steps for others to reproduce the error (preferably based on attached .blend file) ---
Open the attached .blend file. In this file, the last frame of the video is frame 250. For comparison, I added a strip which ends at frame 250 in VSE. I expected the vertical line showing the end of the video to align with the right side of the strip, but it does not.
See screenshots.png for a comparison of the actual screenshot and what I expected to see.
Description
Event Timeline
I'm not sure it should end at the position of frame 250. Consider a strip with length 1, if both the start and end where on the frame 1 position it would have no width at all. Maybe the entire strip should be shifted left by half a frame? I'm not sure what the convention is in other video editors.
Just to make sure, I did not propose to shrink each strip. I proposed to shift the vertical line representing the end of the entire video to the right by one frame. A strip with length k is currently shown with the width of k frames, and I am not suggesting to change this. I proposed to apply the same rule also to the visualization of the video length.
But now I see the reason behind the current design: rendering a frame does not render a 1/24-second period, but renders a moment, so it would not be logical to shift the vertical line to the right by one frame.
I still find it confusing that a strip which covers exactly the entire video is shown unaligned as if it were one frame too long, but now I am not sure what the best way to solve this is. As you wrote, shifting all strips to the left by half a frame is an option, but I am not sure if this solution is good. I do not know the conventions in other video editors, either.
I think I came up with a better reasoning for my proposed fix. If a video with frame rate of 24 frames per second starts at frame 1 and ends at 250, it lasts 250/24=10.417 seconds. Currently the start vertical line and the end vertical line are 249 frames apart, which suggests that the video length is 249/24=10.375 seconds, which does not match the correct length. Therefore, the end-of-video vertical line should be shown at the end of frame 250 instead of the beginning of frame 250. And this also matches how strips are displayed, solving the original issue.
Thanks! I have not tested it (waiting for builder to pick up the change), but looking at the code, I am afraid that now if the start frame and the end frame of a video are the same, the darkened area apparently does not match the vertical lines. Shouldn’t
if (PSFRA < PEFRA) {
on line 1384 of blender/source/blender/editors/space_sequencer/sequencer_draw.c be replaced by
if (PSFRA <= PEFRA) {
? Excuse me if I am misunderstanding how the code works.
I verified this has been fixed in http://builder.blender.org/download/blender-2.67-r56888-win64.zip.
I have one question about the code. I realized that apparently the scene start frame cannot be set larger than the scene end frame in the UI. Does this mean PSFRA<=PEFRA always holds, or is there a way to make PSFRA>PEFRA happen outside the UI? If PSFRA<=PEFRA always holds, then the “if” should be unnecessary.
When enabling the "preview range" in the timeline it's possible to set the end lower than the start.
In the release notes for 2.67a (http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.67a): I think
> Fix #35390: the verticel lines indicating scene start and end frame was off by one (r56872 r56882)
should read
> Fix #35390: the vertical line indicating scene end frame was off by one (r56872 r56882)
I do not know the policy on who can/should edit the release notes, so I leave the actual edit to developers.
Thanks for the reply about the preview range in the timeline. Now I realized that if I enable the preview range, the shared area is still as in the old behavior.
Steps to reproduce (tested with http://builder.blender.org/download/blender-2.67-r56888-win64.zip):
1. Open the attached .blend file (the same file as before).
2. In the timeline, enable Scene.use_preview_range. The shaded area in the video sequence editor does not match the strip.
Given 2.67a was un-AHOYed, is there any chance the fix in r56894 could be also included in Blender 2.67a? I understand this is not a most important issue, but I am afraid including just part of the fixes might be confusing.
I verified the issue has been fixed in http://builder.blender.org/download/blender-2.67-r56905-win64.zip. Also I see r56894 has been incorporated in tags/blender-2.67a-release. Thank you for all the work!