user23098: I have a file of resolution 3840x1632, but my TV stretches the picture vertically to fill up all 2160 pixels of height.  Is it possible to use ffmpeg to add blank / black height, while preserving the video and audio quality?
Tried doing this, which seemed to work (took about 2 hours, the same length of the video), but greatly reduced the file size/video quality):
ffmpeg -i input.mkv -filter:v "pad=3840:2160:0:280" -c:a copy my_output_video.mkv

Is there a switch to say "keep everything else the same"?
Thank you!

user26493: You can do transformations with -c:v libx264 -crf 0 X264 has lossless mode, which it enters with -crf 0. They implemented real lossless video encoding, this is not widely known - but it works perfectly.
I use it all the time.
Be ready - it takes GBs - especially for videos of real-life (not graphics etc...)
Doing screen recording for programs and graphis in -crf 0 - is perfect - it compresses them really great and uses relatively small CPU power.
You also can control compression complexity it uses, with the presets (fast, veryslow ... etc). And you also can recomress lossles into more compressed lossless.
Everything for lossless is the same as for all x264's, except that it is the real lossless.

user1871: You'll have to manually set encoding parameters.
ffmpeg -i input.mkv -filter:v "pad=3840:2160:0:280,setsar=1" -crf 18 -preset faster -c:a copy my_output_video.mkv

The CRF option sets the tradeoff for size/quality. Lower values produce better quality but larger files. The preset will increase speed, but for same quality, the file size will be larger.
The setsar filter has been added as a precaution in case your player reads the SAR stored in the file and stretches the video based on that value.

23098: <p>I have a file of resolution 3840x1632, but my TV stretches the picture vertically to fill up all 2160 pixels of height.  Is it possible to use ffmpeg to add blank / black height, while preserving the video and audio quality?</p>

<p>Tried doing this, which seemed to work (took about 2 hours, the same length of the video), but greatly reduced the file size/video quality):</p>

<pre><code>ffmpeg -i input.mkv -filter:v "pad=3840:2160:0:280" -c:a copy my_output_video.mkv
</code></pre>

<p>Is there a switch to say "keep everything else the same"?</p>

<p>Thank you!</p>
 26493: <p>You can do transformations with <code>-c:v libx264 -crf 0</code> X264 has lossless mode, which it enters with <code>-crf 0</code>. They implemented real lossless video encoding, this is not widely known - but it works perfectly.</p>

<p>I use it all the time.</p>

<p>Be ready - it takes GBs - especially for videos of real-life (not graphics etc...)</p>

<p>Doing screen recording for programs and graphis in <code>-crf 0</code> - is perfect - it compresses them really great and uses relatively small CPU power.</p>

<p>You also can control compression complexity it uses, with the presets (<code>fast</code>, <code>veryslow</code> ... etc). And you also can recomress lossles into more compressed lossless.</p>

<p>Everything for lossless is the same as for all x264's, except that it is the real lossless.</p>
 1871: <p>You'll have to manually set encoding parameters.</p>

<pre><code>ffmpeg -i input.mkv -filter:v "pad=3840:2160:0:280,setsar=1" -crf 18 -preset faster -c:a copy my_output_video.mkv
</code></pre>

<p>The CRF option sets the tradeoff for size/quality. Lower values produce better quality but larger files. The preset will increase speed, but for same quality, the file size will be larger.</p>

<p>The setsar filter has been added as a precaution in case your player reads the SAR stored in the file and stretches the video based on that value.</p>
