I want to iterate through a list of videos and convert them from .avi to .mp4 using a script, which takes about ~1 min for each file.
find . -name "*.avi" -type f | while read FILE; do
HandbrakeCLI [flags] $FILE # execute 30 sec ~ 2 min function here
done
problem is, this seems to be only running on the first file, as though successive invocations are blocks.
How can I spawn asynchronous threads to handle each case?
This is a duplicate of that other issue which is trying to solve new processes of ssh, and the solution is based on arguments available to ssh. I am asking for a way to spawn new bash threads in an iterator, maybe theres a duplicate ticket that can direct me that way?