diff --git a/css/css.css b/css/css.css index 03046d8..26f4e9e 100644 --- a/css/css.css +++ b/css/css.css @@ -80,3 +80,11 @@ div { background-color: #f9f2f4; border-radius: 4px } + +.beware { + font-size: 150%; +} + +.footnote { + font-size: 90%; +} diff --git a/img/colourspace_metadata_mediainfo.png b/img/colourspace_metadata_mediainfo.png new file mode 100644 index 0000000..b8891ca Binary files /dev/null and b/img/colourspace_metadata_mediainfo.png differ diff --git a/index.html b/index.html index 0b02461..8bd4261 100644 --- a/index.html +++ b/index.html @@ -493,18 +493,50 @@
This command applies a filter to convert the video to a different colour space.
+This command uses a filter to convert the video to a different colour space.
ffmpeg -i input_file -c:v libx264 -vf colormatrix=src:dst output_file
bt601
(Rec.601), smpte170m
(Rec.601, 525-line/NTSC version), bt470bg
(Rec.601, 625-line/PAL version), bt709
(Rec.709), and bt2020
(Rec.2020).bt601
(Rec.601), smpte170m
(Rec.601, 525-line/NTSC version), bt470bg
(Rec.601, 625-line/PAL version), bt709
(Rec.709), and bt2020
(Rec.2020).-vf colormatrix=bt601:bt709
.Note: Converting between colourspaces with ffmpeg can be done via either the colormatrix or colorspace filters, with colorspace allowing finer control (individual setting of colourspace, transfer characteristics, primaries, range, pixel format, etc). See this entry on the ffmpeg wiki, and the ffmpeg documentation for colormatrix and colorspace.
+ ffmpeg -i input_file -c:v libx264 -vf colormatrix=src:dst -color_primaries val -color_trc val -colorspace val output_file
smpte170m
(Rec.601, 525-line/NTSC version), bt470bg
(Rec.601, 625-line/PAL version), bt709
(Rec.709), and bt2020
(Rec.2020).
+ smpte170m
(Rec.601, 525-line/NTSC version), gamma28
(Rec.601, 625-line/PAL version)1, bt709
(Rec.709), bt2020_10
(Rec.2020 10-bit), and bt2020_12
(Rec.2020 12-bit).smpte170m
(Rec.601, 525-line/NTSC version), bt470bg
(Rec.601, 625-line/PAL version), bt709
(Rec.709), bt2020_cl
(Rec.2020 constant luminance), and bt2020_ncl
(Rec.2020 non-constant luminance).To Rec.601 (525-line/NTSC):
+ ffmpeg -i input_file -c:v libx264 -vf colormatrix=bt709:smpte170m -color_primaries smpte170m -color_trc smpte170m -colorspace smpte170m output_file
To Rec.601 (625-line/PAL):
+ ffmpeg -i input_file -c:v libx264 -vf colormatrix=bt709:bt470bg -color_primaries bt470bg -color_trc gamma28 -colorspace bt470bg output_file
To Rec.709:
+ ffmpeg -i input_file -c:v libx264 -vf colormatrix=bt601:bt709 -color_primaries bt709 -color_trc bt709 -colorspace bt709 output_file
MediaInfo output examples:
+⚠ Using this command it is possible to add Rec.709 tags to a file that is actually Rec.601 (etc), so apply with caution!
+These commands are relevant for H.264 and H.265 videos, encoded with libx264
and libx265
respectively.
Note: If you wish to embed colourspace metadata without changing to another colourspace, omit -vf colormatrix=src:dst
. However, since it is libx264
/libx265
that writes the metadata, it's not possible to add these tags without reencoding the video stream.
For all possible values for -color_primaries
, -color_trc
, and -colorspace
, see the ffmpeg documentation on codec options.
1. Out of step with the regular pattern, -color-trc
doesn't accept bt470bg
; it is instead here referred to directly as gamma.
+ In the Rec.601 standard, 525-line/NTSC and 625-line/PAL video have assumed gammas of 2.2 and 2.8 respectively. ↩