Blender renders past set endframe #45011

Closed
opened 8 years ago by Dimethicone · 7 comments

System Information
Windows XP SP3 and NVIDIA GeForce GT220

Blender Version
Broken: 2.71

Short description of error
When importing a movie and a sound file into the VSE and setting start- and endframe, the result after rendering will sometimes not coincide with the start- and endframes. More specifically, the audio is rendered correctly but the video plays back at twice or three times the normal rate, and accordingly the last videoframe lies beyond the endframe that was set in the .blend file.fallout-lp4.blend

Exact steps for others to reproduce the error
Simply run "animate" on the attached .blend file, where some dummy files should be used for "........Fraps/Movies/fallout2.wav" and "......*..*Fraps/Movies/FALLOUTW_2015_05_25_15_05_19_906.avi"

**System Information** Windows XP SP3 and NVIDIA GeForce GT220 **Blender Version** Broken: 2.71 **Short description of error** When importing a movie and a sound file into the VSE and setting start- and endframe, the result after rendering will sometimes not coincide with the start- and endframes. More specifically, the audio is rendered correctly but the video plays back at twice or three times the normal rate, and accordingly the last videoframe lies beyond the endframe that was set in the .blend file.[fallout-lp4.blend](https://archive.blender.org/developer/F188480/fallout-lp4.blend) **Exact steps for others to reproduce the error** Simply run "animate" on the attached .blend file, where some dummy files should be used for "*..*..*..*..*Fraps/Movies/fallout2.wav" and "*..*..*..*..*Fraps/Movies/FALLOUTW_2015_05_25_15_05_19_906.avi"
Poster

Changed status to: 'Open'

Changed status to: 'Open'
Poster

Added subscriber: @Dimethicone

Added subscriber: @Dimethicone
mont29 commented 8 years ago
Owner

Added subscriber: @mont29

Added subscriber: @mont29
mont29 commented 8 years ago
Owner

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
mont29 closed this issue 8 years ago
mont29 self-assigned this 8 years ago
mont29 commented 8 years ago
Owner

Please:

  • Only report bugs about latest Blender version (and after testing they are still relevant in latest build from our buildbot).
  • At least generate correct timecode for your video files, if they use some advanced encoding (all flavours of mpeg4, etc.), otherwise Blender cannot guarantee correct seeking in such files.
Please: * Only report bugs about latest Blender version (and after testing they are still relevant in latest build from [our buildbot](https://builder.blender.org/download)). * At least generate correct timecode for your video files, if they use some advanced encoding (all flavours of mpeg4, etc.), otherwise Blender cannot guarantee correct seeking in such files.
Poster

Sorry for not testing it with the latest build (would probably seem common sense). Generating timecode by enabling "Proxy / Timecode" and setting "Timecode" to "Record Run" and then running "Rebuild Proxy and Timecode Indices" has actually fixed this problem, even though I'm still a bit puzzled because I never had this problem before, despite always having source material encoded with the same codec. I have even used the same source material (which is pretty harmless lossless, keyframes only) and rendered several different sections, without any problem.

So in order to facilitate my understanding, could you please confirm if the following pseudo-code for the Blender rendering process is correct (at least morally)?

for $frame from $startframe to $endframe
{
   $timestamp = time_to_timestamp( ($frame-$startframe)/$framerate);
   read_seek($timestamp);
   $image = avcodec_decode_video2(...);
   output_image($image);
}

Is it correct that timecode is needed in the routine time_to_timestamp (which I'm aware may not actually exist as a single routine, but you get the idea), and that missing timecodes can lead to faulty timestamps?

Also, generating proxies/timecode took three hours for my 45 minute video. Is this normal? Or is there a way to only generate timecode indices, but not proxies (which seems what's taking so long)?

Thanks for your efforts!

Sorry for not testing it with the latest build (would probably seem common sense). Generating timecode by enabling "Proxy / Timecode" and setting "Timecode" to "Record Run" and then running "Rebuild Proxy and Timecode Indices" has actually fixed this problem, even though I'm still a bit puzzled because I never had this problem before, despite always having source material encoded with the same codec. I have even used the same source material (which is pretty harmless lossless, keyframes only) and rendered several different sections, without any problem. So in order to facilitate my understanding, could you please confirm if the following pseudo-code for the Blender rendering process is correct (at least morally)? ``` for $frame from $startframe to $endframe { $timestamp = time_to_timestamp( ($frame-$startframe)/$framerate); read_seek($timestamp); $image = avcodec_decode_video2(...); output_image($image); } ``` Is it correct that timecode is needed in the routine time_to_timestamp (which I'm aware may not actually exist as a single routine, but you get the idea), and that missing timecodes can lead to faulty timestamps? Also, generating proxies/timecode took three hours for my 45 minute video. Is this normal? Or is there a way to only generate timecode indices, but not proxies (which seems what's taking so long)? Thanks for your efforts!
mont29 commented 8 years ago
Owner

I have no idea of hands of how exactly timecode is used, but yes, with many modern codecs, it's the only way to ensure correctness of frame seeking.

And you do can generate only the timecode, just disable all 'proxy' sizes options in the panel.

I have no idea of hands of how exactly timecode is used, but yes, with many modern codecs, it's the only way to ensure correctness of frame seeking. And you do can generate only the timecode, just disable all 'proxy' sizes options in the panel.
Sign in to join this conversation.
No Label
Interest/Alembic
Interest/Animation & Rigging
Interest/Asset Browser
Interest/Asset Browser Project Overview
Interest/Audio
Interest/Automated Testing
Interest/Blender Asset Bundle
Interest/Collada
Interest/Compositing
Interest/Core
Interest/Cycles
Interest/Dependency Graph
Interest/Development Management
Interest/Eevee & Viewport
Interest/Freestyle
Interest/Geometry Nodes
Interest/Grease Pencil
Interest/ID Management
Interest/Images & Movies
Interest/Import/Export
Interest/Line Art
Interest/Masking
Interest/Modeling
Interest/Modifiers
Interest/Motion Tracking
Interest/Nodes & Physics
Interest/Overrides
Interest/Performance
Interest/Performance
Interest/Physics
Interest/Pipeline, Assets & I/O
Interest/Platforms, Builds, Tests & Devices
Interest/Python API
Interest/Render & Cycles
Interest/Render Pipeline
Interest/Sculpt, Paint & Texture
Interest/Text Editor
Interest/Translations
Interest/Triaging
Interest/Undo
Interest/USD
Interest/User Interface
Interest/UV Editing
Interest/VFX & Video
Interest/Video Sequencer
Interest/Virtual Reality
legacy module/Animation & Rigging
legacy module/Core
legacy module/Eevee & Viewport
legacy module/Grease Pencil
legacy module/Modeling
legacy module/Nodes & Physics
legacy module/Pipeline, Assets & IO
legacy module/Platforms, Builds, Tests & Devices
legacy module/Python API
legacy module/Sculpt, Paint & Texture
legacy module/User Interface
legacy module/VFX & Video
legacy project/BF Blender: 2.8
legacy project/Milestone 1: Basic, Local Asset Browser
legacy project/OpenGL Error
legacy project/Retrospective
Meta/Good First Issue
Meta/Papercut
migration/requires-manual-verification
Module › Animation & Rigging
Module › Core
Module › Development Management
Module › Eevee & Viewport
Module › Grease Pencil
Module › Modeling
Module › Nodes & Physics
Module › Pipeline, Assets & IO
Module › Platforms, Builds, Tests & Devices
Module › Python API
Module › Render & Cycles
Module › Sculpt, Paint & Texture
Module › Triaging
Module › User Interface
Module › VFX & Video
Platform/FreeBSD
Platform/Linux
Platform/macOS
Platform/Windows
Priority › High
Priority › Low
Priority › Normal
Priority › Unbreak Now!
Status › Archived
Status › Confirmed
Status › Duplicate
Status › Needs Information from Developers
Status › Needs Information from User
Status › Needs Triage
Status › Resolved
Type › Bug
Type › Design
Type › Known Issue
Type › Patch
Type › Report
Type › To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#45011
Loading…
There is no content yet.