Open mifi opened 3 years ago
As others have already requested...
I have a directory full of files with the exact same intro and tail i'd like to trim off (same cuts). The files also require 'fix incorrect duration' and export to the same format. Processing in batch overnight would save a huge amount of time.
Thanks for counting my vote for this capability.
NOTE: This is different from #89, because that is just a workflow improvement.
This feature is about running the exact same operation (or cut) on multiple files, e.g. you have a folder with a number of files, and you want to do the exact same thing with all files.
Such a feature could be implemented by having an extra "Tools" menu or an option in the Export dialog where the user selects additional files to run the same edit on. Or the operation could be done on all files the currently loaded batch list.
Note that I haven't prioritised this very highly, because there are so many different wishes and these kinds of operations can often be easily automated by bash scripting using ffmpeg directly (even with the help of AI, see workaround below).
Batch same cut on multiple files
This might done on be all files in the "batch list".
Other batch operations
Grouped batching
Workaround: bash script
A simple workaround is to write a bash script and use
ffmpeg
directly. For example to cut multiple files exactly the same, create a filebatch.sh
with this content:Note that the example script above is for UNIX based operating systems like MacOS/Linux. Windows users: If you need to do this on Windows, maybe you can ask ChatGPT something like: "Convert this command from bash to Windows Batch" and paste the above command. Or you can use WSL2.
Tip: First run your desired operation (e.g. a cut) in LosslessCut on your first file in your batch list. Then open then "Last ffmpeg commands" menu, and look at the last ffmpeg command that was run. Then copy this and paste it into the above script. You then need to insert variables like
$TIME_TO_CUT_FROM
,$TIME_TO_CUT_TO
and$FILE
into the command you copy pasted.Bonus: ChatGPT / AI
I wish more people were aware of this, but large language models like ChatGPT can be incredibly useful for helping non-programmers with simple programming tasks.
Basically you just need to ask the AI to write a script for you to do whatever you need. If it doesn't work, you can continue the conversation to try to get it corrected. And it's free!
Here are a few examples:
Batch split files into equal length segments
This gave me the following script: https://github.com/mifi/lossless-cut/issues/2011#issuecomment-2133995854
Batch rotate all files to 90 degrees
You know the drill now...
Then once you have the script, you can ask ChatGPT "how do I run this?"