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
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 isLarry– Larry2019年04月28日 19:06:36 +00:00Commented Apr 28, 2019 at 19:06
-
Is "parallel" the same as "xargs -P" ?Simon Richter– Simon Richter2019年04月28日 19:27:48 +00:00Commented 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– Ole Tange2019年04月29日 22:35:16 +00:00Commented Apr 29, 2019 at 22:35