Video Editor: Proxy clips will play with poor performance if used as proxies, but not when added to the sequencer-timeline #70415
Labels
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
Interest: X11
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
7 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#70415
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: Windows-10-10.0.17763 64 Bits
Graphics card: Intel(R) UHD Graphics 600 Intel 4.5.0 - Build 26.20.100.7158
Blender Version
Broken: version: 2.81 (sub 12), branch: master, commit date: 2019-09-30 22:00, hash:
60a827a2a9
Short description of error
Blender rendered proxy files will play with a much worse performance when played as proxies, as compared to adding them directly to the timeline. On my computer the difference is around 12 fps difference on a 100 % proxy file and 10 fps on a 75% proxy file.
Exact steps for others to reproduce the error
(For faster preview performance:
Uncheck View > Show Cache
Set Sidebar > Blendmode: Cross
Sidebar uncheck Cache rendering)
Add a clip to the Sequencer.
Strip > Movie > Set Render Size(if there is a mismatch in resolution, performance will suffer)
Select the strip.
Open the Proxy Settings panel in the Sidebar.
Click the 'Set Selected Strip Proxies'
Check 100% and Overwrite.
Click 'Rebuild Proxies'
Wait for the proxies to be encoded.
In the Sequencer Preview in the 'View Settings' change Proxy Render Size to 100%
Note the frame rate of the clip playing.
On my computer the rate is 19 fps for a 29.97 fps HD clip.
Now open the BL_proxy folder(located in the same folder as your original clip), then open the clip named folder and find the proxy_100.avi file.
Add this file to the sequencer(above the first one)
In the Sequencer Preview in the 'View Settings' change Proxy Render Size to 'No proxy, full render'.
Note the frame rate of the clip playing.
On my computer the rate is the correct 30 fps.
If you in both cases get the correct fps then try with a 4k clip instead.
Free clips can be found here: https://pixabay.com/videos/search/?order=ec
Another odd thing, but maybe related, is changing the Proxy Render Size in the Preview sidebar will also lower the playrate, even though there are no proxies generated.
Comparing the playback rate of a proxyfile used as a proxy file and the same proxy file added to the timeline(gif):
Added subscriber: @tintwotin
Just guessing here, but it seems to me changing the Set Proxy Size, when no proxies are generated, is still changing the resolution, properly mirroring the Resolution % in the Output options:
However values above 50% will actually lower the play-rate performance(properly because of scaling):
That could be some of the reason for a file is playing much slower when it is used as a proxy file.
If this is the case, the question is, if the swapping of generated proxies merged with Resolution % is a good idea, or if it is better to separate the proxy file swapping from the live-rescaling(Resolution %)? Or in other words, the Enum for selecting should be preserved file swapping and the Preview Resolution % should have a separate widget(like in Output options)?
This way users might avoid some of the performance loss when using the current 'Set Proxy Size' function in the 50%, 75% and 100% proxy resolutions. As mentioned in the first post about this problem a HD 29.97 proxy file played with the accurate framerate, when played from the Sequencer Timeline(so there is no need for the Resolution % on top of the file swapping).
Or alternatively check if the image resizing for the VSE could be optimized? Resizing is lowering the playrate in many areas of the VSE, and for sure causing poor playback.
But as I wrote, I just guessing here, so could this be some the reason for the performance drop?
Added subscriber: @Sergey
It looks like you @Sergey back in the day, did some work on the (vse?) proxy system?
If you did, do you know if there are any logic explanations for playing a clip as proxy at 100%(unscaled) delivers a much worse playback rate compared to playing the very same clip directly in the VSE timeline?
I haven't been able to reproduce this bug in blender 2.81 can you please confirm that it still exists.
Changed status from 'Open' to: 'Resolved'
I'm not at my computer right now, but iirc the main difference was with proxies rendered at 100℅. Did you try that?
Oh i didn't men to close this, can't reopen it now!?
Wow when posting, I can only choose between Resolved, Invalid or Archived. That must surely be a bug on Phabricator?
I tried 100% and there is no performance loss
Did you try with a clip or a frame rate(ex. 100 fps) that your hardware is not capable at playing at full speed?
Added subscriber: @iss
Changed status from 'Resolved' to: 'Open'
I could reproduce this, but I haven't opened this because I wanted to confirm cause of this.
But I can confirm that this is bug and the cause is in
sequencer.c
There is another issue in
indexer.c
, but that I wouldn't consider to be a bug.Changed status from 'Open' to: 'Resolved'
NB. In order to test this stuff it is quite important to run the clip in a custom frame rate your hardware is not able to max out, or else you won't see the difference.
On my computer, using 2.82 these are my numbers:
100 % proxy clip is playing 12 fps sloweras a proxy as compared to the same clip playing directly in the timeline.
A 75 % proxy is playing a few frames faster as a proxy as compared to the same clip playing directly in the timeline.
A 25 % proxy is playing 10-30 frames faster as a proxy as compared to the same clip playing directly in the timeline.
Since the playback rates are not the same, it seems to me some additional scaling might be going on.
Having the Proxy Render Size at Scene Render Size(btw. needs to be in title case in the Menu) and noting the playback rates changing the Scene Resolution % to 75%, 50% and 25% and comparing them with the same Scene Render Size settings at 75%, 50% and 25% of a clip with no encoded proxy files, the frame rates matches exactly. So the obvious conclusion is that a clip with no encoded proxy files is going through a identical process in the render % and in the proxy preview %.
When playing encoded proxy files as proxies the resolution is of course lowered by the smaller encoded proxy files, but it seems to me, they must be processed by additional proxy preview % down-scaling. Or in other words you only get to see 25% of the encoded 25% proxy file, which explains why the 25% file is playing much faster as a proxy file, as compared to playing the same clip directly in the timeline. And it also explains why a 100% proxy is playing slower as a proxy clip as compared to playing the same clip directly in the timeline, simply because it is a heavier process to scale to a lot of pixels as compared to scale to a few pixels.
The question is if there is additional proxy preview % scaling going on, and if there is, if it really is needed on top of the encoded clips? And if it is considered needed, then maybe the Proxy Preview Resolution % should be separated into a slider like the Render Resolution %. And Proxy Render Size should only deal with file swapping if there are any.
Changed status from 'Resolved' to: 'Open'
Please don't close this task, it has to be worked on.
Changed status from 'Open' to: 'Resolved'
Oh, man, now I closed it again, this new "thing" is super annoying, that replying auto closes the issue you're commenting... I can't open it again... :-(
Changed status from 'Resolved' to: 'Open'
This comment was removed by @EitanSomething
The preview_render_size should be replaced with enums and we wont need to use this hack.
Indeed. In best case we could re-use IMB_ functions and enums.
I have done this quickly in the past, haven't been too happy with solution though. I think, that in that time I wasn't aware of DNA versioning so that's why I dropped it.
Can you test this Fix-#70415.diff
@EitanSomething I'm not entirely sure what you did here, and what you want me to test?
Throwing some files around, it seems that the scaling of files with no encoded proxy files has been removed eg. the quality and framerate is the same no matter what Proxy Render Size is set. (Is this preview scaling to be used in a separate enum?)
When there are encoded proxy files, and the 'Proxy Render Size' is set to 'No proxy, full render' or 'Scene render size' it is actually using the 25% proxies - and not the source file. This means that I'm currently not able to compare the play rates of the proxy files played as proxies and as clips played directly in the time line(No proxy, full render).
I sent the wrong diff
Here is the patch D6368
The reason why proxy files at 25% are slower when added to timeline is because the VSE thinks its original size and runs
with render_size and proxy_size set to 100 when it should be 25 that is where the slowdown is.
Test files to reproduce Speed difference between using 25% proxy and proxy file added to timeline.
Steps to reproduce
Average FPS of Proxy_25.avi in the timeline should be lower than using render proxy 25% of Blender.mp4.
Blender.zip
@EitanSomething
File you provided played at 90 FPS without proxy and 280 FPS with 25% proxy
Proxy file itself plays at 300FPS
This is because proxy of 1920 x 1060 clip has size of 480 x 272
However 1920 * 0.25 = 480
and 1040 * 0.25 = 265
480 x 272 is different to 480 x 265, therefore clip has to be scaled. This is limitation of MJPEG format.
@iss @EitanSomething
That clip plays here at 18 fps when there is a resolution mismatch 1060 vs. 1080.
Using Movie Strip > Set Render Size(so render resolution fits source) the playpack rate jumps to 25 fps.
(Disabling Cache and Cache Drawing)
Playing an encoded proxy file at 25% as proxy plays at 65 fps.
Playing the same file directly in the timeline(No Proxy) it plays at 35 fps.
Does the reason for this hack still exist
@EitanSomething
I think I have read that somewhere in ffmpeg docs, but that would have to be ages ago, so I assumed this to be the case. But just to be sure, I re-tested this by simply rendering at 960x540 (and other arbitrary sizes, that do contradict such rule), and it worked correctly.
So this very well may be historic issue.
You can try to comment this out and try building proxy of any size. None should work if those lines are necessary.
Added subscriber: @EitanSomething
Added subscriber: @brecht
Marking with 2.82 since there is an accepted fix for this bug, just waiting for commit.
This issue was referenced by
3119a014a6
Changed status from 'Confirmed' to: 'Resolved'