Skip to main content
Skip table of contents

FFmpeg presets

Learn about the presets for MP4, H.264, AAC video encoding.

The presets below are used for all videos on the censhare website and seem to work quite well. If you have suggestions for improvement please let us know. For local testing, you can copy the content of the first comment and paste it in a terminal. The different parameters are documented in the FFmpeg documentation on www.ffmpeg.org.

720p

CODE
<?xml version="1.0" encoding="UTF-8"?>

<!-- ffmpeg -i INPUT-FILENAME.mp4 -r 24 -f mp4 -codec:v libx264 -profile:v baseline -level 3.1 -preset slow -crf 1 -maxrate 2500k -bufsize 5000k -vf scale=1280:720 -threads 0 -codec:a aac -b:a 96k -movflags faststart OUTPUT-FILENAME.mp4 -->

<parameters>
  <parameter key="-i" value="@input@"/>
  <parameter key="-ss" value="@start-time@"/>
  <parameter key="-t" value="@duration@"/>
  <parameter key="-r" value="24"/>
  <parameter key="-f" value="mp4"/>
  <parameter key="-codec:v" value="libx264"/>
  <parameter key="-profile:v" value="baseline"/>
  <parameter key="-level" value="3.1"/>
  <parameter key="-preset" value="slow"/>
  <parameter key="-crf" value="1"/>
  <parameter key="-maxrate" value="2500k"/>
  <parameter key="-bufsize" value="5000k"/>
  <parameter key="-vf" value="scale=1280:720"/>
  <parameter key="-threads" value="0"/>
  <parameter key="-codec:a" value="aac"/>
  <parameter key="-b:a" value="96k"/>
  <parameter key="-movflags" value="faststart"/>
  <parameter key="-loglevel" value="error"/>
  <parameter key="-y"/>
  <parameter key="@output@"/>
</parameters>

480p

CODE
<?xml version="1.0" encoding="UTF-8"?>

<!-- ffmpeg -i INPUT-FILENAME.mp4 -r 24 -f mp4 -codec:v libx264 -profile:v baseline -level 3.0 -preset slow -crf 1 -maxrate 1200k -bufsize 2400k -vf scale=854:480 -threads 0 -codec:a aac -b:a 96k -movflags faststart OUTPUT-FILENAME.mp4 -->

<parameters>
  <parameter key="-i" value="@input@"/>
  <parameter key="-ss" value="@start-time@"/>
  <parameter key="-t" value="@duration@"/>
  <parameter key="-r" value="24"/>
  <parameter key="-f" value="mp4"/>
  <parameter key="-codec:v" value="libx264"/>
  <parameter key="-profile:v" value="baseline"/>
  <parameter key="-level" value="3.0"/>
  <parameter key="-preset" value="slow"/>
  <parameter key="-crf" value="1"/>
  <parameter key="-maxrate" value="1200k"/>
  <parameter key="-bufsize" value="2400k"/>
  <parameter key="-vf" value="scale=854:480"/>
  <parameter key="-threads" value="0"/>
  <parameter key="-codec:a" value="aac"/>
  <parameter key="-b:a" value="96k"/>
  <parameter key="-movflags" value="faststart"/>
  <parameter key="-loglevel" value="error"/>
  <parameter key="-y"/>
  <parameter key="@output@"/>
</parameters>

360p

CODE
<?xml version="1.0" encoding="UTF-8"?>

<!-- ffmpeg -i INPUT-FILENAME.mp4 -r 24 -f mp4 -codec:v libx264 -profile:v baseline -level 3.0 -preset slow -crf 1 -maxrate 650k -bufsize 1300k -vf scale=640:360 -threads 0 -codec:a aac -b:a 96k -movflags faststart OUTPUT-FILENAME.mp4 -->

<parameters>
  <parameter key="-i" value="@input@"/>
  <parameter key="-ss" value="@start-time@"/>
  <parameter key="-t" value="@duration@"/>
  <parameter key="-r" value="24"/>
  <parameter key="-f" value="mp4"/>
  <parameter key="-codec:v" value="libx264"/>
  <parameter key="-profile:v" value="baseline"/>
  <parameter key="-level" value="3.0"/>
  <parameter key="-preset" value="slow"/>
  <parameter key="-crf" value="1"/>
  <parameter key="-maxrate" value="650k"/>
  <parameter key="-bufsize" value="1300k"/>
  <parameter key="-vf" value="scale=640:360"/>
  <parameter key="-threads" value="0"/>
  <parameter key="-codec:a" value="aac"/>
  <parameter key="-b:a" value="96k"/>
  <parameter key="-movflags" value="faststart"/>
  <parameter key="-loglevel" value="error"/>
  <parameter key="-y"/>
  <parameter key="@output@"/>
</parameters>

240p

CODE
<?xml version="1.0" encoding="UTF-8"?>

<!-- ffmpeg -i INPUT-FILENAME.mp4 -r 24 -f mp4 -codec:v libx264 -profile:v baseline -level 1.3 -preset slow -crf 1 -maxrate 650k -bufsize 1300k -vf scale=428:240 -threads 0 -codec:a aac -b:a 96k -movflags faststart OUTPUT-FILENAME.mp4 -->

<parameters>
  <parameter key="-i" value="@input@"/>
  <parameter key="-ss" value="@start-time@"/>
  <parameter key="-t" value="@duration@"/>
  <parameter key="-r" value="24"/>
  <parameter key="-f" value="mp4"/>
  <parameter key="-codec:v" value="libx264"/>
  <parameter key="-profile:v" value="baseline"/>
  <parameter key="-level" value="3.0"/>
  <parameter key="-preset" value="slow"/>
  <parameter key="-crf" value="1"/>
  <parameter key="-maxrate" value="650k"/>
  <parameter key="-bufsize" value="1300k"/>
  <parameter key="-vf" value="scale=428:240"/>
  <parameter key="-threads" value="0"/>
  <parameter key="-codec:a" value="aac"/>
  <parameter key="-b:a" value="96k"/>
  <parameter key="-movflags" value="faststart"/>
  <parameter key="-loglevel" value="error"/>
  <parameter key="-y"/>
  <parameter key="@output@"/>
</parameters>
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.