<commit_before>var ffmpeg = require('../lib/fluent-ffmpeg');

// make sure you set the correct path to your video file
var proc = new ffmpeg('/path/to/your_movie.avi')
  // set video bitrate
  .withVideoBitrate(1024)
  // set target codec
  .withVideoCodec('divx')
  // set aspect ratio
  .withAspectRatio('16:9')
  // set size in percent
  .withSize('50%')
  // set fps
  .withFps(24)
  // set audio bitrate
  .withAudioBitrate('128k')
  // set audio codec
  .withAudioCodec('libmp3lame')
  // set number of audio channels
  .withAudioChannels(2)
  // set custom option
  .addOption('-vtag', 'DIVX')
  // set output format to force
  .toFormat('avi')
  // save to file
  .saveToFile('/path/to/your_target.avi', function(retcode, error){
    console.log('file has been converted succesfully');
  });<commit_msg>Updated the example to use right API method to set aspect-ratio<commit_after>var ffmpeg = require('../lib/fluent-ffmpeg');

// make sure you set the correct path to your video file
var proc = new ffmpeg('/path/to/your_movie.avi')
  // set video bitrate
  .withVideoBitrate(1024)
  // set target codec
  .withVideoCodec('divx')
  // set aspect ratio
  .withAspect('16:9')
  // set size in percent
  .withSize('50%')
  // set fps
  .withFps(24)
  // set audio bitrate
  .withAudioBitrate('128k')
  // set audio codec
  .withAudioCodec('libmp3lame')
  // set number of audio channels
  .withAudioChannels(2)
  // set custom option
  .addOption('-vtag', 'DIVX')
  // set output format to force
  .toFormat('avi')
  // save to file
  .saveToFile('/path/to/your_target.avi', function(retcode, error){
    console.log('file has been converted succesfully');
  });

{'fraction_non_alphanumeric': 0.138711549622751, 'fraction_numerical': 0.01857225769007545, 'mean_word_length': 2.8654708520179373, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6152520', 'n_tokens_mistral': 619, 'n_tokens_neox': 574, 'n_words': 158}