index.js
function command(os) {
  var z = 'ffmpeg';
  var os = os||[];
  for(var o of os) {
    var o = o||{};
    for(var k in o) {
      if(o[k]==null) continue;
      if(k==='stdio') continue;
      if(k==='o' || k==='outfile') z += ` "${o[k]}"`;
      else if(typeof o[k]==='boolean') z += o[k]? ` -${k}`:'';
      else z += ` -${k} ${JSON.stringify(o[k])}`;
    }
  }
  return z;
}
function command(os) {
  var z = 'ffmpeg';
  var os = os||[];
  for(var o of os) {
    var o = o||{};
    for(var k in o) {
      if(o[k]==null) continue;
      if(k==='stdio') continue;
      if(k==='o' || k==='outfile') z += ` "${o[k]}"`;
      else if(typeof o[k]==='boolean') z += o[k]? ` -${k}`:'';
      else z += ` -${k} ${JSON.stringify(o[k])}`;
    }
  }
  return z;
}
function command ( os ) { var z = 'ffmpeg' ; var os = os || [ ] ; for ( var o of os ) { var o = o || { } ; for ( var k in o ) { if ( o [ k ] == null ) continue ; if ( k === 'stdio' ) continue ; if ( k === 'o' || k === 'outfile' ) z += ` ${ o [ k ] } ` ; else if ( typeof o [ k ] === 'boolean' ) z += o [ k ] ? ` ${ k } ` : '' ; else z += ` ${ k } ${ JSON . stringify ( o [ k ] ) } ` ; } } return z ; }
Generate command for ffmpeg.
Generate command for ffmpeg .