Page MenuHome

Add proxy support for all sequences
Needs ReviewPublic

Authored by Richard Antalik (ISS) on Aug 12 2018, 10:48 AM.

Details

Summary

This patch will enable generating proxies for all picture generating sequences using established interface.
This applies to fallback AVI engine as well as FFmpeg engine.
Support for PNG AVI output is added to sequencer.

Output of non-movie and non-image(seq's without input file) sequences is always bound to setting "per project".
To this output path, path <scene-name>/<seq-name>/ will be appended.
good idea is to set "per project" path to correspond to .blend file name.

Sequences will not keep track of proxies. If you rename/copy scene/sequence, either rename proxy path or rebuild proxies.

big TODO's:

  • There should be a way to track health status of proxies - if parameters of sequence change, proxy should not be used anymore, rebuild is required, user should be notified.
  • I don't really know how to use animation system, so that part of code should be reviewed
  • thread mutex I am using is quick and dirty hack. it is still possible to crash blender due to this, but it should be very rare.

minor TODO's:

  • Filenames are created from sequence / scene names. This has to be sanitized.
  • there is 1 unfreed mem block. I don't know where...
  • I would move indexer.c from Imbuf module to space sequencer

Diff Detail

Event Timeline

Hi @Richard Antalik (ISS) I would like you to join a small slack workspace with myself and a few others who are interested in upgrading the VSE.
If you can share with me an email address I would be happy to send an invite to you.

Hi, it's richardantalik at google mail

Great, thanks! invite sent.

fix minor issues, that slipped

Richard Antalik (ISS) edited the summary of this revision. (Show Details)

Fix HUGE memory leak (still some bytes left, but not gigs of them at least :)
Add PNG / MJPEG codec selection to UI
Render smaller imbufs instead of post-scaling
Render everything to fixed size - so 25% proxy no longer means 25% of source resolution, but it is 25% of "project" resolution (scene->r.xsch)

Richard Antalik (ISS) edited the summary of this revision. (Show Details)

Fix issue with not deleting original proxy file
Add dirty mutex, so it is very unlikely to crash building proxies by human interaction, but I have to look deeper, how it is usualy done in blender.
For multithreading I am using my wm_jobs "hack" but I think, that it may be useful for this kind of job manager to be able to run more than one jobs.

Richard Antalik (ISS) edited the summary of this revision. (Show Details)

Refactor proxy API, 1st pass

Richard Antalik (ISS) edited the summary of this revision. (Show Details)

finished refactoring, movieclip still uses its own job manager, but could maybe use unified...
I don't know if there was multiview support, but now is.

Patch is pretty usable.
It may be annoying, when you want to change parameters of sequences, because you have to delete proxies to see effect of action. Which will probably push me to correct that, but it isn't matter of quick fix.

That being said, I will leave this patch as is for some time.

Add codec selection to set selected strip proxies operator

When disabling proxy, cache for sequence is invalidated. This is instead of delete proxy "button" until we can work with proxy health.

I try to compile this, but the diff file no longer works (can't patch). Can anyone guide me? Is it for the master branch? Is there any chance that this can work in Blender 2.80?

I try to compile this, but the diff file no longer works (can't patch). Can anyone guide me? Is it for the master branch? Is there any chance that this can work in Blender 2.80?

Hi, my plan is to maintain this in my own branch, so once beta is out, I will rebase this.
I am too busy now so unfortunately there may be some delay.

if you want win32 binary, you can download it there https://drive.google.com/open?id=112jLW3yjXIP0RHMiw6K6GUwtinX3QYpA

@Richard Antalik (ISS)
I've been playing around with your 'test patch D3597'

A few remarks:

  • The progress bar on the audio strip visually suggests that a proxy is being generated for the audio, even though it's not. (I would remove it)
  • Overwrite does not seem to work. (When set to disabled)

I think you'd have to enable the panel for the clip strips, though I'm not sure if this is outside of you plan (supporting clip strip proxies with and without distortion in the VSE)

Feature request:

Please... please... can we have the option to render image sequences.

They can save so much time by just deleting the frames you need re-rendered and then rendering with overwrite disabled.

Misc:

This is probably an issue with Blender itself, but if you select a location that is read only Blender will crash.
Same if the drive is full.

In your build I can't seem to add Image sequence strips.

@Richard Antalik (ISS)
I've been playing around with your 'test patch D3597'

  • The progress bar on the audio strip visually suggests that a proxy is being generated for the audio, even though it's not. (I would remove it)

This would be easy to solve.

  • Overwrite does not seem to work. (When set to disabled)

Will look at this.

I think you'd have to enable the panel for the clip strips, though I'm not sure if this is outside of you plan (supporting clip strip proxies with and without distortion in the VSE)

Did you build install target? I see file release/scripts/startup/bl_ui/space_sequencer.py included in patch.

Feature request:

Please... please... can we have the option to render image sequences.

They can save so much time by just deleting the frames you need re-rendered and then rendering with overwrite disabled.

Sure, we can pass ibufs to different encoding engine. Dunno if it's better to use older custom solution, or if ffmpeg can be configured to do such task.
As there are some TODO's still I would push this down the priority list.

Render mutex and invalidation may conflict with cache "remake" I am working on, therefore I want to wait for result of that patch before implementing.

Misc:

This is probably an issue with Blender itself, but if you select a location that is read only Blender will crash.
Same if the drive is full.

I am pretty sure, that blender has some functions built in to deal with this. It didn't come to my mind even that this would be an issue.

In your build I can't seem to add Image sequence strips.

Must look into this - it was not my intention.