fourMs / VideoAnalysis

A standalone application for creating visualizations and extract motion features from video files.
https://www.uio.no/ritmo/english/research/labs/fourms/downloads/software/VideoAnalysis/
8 stars 2 forks source link

Loop-points don't recall correctly #37

Closed aleksati closed 4 years ago

aleksati commented 4 years ago

When utilizing the trimming function with the "remember settings"-setting, the loop-points don't recall correctly if I select another video and go back to the video with the trimming. Like this:

ezgif com-video-to-gif

aleksati commented 4 years ago

There are two related problems here actually.

  1. When returning to a video with trimming, the getattr looppoints always bangs out the full range (so from 0 to end of the movie) and then the recalled range.

  2. Because of this, changing movies in umenu will accidentally replace the PREVIOUS movie's trimming values to the current movie's full range. This is because this process happens before we store a new value in the [v item].

I will look into this now. Just to be safe, I´m making a new duplicate patch of the "VideoAnalysis" called "VideoAnalysis_alt-trimming" because I'm changing some stuff there. I will push later tonight or tomorrow morning.

aleksati commented 4 years ago

I made it so that the trimming values are only stored on-demand. This is something we have been talking about before and is a nice approach to these things.

The looppoints are now only stored when the user selects a new video. This works because if you only have one video loaded, the program still "re-loads" the video before exporting effectively storing its trimming-value to the dict. I have made some minor changes to [VA_trimming_data] to accommodate this and added a few things to the duplicate main patch called "VideoAnalysis_alt-trimming". @balintlaczko please check to see that is works nice on Win, and feel free to edit if you see fit :)

aleksati commented 4 years ago

Ah, I discovered now that this causes some other minor issues. Namely with the mg-preview and save-settings. I will look into this now.

balintlaczko commented 4 years ago

It seems work reliably. Also, great idea making it "on-demand"! Seems to be solid while lowering computational load. The real-time part also works well with the mgx preview. Discovered a strange thing though with mgx preview: it sometimes turns white (I think right after moving on from an inverted movie) during batch export. It is not doing any harm though, just looks a bit odd. Will make an issue. Great work with sorting out the trimming issue! I will thus close this now.