Verify integrity of Videos files with ffmpeg

Using ffmeg to verify the integrity of video files. Parallelized by using GNU parallel, filesnames of problematic files are written to a text file.

process_one() {
  local file=$1 && echo $file
  local out=$(ffmpeg -threads 1 -v error -i "$file" -f null - 2>&1);
  if [ "$out" = ""  ]; then
    echo "looks good"
    echo $out && echo $file >> problem.txt

export -f process_one
parallel process_one ::: video_directory/*.mp4