Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Image sequence import improvements #2949

Merged
merged 2 commits into from
Nov 17, 2019
Merged

Conversation

ferdnyc
Copy link
Contributor

@ferdnyc ferdnyc commented Aug 26, 2019

Several fixes to the process of importing image sequences:

  • Also log (at warning level) the exception that caused an import failure QMessageBox
  • Add paths, filenames to logging of image sequence discovery
  • Reset ignored_image_sequence_paths after a successful import

Currently when an import attempt fails, OpenShot will display a
messagebox to the user with a generic failure message. This ensures
that the exception which triggered the failure is also logged (at
warning level) for subsequent examination.
- Better logging of sequence discovery process
- Reset ignored paths after successful load
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Aug 26, 2019

The last one bears some explaining:

The current logic around ignored_image_sequence_paths is broken and weird. It's tied to the current view object for the Project Files, so literally just switching between Thumbnail and Details view will clear out the ignored paths. The ignored paths are also cleared whenever a drag-and-drop import is done. So, they're not really stored very persistently.

But, within the current view, the list can be annoyingly persistent. For instance:

  • If I import an image sequence, then remove it from Project Files and try to reimport it, that sequence won't be recognized the second time because the directory is STILL on the ignored paths list.
  • Importing two different image sequences from the same directory also fails, even if they have completely distinct names. But if I switch the view from Thumbnail to Details or vice versa, then it imports fine. There's no sense to that.

So, as a result, now the list is just cleared after every successful import. Which means the user can theoretically import the same image sequence twice, if they choose to... and so what? They could always do that anyway, by switching the view or using drag-and-drop between the two import attempts.

TBH I'm tempted to just remove the ignore list entirely, as I'm pretty sure this change means that it has no actual purpose anymore. I just haven't looked at whether it might provide some protections during the sequence discovery process, that would make it still useful.

@ferdnyc ferdnyc added the media-handling Issues related to video/audio file processing & playback label Aug 26, 2019
@jonoomph
Copy link
Member

👍 Yeah, image sequences are a bit wonky. I'm tempted to re-implement them from the ground up, and use our QtImageReader to fully support them, including looping support (bounce or reset), etc... Also, support for missing files is broken when checking for image sequences.

@jonoomph jonoomph merged commit ec0cd97 into OpenShot:develop Nov 17, 2019
@ferdnyc
Copy link
Contributor Author

ferdnyc commented Nov 19, 2019

@jonoomph See the discussion at #221, on that front. (Wherein I try to trick a user into doing that rewrite, after they discovered that it's possible to set a start_number for FFmpeg so that the sequence isn't forced to be numbered from 0. Which is actually really great, and would improve the image sequence support greatly, but would require a complete reimplementation of the discovery/import process along the lines of what I sketch out in the last comment.)

@ferdnyc ferdnyc deleted the import-fail-log branch November 19, 2019 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
media-handling Issues related to video/audio file processing & playback
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants