zweifingerjoe
9th October 2022, 19:35
Hello folks,
I have a source that is HDR10 HEVC:
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 1 h 56 min
Bit rate : 62.7 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.315
Stream size : 51.0 GiB (95%)
Writing library : ATEME Titan File 3.9.6 (4.9.6.2)
Language : English
Default : No
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level : 1246 cd/m2
Maximum Frame-Average Light Level : 159 cd/m2
Original source medium : Blu-ray
I wanna reenode that to AV1 using ffmpeg with the following Options (options are in yaml, I use a little converter to generate the command line):
post: {
sn:,
an:,
"c:v": libsvtav1,
pix_fmt: yuv420p10le,
preset: 4,
crf: 25,
svtav1-params: {
tune: 0,
film-grain: 10,
enable-hdr: 1,
color-primaries: bt2020,
transfer-characteristics: smpte2084,
matrix-coefficients: bt2020-ncl,
chroma-sample-position: 2,
mastering-display: "G(0.2649,0.6900)B(0.1500,0.0600)R(0.6800,0.3200)WP(0.3127,0.3290)L(4000.0,0.005)",
content-light: "1246,159"
}
}
Mediainfo shows the following for the encoded AV1 stream (bitrate is wrong as the encode didn't finish yet):
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : AV1
Format/Info : AOMedia Video 1
Format profile : Main@L5.0
Codec ID : V_AV1
Duration : 1 h 56 min
Bit rate : 62.7 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.315
Stream size : 51.0 GiB
Writing library : Lavc59.37.100 libsvtav1
Language : English
Default : No
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : R: x=0.891280 y=0.419440, G: x=0.347200 y=0.904400, B: x=0.196600 y=0.078640, White point: x=0.409860 y=0.431220
Mastering display luminance : min: 0.0082 cd/m2, max: 102.4000 cd/m2
Maximum Content Light Level : 1246 cd/m2
Maximum Frame-Average Light Level : 159 cd/m2
Original source medium : Blu-ray
As you can see Mastering display color primaries and Mastering display luminance have wrong values. Did I do something wrong there? I set the HDR metadata for SVT-AV1 like they say in the official manual: https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Parameters.md
I use ffmpeg 5.1.2 and svt-av1 1.1.0.
I have a source that is HDR10 HEVC:
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : HEVC
Format/Info : High Efficiency Video Coding
Format profile : Main 10@L5.1@High
HDR format : SMPTE ST 2086, HDR10 compatible
Codec ID : V_MPEGH/ISO/HEVC
Duration : 1 h 56 min
Bit rate : 62.7 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0 (Type 2)
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.315
Stream size : 51.0 GiB (95%)
Writing library : ATEME Titan File 3.9.6 (4.9.6.2)
Language : English
Default : No
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : Display P3
Mastering display luminance : min: 0.0050 cd/m2, max: 4000 cd/m2
Maximum Content Light Level : 1246 cd/m2
Maximum Frame-Average Light Level : 159 cd/m2
Original source medium : Blu-ray
I wanna reenode that to AV1 using ffmpeg with the following Options (options are in yaml, I use a little converter to generate the command line):
post: {
sn:,
an:,
"c:v": libsvtav1,
pix_fmt: yuv420p10le,
preset: 4,
crf: 25,
svtav1-params: {
tune: 0,
film-grain: 10,
enable-hdr: 1,
color-primaries: bt2020,
transfer-characteristics: smpte2084,
matrix-coefficients: bt2020-ncl,
chroma-sample-position: 2,
mastering-display: "G(0.2649,0.6900)B(0.1500,0.0600)R(0.6800,0.3200)WP(0.3127,0.3290)L(4000.0,0.005)",
content-light: "1246,159"
}
}
Mediainfo shows the following for the encoded AV1 stream (bitrate is wrong as the encode didn't finish yet):
Video
ID : 1
ID in the original source medium : 4113 (0x1011)
Format : AV1
Format/Info : AOMedia Video 1
Format profile : Main@L5.0
Codec ID : V_AV1
Duration : 1 h 56 min
Bit rate : 62.7 Mb/s
Width : 3 840 pixels
Height : 2 160 pixels
Display aspect ratio : 16:9
Frame rate mode : Constant
Frame rate : 23.976 (24000/1001) FPS
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 10 bits
Bits/(Pixel*Frame) : 0.315
Stream size : 51.0 GiB
Writing library : Lavc59.37.100 libsvtav1
Language : English
Default : No
Forced : No
Color range : Limited
Color primaries : BT.2020
Transfer characteristics : PQ
Matrix coefficients : BT.2020 non-constant
Mastering display color primaries : R: x=0.891280 y=0.419440, G: x=0.347200 y=0.904400, B: x=0.196600 y=0.078640, White point: x=0.409860 y=0.431220
Mastering display luminance : min: 0.0082 cd/m2, max: 102.4000 cd/m2
Maximum Content Light Level : 1246 cd/m2
Maximum Frame-Average Light Level : 159 cd/m2
Original source medium : Blu-ray
As you can see Mastering display color primaries and Mastering display luminance have wrong values. Did I do something wrong there? I set the HDR metadata for SVT-AV1 like they say in the official manual: https://gitlab.com/AOMediaCodec/SVT-AV1/-/blob/master/Docs/Parameters.md
I use ffmpeg 5.1.2 and svt-av1 1.1.0.