Page MenuHome

WIP: Automaticly build proxy when movie and image files are added
Needs ReviewPublic

Authored by Eitan Traurig (EitanSomething) on Mar 20 2020, 6:08 PM.

Details

Summary

Automatically builds proxy files for movie and image sequences.

TODO:

  • Identify if movie file is selected when using add image file browser
  • Add more settings
  • Add progress bar

Diff Detail

Repository
rB Blender
Branch
CreateProxyLoadFile (branched from master)
Build Status
Buildable 7245
Build 7245: arc lint + arc unit

Event Timeline

Eitan Traurig (EitanSomething) retitled this revision from WIP: Automaticly build proxy when load Image and Movie files to WIP: Automaticly build proxy file on load.Mar 20 2020, 6:12 PM
Eitan Traurig (EitanSomething) edited the summary of this revision. (Show Details)
Eitan Traurig (EitanSomething) retitled this revision from WIP: Automaticly build proxy file on load to WIP: Automaticly build proxy when movie and image is added.
Eitan Traurig (EitanSomething) retitled this revision from WIP: Automaticly build proxy when movie and image is added to WIP: Automaticly build proxy when movie and image files are added.
  • Only grap sequencer data once
  • New Defaults

Just went over this briefly.
Apart from fact this doesn't work without few tweaks in debugger,
why you don't just call seq_proxy_build_job() in sequencer_add_generic_strip_exec()? It should do the job just fine.

If the issue is, that it works only if Replace Selection is checked, variant of seq_proxy_build_job() that accepts PointerRNA could be made. Or alternatively do store / restore selection approach.

Apart from fact this doesn't work without few tweaks in debugger,

What changes did you need to make?

why you don't just call seq_proxy_build_job() in sequencer_add_generic_strip_exec()? It should do the job just fine.

I can't call seq_proxy_build_job() because it needs to be static. It needs to be static because it is called by sequencer_rebuild_proxy_invoke

Apart from fact this doesn't work without few tweaks in debugger,

What changes did you need to make?

Not sure now, I added file and it ended on some exception, so I just changed some variable values. I can have another look soon, but I would rather move to following point

why you don't just call seq_proxy_build_job() in sequencer_add_generic_strip_exec()? It should do the job just fine.

I can't call seq_proxy_build_job() because it needs to be static. It needs to be static because it is called by sequencer_rebuild_proxy_invoke

I don't see why seq_proxy_build_job() would have to be static. Even then you could wrap it in another function.

I just quickly added void seq_proxy_build_job(const struct bContext *C, struct ReportList *reports); to sequencer_intern.h

and changed your code in sequencer_add_generic_strip_exec() to

if ((seq->flag & SEQ_LOAD_USE_PROXY)) {
  seq->flag &= SEQ_LOAD_USE_PROXY;
  seq->flag |= SEQ_USE_PROXY;

  seq->flag |= SELECT;
  seq_proxy_build_job(C, op->reports);
}

And it works as expected, apart from forcing strips to be selected on addind.

These are my notes on this patch:

  • Only having the auto-proxy options in the Add menu, but also affecting dragging from the workspace file browser or from outside, doesn't feel right - imo, those options should go into the User Preferences and then on/off button could be mirrored in the Add - File Browser.
  • Maybe the default for auto-proxy generation should be off as default? As it is annoying to have those long import times where Blender goes unresponsive, especially with no statusbar.
  • Pick one proxy size as default(render times are high) Could 50% would be a good default?

On the UI, I think the options should be placed in a sub panel with the main switch in the header like ex. fbx import uses.

Features:

  • Add an Overwrite option? What will happen currently, if you already have a proxy generated, will it be generated again, if you need to add the same source material twice?
  • If there is only one proxy size checked, maybe the could be an option enabled to "Use Proxy for Preview" like the "Use Movie Framerate", which will auto-set the "Proxy Render Preview" to match the file generation(most newbies will not know that this is needed)? "Use Proxy for Preview" is a terrible name. "Use Movie Framerate" is terrible too - but they should have related names.
  • Batch generation(without import) of a folder could be a nice feature.