5

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

filename_number.bmp

where filename is the input filename

how to do that using parallel and ffmpeg

1 Answer 1

8

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.

3
  • @mark - make sure and select this as the accepted answer if it is
    – Larry
    Apr 28, 2019 at 19:06
  • Is "parallel" the same as "xargs -P" ? Apr 28, 2019 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, 2019 at 22:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .