I have folder that contains some mp4 files I want to extract images from each of them in parallel and save it as:


where filename is the input filename

how to do that using parallel and ffmpeg


I'm using the example from your previous question to use as an example for GNU parallel

ls *.mp4 | parallel ffmpeg -i {} fr1/{.}_%d.jpg -hide_banner

I can adjust the answer if this is not quite what you want. The “{}” gets replaced by GNU parallel with the whole file name, and “{.}” gets replaced by the file name with the last segment, separated by periods, removed.

  • @mark - make sure and select this as the accepted answer if it is – Larry Apr 28 '19 at 19:06
  • Is "parallel" the same as "xargs -P" ? – Simon Richter Apr 28 '19 at 19:27
  • No. It is GNU Parallel. xargs -P does not support dynamically computing the number of cores and does not support {.}. – Ole Tange Apr 29 '19 at 22:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.