function ffprobe(storage, ffprobePath) {
  const test = entry => entry.type === 'video' && needsUpgrade(entry.meta?.ffprobe)

  const _gallery = { version: 2 }

  const task = async (entry) => {
    const t0 = Date.now();
    const src = await entry.getFile()
    return spawnFfprobe(ffprobePath, src)
      .then(stdout => {
        try {
          return JSON.parse(stdout)
        } catch (e) {
          throw new Error(`Failed to parse out as json: ${stdout}`, {cause: e})
        }
      })
      .then(data => storage.writeFile(entry, ffprobeSuffix, {...data, _gallery}))
      .then(() => {
        log.debug(t0, `Extracted video meta data from ${entry}`);
      })
      .catch(err => {
        log.warn(err, `Could not extract video meta data from ${entry}: ${err}`);
      })
  }

  return {
    test,
    task
  }
}
@param {import('@home-gallery/types').TStorage} storage
@param {string} ffprobePath
@returns {import('stream').Transform}