title: ffmpeg : "Error setting profile"; how to keep original resolution odf odd sized videos; getting Quicktime compatible output; fixing pixel format
body: <p>I've been having trouble using ffmpeg to compress videos to something readable by quicktime.  My goal in the end is to have a simple command that I can use to compress high bitrate videos (ie screencaptures) to something more reasonable to be able to share them with people. </p>
  
  <p>I want to use a command I found <a href="https://www.virag.si/2012/01/web-video-encoding-tutorial-with-ffmpeg-0-9/" rel="nofollow noreferrer">here</a> as a starting point:</p>
  
  <pre><code>ffmpeg -i input-file.avi -codec:v libx264 -profile: high -preset slow -b:v 500k -maxrate 500k -bufsize 1000k -vf scale=-1:480 -threads 0 -codec:a libfdk_aac -b:a 128k output_file.mp4
  </code></pre>
  
  <p>Unfortunately I get this error:</p>
  
  <pre><code>[libx264 @ 0x7f92ab81c200] Error setting profile high.
  [libx264 @ 0x7f92ab81c200] Possible profiles: baseline main high high10 high422 high444
  Stream mapping:
    Stream #0:0 -&gt; #0:0 (rawvideo (native) -&gt; h264 (libx264))
  Error while opening encoder for output stream #0:0 - maybe incorrect parameters such as bit_rate, rate, width or height
  </code></pre>
  
  <p>If I take out the <code>-profile: high</code> the command functions but the output still doesn't open in quicktime (it does in VLC).  I can't find the keyword <code>-profile</code> on the ffmpeg man page: <a href="https://ffmpeg.org/ffmpeg.html" rel="nofollow noreferrer">https://ffmpeg.org/ffmpeg.html</a> so I don't know if this is important or what to do about it.  </p>
  
  <p>Does anyone know what might be causing my problem? What should I do to try and debug this problem? I would describe myself as inexperienced so sorry if I'm missing something obvious.</p>
  
  <p>Thanks in advance for your help,
  Peter</p>
  
  <p>This is my ffmpeg version:</p>
  
  <pre><code>ffmpeg version 3.2.4 Copyright (c) 2000-2017 the FFmpeg developers
    built with Apple LLVM version 7.0.2 (clang-700.1.81)
  </code></pre>