-
Notifications
You must be signed in to change notification settings - Fork 117
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
large temp storage requirements #8
Comments
The amount of storage used is definitely an issue, though this seems like an extreme case. What resolution are the input videos? Right now, we're storing all the frames for all input videos onto disk in an uncompressed raw format before starting the composition phase, which is really inefficient. There are definitely ways we could make this more efficient, such as only storing the frames actually in use instead of all frames, but this would complicate the implementation quite a bit. PRs welcome :) As a practical workaround for now, you can try using the |
I ran into this issue too, and when my C: drive ran out of memory the program just crashed. I have an idea for the storage requirements. I hope this isn't too confusing, but the strategy I've devised is detailed below: First Video
Subsequent Videos (N)loop for video in N:
Last Video (M)
After this we have the following list of files, all of which have a filesize that is a subset of the original files' totals:
After running
Finally, we take these files and run ffmpeg's native In this fashion, we only need to run the ffmpeg-concat program on the begin and end files producing .raw files for only these tiny files where the transitions should occur, and leaving the original video mostly alone with its original encoding. No massive amount of additional MB or GB required. This approach would also help to aid #4 as since most of the raw footage is maintained so are their audio tracks which will get concatenated by the ffmpeg native concat command. |
Followup: I plan on implementing the above strategy in a standalone, optional file for my fork. If desired I can open a PR allowing the addition of this component. |
@BrandonCookeDev this approach is definitely right on the money, however the vcodec copy thing won't come into play if you want to do things optimally. I've already implemented this for Automagical but haven't had time to port it back to this project. I'd definitely be happy to accept a PR for this though :) The idea as you said is to only create temp frame data for the parts of the input videos which appear in transitions. The rest of the video can be ignored and concat'ed normally using ffmpeg. There's no need, however, to create temporary video files for each of the sub-videos; you can accomplish the same thing much more efficiently using a single ffmpeg Anywhere you mention Cheers 💯 |
are you planning on implementing the known fix soon? Because the method I suggested, while should work, would be very tedious to write and test. If a fix is in the works I would prefer saving some time :) |
Hey @BrandonCookeDev, yes, I'd very much like to port it over tho free time is rare for me these days. Let me know if you'd like to chat about what the ideal situation would look like and maybe we can collaborate offline :) |
where are the temporary files stored? After the script crashed in the middle of concatenating, I am down at least 40 GB of storage. I'm on a Mac |
restarting my machine freed up the storage again |
See #23 |
Doing this with 17-18 clips with the range of 11-60 seconds of length this consumes approximately 130gigs on my machine. Works out be be about a 8 minute video, I really wanted 10mins but then I ran out of hard drive space. |
@MitchellMonaghan You can also use the |
I created a tool which is similar to this one, which does everything using streaming, thereby removing the need for temporary files and allowing much faster conversion: https://github.com/mifi/editly |
Hello,
when running the CLI tool on Mac OS Sierra 10.13.5 to concatenate two mp4 videos using the basic command you provided as an example
ffmpeg-concat -t circleopen -d 750 -o output.mp4 1.mp4 2.mp4
I end up with "Running out of storage" Mac os error. The system "consumes" all the storage left on my HDD - more than 20 GB for this single command.
Both videos I want to concatenate have around 4 MB. You can find the download link for one of them below. They both have the same properties (codecs, resolution, etc.)
https://1drv.ms/v/s!Ao8YJqxCyIpOhQLXKdJVGj7l_iJI
The text was updated successfully, but these errors were encountered: