title: Encoding with FFMPEG stretches frames
body: <p>I am trying to encode video with FFMPEG into H.265, but I have a problem with a weird stretching. Input video is 1920x1080 and output has the same resolution, but when I compare both images on same timestamp, encoded video seems to be stretched by few pixels (it is visibly wider on both sizes despite the fact resolution is same). It seems that this stretching introduces ugly bluriness in whole video. It seems like FFMPEG crop few pixels from left and right (probably black pixels at the edge of video) and stretches content to fill those missing pixels and preserve same resolution.</p>
  
  <p>I did not find any way how to disable this behavior. I tried to change encoder from x265 to x264 to see if that is the problem, but result was still stretched.</p>
  
  <p>I used this command line parameters:</p>
  
  <pre><code>ffmpeg -i input.mkv -c:v libx265 -preset medium -crf 23 -t 30 output.mp4
  </code></pre>
  
  <p><strong>-t 30</strong> is there to test result visual quality on small sample of length 30 seconds.</p>
  
  <p><em>Does anyone have any idea why this happens and how to fix it? Most visual quality is lost because of this deformation and not because of recompression, which I proved by encoding with -crf 0, which is basically lossless and result was still blurred.</em></p>
  
  <p><strong>EDIT:</strong> Link to full console output: <a href="https://pastebin.com/gpMD5Qec" rel="nofollow noreferrer">https://pastebin.com/gpMD5Qec</a></p>