VSE rendering of movie gets progressively slower #71734

Closed
opened 2019-11-21 17:07:18 +01:00 by Guillaume M · 17 comments

System Information
Operating system: Ubuntu 18.04.3 LTS
Graphics card: nVidia GM204GL [Quadro M4000]

Blender Version
Broken: 2.80, downloaded today from blender.org

Short description of error
When rendering a movie strip in the VSE, the render time for each frame gets progressively longer.
Here is a graph of the render time for a simple h264 file loaded in the VSE, and re-exported as another h264 file with some minor transforms (crop and scale)

render_time.png

This pattern seems to indicate a form of reset happens regularly. Upon inspection, these discontinuities happen for each I frame found in the h264 source. Therefore I assume that for each rendered frame, the image is reconstructed from the previous I frame, which requires evaluating each intermediate B and P frames. Is there any way to cache these frames ?

If we can't fix this, we may want to add to the wiki that you can get a very significant speed increase by encoding input files as motion jpegs, or at least reducing the time between I frames.

**System Information** Operating system: Ubuntu 18.04.3 LTS Graphics card: nVidia GM204GL [Quadro M4000] **Blender Version** Broken: 2.80, downloaded today from blender.org **Short description of error** When rendering a movie strip in the VSE, the render time for each frame gets progressively longer. Here is a graph of the render time for a simple h264 file loaded in the VSE, and re-exported as another h264 file with some minor transforms (crop and scale) ![render_time.png](https://archive.blender.org/developer/F8151839/render_time.png) This pattern seems to indicate a form of reset happens regularly. Upon inspection, these discontinuities happen for each I frame found in the h264 source. Therefore I assume that for each rendered frame, the image is reconstructed from the previous I frame, which requires evaluating each intermediate B and P frames. Is there any way to cache these frames ? If we can't fix this, we may want to add to the wiki that you can get a very significant speed increase by encoding input files as motion jpegs, or at least reducing the time between I frames.
Author

Added subscriber: @mathers

Added subscriber: @mathers

Added subscriber: @iss

Added subscriber: @iss

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Richard Antalik self-assigned this 2019-11-25 09:26:04 +01:00

@mathers

Is there any way to cache these frames ?

Not directly.
We can cache each frame, or we can use proxies, which are designed to overcome this specific issue.

Caching B and P frames would speed up read from HDD, they should be pretty small however, so not much performance would be gained. It is the math involved to reconstruct the frame that is biggest problem here IMO.

If we can't fix this, we may want to add to the wiki that you can get a very significant speed increase by encoding input files as motion jpegs, or at least reducing the time between I frames.

Do you mean Blender manual?
In similar fashion there is https://docs.blender.org/manual/en/latest/troubleshooting/3d_view.html#performance
It would be very nice touch to create such page for VSE.

I doubt, that most first-time users would read it, but this problem should be explained.

What I don't want to do is to automatically start building proxies. Pethaps as a user preference this would be OK even by default.

Closing as invalid because if this task should exist it should be a TODO with relevant description.

@mathers > Is there any way to cache these frames ? Not directly. We can cache each frame, or we can use proxies, which are designed to overcome this specific issue. Caching B and P frames would speed up read from HDD, they should be pretty small however, so not much performance would be gained. It is the math involved to reconstruct the frame that is biggest problem here IMO. >If we can't fix this, we may want to add to the wiki that you can get a very significant speed increase by encoding input files as motion jpegs, or at least reducing the time between I frames. Do you mean Blender manual? In similar fashion there is https://docs.blender.org/manual/en/latest/troubleshooting/3d_view.html#performance It would be very nice touch to create such page for VSE. I doubt, that most first-time users would read it, but this problem should be explained. What I don't want to do is to automatically start building proxies. Pethaps as a user preference this would be OK even by default. Closing as invalid because if this task should exist it should be a TODO with relevant description.
Author

Just pointing out that this is an issue for rendering, not preview !

Proxies are not used during render afaik. I agree the math involved to reconstruct the frame is the biggest problem, therefore keeping a cache of the last polled frames during render should solve this problem. This is not covered by the VSE preview cache, and would give a huge performance boost during renders.

Just pointing out that this is an issue for rendering, not preview ! Proxies are not used during render afaik. I agree the math involved to reconstruct the frame is the biggest problem, therefore keeping a cache of the last polled frames during render should solve this problem. This is not covered by the VSE preview cache, and would give a huge performance boost during renders.

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'

In #71734#816823, @mathers wrote:
Just pointing out that this is an issue for rendering, not preview !

Thanks for correcing me.

Rendering job disregards any proxies and caches for quality reasons.
I think that in this case it is simple one-frame-per-stream anim cache, that is used to reconstruct next frame. I would say, that it does not make much sense disabling anim cache.

I can look in history, if and why it was disabled. It may be side effect of unrelated change.

> In #71734#816823, @mathers wrote: > Just pointing out that this is an issue for rendering, not preview ! Thanks for correcing me. Rendering job disregards any proxies and caches for quality reasons. I think that in this case it is simple one-frame-per-stream anim cache, that is used to reconstruct next frame. I would say, that it does not make much sense disabling anim cache. I can look in history, if and why it was disabled. It may be side effect of unrelated change.
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

@iss so is this a bug, known issue or something else?

@iss so is this a bug, known issue or something else?
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'

Changed status from 'Needs Triage' to: 'Needs Developer To Reproduce'
Member

(just trying to get this out of the "Needs Triage" limbo...)

(just trying to get this out of the "Needs Triage" limbo...)

Actually I have not tried to reproduce this yet, will do tomorrow just to be sure

Actually I have not tried to reproduce this yet, will do tomorrow just to be sure

@mathers I am going over old untriaged reports and found this. Sorry I haven't followed up on this sooner.

In any case I remember that I was trying to reproduce this issue with various h264 files, even ones that are optimized for streaming with terribly low I frame frequency and I wasn't able to reproduce this issue. Do you by any chance have sample file for this report?

@mathers I am going over old untriaged reports and found this. Sorry I haven't followed up on this sooner. In any case I remember that I was trying to reproduce this issue with various h264 files, even ones that are optimized for streaming with terribly low I frame frequency and I wasn't able to reproduce this issue. Do you by any chance have sample file for this report?
Author

Hi @iss, I don't think I can find that file again, but if I think this report is obsolete: since then several layers of caching were added so I wouldn't be surprised if the issue just disappeared in the refactoring. I'll let you know if I encounter something similar with a more recent version.

Hi @iss, I don't think I can find that file again, but if I think this report is obsolete: since then several layers of caching were added so I wouldn't be surprised if the issue just disappeared in the refactoring. I'll let you know if I encounter something similar with a more recent version.

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Changed status from 'Needs Developer To Reproduce' to: 'Archived'

Cache isn't used for rendering, so I wouldn't be surprised if this issue still existed.

Again sorry for letting this so long without answer. If you find the file feel free to upload here.

Closing for now.

Cache isn't used for rendering, so I wouldn't be surprised if this issue still existed. Again sorry for letting this so long without answer. If you find the file feel free to upload here. Closing for now.
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
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
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
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
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
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
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
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 Info 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
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#71734
No description provided.