SD to HD with modifying the luma coefficients

I guess, this answers https://github.com/amiaopensource/ffmprovisr/issues/46
This commit is contained in:
Reto Kromer 2016-09-19 18:30:52 +02:00 committed by GitHub
parent a6cc9109e5
commit 0e9530d95a

View File

@ -205,7 +205,36 @@
</div>
<!-- ends 4:3 to 16:9 -->
<!-- 16:9 to 4:3 -->
<!-- SD to HD -->
<span data-toggle="modal" data-target="#SD_HD_2"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Transform SD to HD with pillarbox">SD to HD</button></span>
<div id="SD_HD_2" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">
<div class="modal-content">
<div class="well">
<h3>Transform SD into HD with pillarbox</h3>
<p>Transform a SD video file with 4:3 aspect ratio into an HD video file with 16:9 aspect ration by correct pillarboxing.</p>
<p><code>ffmpeg -i <i>input_file</i> -filter:v "colormatrix=bt601:bt709, scale=1440:1080:flags=lanczos, pad=1920:1080:240:0" -c:a copy <i>output_file</i></code></p>
<dl>
<dt>ffmpeg</dt><dd>starts the command</dd>
<dt>-i <i>input_file</i></dt><dd>path, name and extension of the input file</dd>
<dt>-filter:v "colormatrix=bt601:bt709, scale=1440:1080:flags=lanczos, pad=1920:1080:240:0"</dt><dd>set colour matrix, video scaling and padding<br/>Three filters are applied:
<ol>
<li>The luma coefficients are modified from SD video (according to Rec. 601) to HD video (according to Rec. 709) by a colour matrix. Note that today Rec. 709 is often used also for SD and therefore you may cancel this parameter.</li>
<li>The scaling filter (<code>scale=1440:1080</code>) works for both upscaling and downscaling. We use the Lanczos scaling algorithm (<code>flags=lanczos</code>), which is slower but gives better results than the default bilinear algorithm.</li>
<li>The padding filter (<code>pad=1920:1080:240:0</code>) completes the transformation from SD to HD.</li>
</ol></dd>
<dt>-c:a copy</dt><dd>re-encodes using the same audio codec<br/>
For silent videos you can replace <code>-c:a copy</code> by <code>-an</code>.</dd>
<dt><i>output_file</i></dt><dd>path, name and extension of the output file</dd>
</dl>
<p class="link"></p>
</div>
</div>
</div>
</div>
<!-- ends SD to HD -->
<!-- 16:9 to 4:3 -->
<span data-toggle="modal" data-target="#HD_SD"><button type="button" class="btn btn-default" data-toggle="tooltip" data-placement="bottom" title="Transform 16:9 aspect ratio video into 4:3 with letterbox">16:9 to 4:3</button></span>
<div id="HD_SD" class="modal fade" tabindex="-1" role="dialog">
<div class="modal-dialog modal-lg">