I am trying to take ~50K images and turn them into a movie using ffmpeg. I am running this on a HPC setup, hence the slurm commands. My attempt does not work since I am running into a hard limit due to the shear volume of images. I cannot just list a start number since the pipeline will reject some images so I do not have a proper sequence.
I know a loop could circumvent both issues but I am not sure how to use that with ffmpeg so that it builds one long movie.
The cat command has worked for shorter movies but i just have too many images now.
#!/bin/bash
img_dir='foo/bar/1/2/123456'
folder='fooo'
#BATCH -p general
#SBATCH -N 1
#SBATCH -t 03-00:00:00
#SBATCH --mem=8g
#SBATCH -n 1
#SBATCH --mail-type=BEGIN,REQUEUE,END,FAIL,REQUEUE
#SBATCH --mail-user=<snip>
singularity exec /$img_dir/foo_container cat /$img_dir/processed_images/$folder/*.jpeg | ffmpeg -f image2pipe -i pipe:.jpeg -vf "crop=trunc(iw/2)*2:trunc(ih/2)*2" /$img_dir/processed_images/$folder/$folder.mp4