Video importer into asset library + extra video import formats - #191
Open
Alani25 wants to merge 10 commits into
Open
Video importer into asset library + extra video import formats#191Alani25 wants to merge 10 commits into
Alani25 wants to merge 10 commits into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users can now import MP4s through the asset library and do not need to open MP4s as a completely separate project, allowing them to add videos as assets into an existing project.
I believe the original MP4 import code I was able to get through stack overflow, but it wasn't optimized enough for our use case. So, while working on this I also added multiple workers for the MP4 importer to speed up the process, and also had the audio extraction work in parallel as well… no idea if this would improve the audio quality but the speed difference is noticable.
Importing a test video of length 1 minute 42.5 seconds at an framerate of 12 FPS resulting in up to ~1230 frames, using a stopwatch to record the import time we get:
^ I mean zero surprises here it only makes sense
Theoretically we can go for more workers on better devices, specifically with the tauri builds, but 4 workers seems to be the right bar for all devices so far (especially Linux). This may come at a later time.
One last improvement— "MP4" importer now accepts other video formats (mov, webm, mkv, avi, 3gp, ogv, m4v, wmv).
Thanks to the way the current MP4 importer system is set up this was just a matter of allowing the user to select another format. Haven't tested on all formats, but mov and MP4 work (mov is the same format used by apple devices by default, making video import on iphones a lot easier as well).