User Tools

Site Tools


ffmpeg:encoding:cpu_encoding

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
ffmpeg:encoding:cpu_encoding [2025/02/17 12:00] – created peterffmpeg:encoding:cpu_encoding [2025/02/17 12:14] (current) peter
Line 1: Line 1:
 ====== ffmpeg - Encoding - CPU Encoding ====== ====== ffmpeg - Encoding - CPU Encoding ======
 +
 +Convert the video to HEVC while keeping the auto track and everything else the same.
 +
 +<code bash>
 +ffmpeg -i input.mp4 -c:v libx265 -c:a copy -preset slow output.mp4
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  
 +
 +  * This uses the **libx265 encoder** to encode the video into the HEVC format.
 +  * This will copy the audio track without re-encoding it. 
 +  * The **-preset slow** option will produce the highest quality output, but it will take longer to process.
 +</WRAP>
 +
 +----
 +
 +<code bash>
 +ffmpeg -i input.mp4 -c:v hevc -crf 23 -preset slow output.mp4
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  
 +
 +  * This will use a constant rate factor (CRF) of 23 (medium quality).
 +</WRAP>
 +
 +----
 +
 +===== Adding Subtitles =====
 +
 +<code bash>
 +ffmpeg -i input.mp4 -vf "subtitles=subtitle.srt:force_style='Fontsize=24'" -c:v hevc -crf 23 output.mp4
 +</code>
 +
 +<WRAP info>
 +**NOTE:**  
 +
 +  * **-vf**: the video filter chain for applying filters to the video, including subtitle rendering.
 +  * This includes subtitles from the **subtitle.srt** file with a Fontsize of 24.
 +
 +</WRAP>
 +
ffmpeg/encoding/cpu_encoding.1739793620.txt.gz · Last modified: 2025/02/17 12:00 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki