ffmpeg:conversions:convert_h264_to_h265
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
ffmpeg:conversions:convert_h264_to_h265 [2023/06/13 10:55] – peter | ffmpeg:conversions:convert_h264_to_h265 [2023/11/01 21:23] (current) – peter | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== ffmpeg - Conversions - Convert H264 to H265 ====== | ====== ffmpeg - Conversions - Convert H264 to H265 ====== | ||
- | ===== Software Encoding | + | ===== Convert h.264 to h.265 (no change in resolution) |
<code bash> | <code bash> | ||
- | ffmpeg -i a.mp4 -c:v libx265 -map 0:v -c:a copy -map 0:a -c:s copy b.mkv | + | ffmpeg -i input.mp4 -c:v libx265 -vtag hvc1 -c:a copy output.mp4 |
</ | </ | ||
---- | ---- | ||
- | ===== Using GPU Hardware | + | ===== Software |
<code bash> | <code bash> | ||
- | ffmpeg -i a.mp4 -vaapi_device / | + | ffmpeg -i a.mp4 -c:v libx265 |
- | ffmpeg | + | ffmpeg -i a.mp4 -c:v libx265 |
- | ffmpeg | + | ffmpeg -i a.mp4 -c:v libx265 |
+ | </ | ||
+ | <WRAP info> | ||
+ | **NOTE: | ||
- | ffmpeg -hwaccel vaapi -hwaccel_device / | + | * It does not support hardware encoding. |
- | ffmpeg -threads 16 -hwaccel vaapi -hwaccel_device / | + | </ |
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Using GPU Hardware Encoding ===== | ||
+ | |||
+ | <code bash> | ||
+ | ffmpeg -hwaccel vaapi -hwaccel_device / | ||
+ | |||
+ | ffmpeg | ||
+ | |||
+ | ffmpeg -hwaccel vaapi -hwaccel_device / | ||
</ | </ | ||
<WRAP info> | <WRAP info> | ||
- | **NOTE: | + | **NOTE: |
<code bash> | <code bash> | ||
Line 48: | Line 62: | ||
---- | ---- | ||
+ | |||
+ | ===== Keeping the output size low, similar to Software encoding ===== | ||
+ | |||
<code bash> | <code bash> | ||
Line 62: | Line 79: | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ==== Other examples ==== | ||
+ | |||
+ | <code bash> | ||
+ | ffmpeg -i a.mp4 -vaapi_device / | ||
+ | |||
+ | ffmpeg -hwaccel vaapi -hwaccel_device / | ||
+ | |||
+ | ffmpeg -init_hw_device vaapi=amd:/ | ||
+ | |||
+ | |||
+ | ffmpeg -hwaccel vaapi -hwaccel_device / | ||
+ | |||
+ | ffmpeg -threads 16 -hwaccel vaapi -hwaccel_device / | ||
+ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | === References === | ||
+ | |||
+ | https:// | ||
ffmpeg/conversions/convert_h264_to_h265.1686653753.txt.gz · Last modified: 2023/06/13 10:55 by peter