ffmpeg:encoding:cpu_encoding
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
ffmpeg:encoding:cpu_encoding [2025/02/17 12:00] – created peter | ffmpeg: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 | ||
+ | </ | ||
+ | |||
+ | <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. | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | <code bash> | ||
+ | ffmpeg -i input.mp4 -c:v hevc -crf 23 -preset slow output.mp4 | ||
+ | </ | ||
+ | |||
+ | <WRAP info> | ||
+ | **NOTE: | ||
+ | |||
+ | * This will use a constant rate factor (CRF) of 23 (medium quality). | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Adding Subtitles ===== | ||
+ | |||
+ | <code bash> | ||
+ | ffmpeg -i input.mp4 -vf " | ||
+ | </ | ||
+ | |||
+ | <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. | ||
+ | |||
+ | </ | ||
+ |
ffmpeg/encoding/cpu_encoding.1739793620.txt.gz · Last modified: 2025/02/17 12:00 by peter