You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
A simple workaround is to write a bash script and use ffmpeg directly. For example to cut multiple files exactly the same, create a file batch.sh with this content:
# example: cut away 30 sec from start of all files, and include everything until 60 sec# adjust the following values:
TIME_TO_CUT_FROM=30
TIME_TO_CUT_TO=60
FOLDER_PATH=/path/to/files/*.mp4
forFILEin"$FOLDER_PATH"do# This ffmpeg command can be replaced with whichever operation you'd like to run on all the files.# It could also be an ffmpeg command copy-pasted from LosslessCut (and adjusted)
ffmpeg -ss "$TIME_TO_CUT_FROM" -i "$FILE" -t "$TIME_TO_CUT_TO" -c copy "$FILE-cut.mp4"done
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
write a bash script that takes a folder of mp4 files, then for each file, split it into an (unknown) number of files, each file of an equal length of 299 seconds.
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.
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
See also Batch processing article
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: #2011 (comment)
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?"
The text was updated successfully, but these errors were encountered: