<commit_before>'use strict';

const execa = require('execa'),
  log = require('intel');

module.exports = {
  run(videoPath) {
    // Get the average saturation level of each frame
    const scriptArgs = [
      '-f',
      'lavfi',
      '-i',
      "movie='" + videoPath + "',signalstats",
      '-show_entries',
      'frame_tags=lavfi.signalstats.SATAVG',
      '-v',
      'quiet',
      '-print_format',
      'json'
    ];

    log.verbose('Running ffprobe ' + scriptArgs.join(' '));

    return execa('ffprobe', scriptArgs)
      .then(result => result.stdout)
      .then(JSON.parse);
  }
};
<commit_msg>escape = for ffprobe https://github.com/sitespeedio/sitespeed.io/issues/1797<commit_after>'use strict';

const execa = require('execa'),
  log = require('intel');

module.exports = {
  run(videoPath) {
    // Get the average saturation level of each frame
    const scriptArgs = [
      '-f',
      'lavfi',
      '-i',
      "movie='" + videoPath.replace('=','\\=') + "',signalstats",
      '-show_entries',
      'frame_tags=lavfi.signalstats.SATAVG',
      '-v',
      'quiet',
      '-print_format',
      'json'
    ];

    log.verbose('Running ffprobe ' + scriptArgs.join(' '));

    return execa('ffprobe', scriptArgs)
      .then(result => result.stdout)
      .then(JSON.parse);
  }
};

{'fraction_non_alphanumeric': 0.17889908256880735, 'fraction_numerical': 0.0030581039755351682, 'mean_word_length': 2.5765027322404372, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4108000', 'n_tokens_mistral': 449, 'n_tokens_neox': 433, 'n_words': 83}