Skip to content

Commit 3a75b36

Browse files
authored
ASWF open-source-days update (#98)
* Adding link to Nextgen white-paper. Signed-off-by: [email protected] <[email protected]> * The readme links were not working on the home page, so cut them out and added a link to the main encoding guidelines. Signed-off-by: [email protected] <[email protected]> * Updates adding in lossless encoding. Signed-off-by: [email protected] <[email protected]> --------- Signed-off-by: [email protected] <[email protected]> Co-authored-by: [email protected] <[email protected]>
1 parent 2821106 commit 3a75b36

File tree

5 files changed

+47
-39
lines changed

5 files changed

+47
-39
lines changed

README.md

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,17 @@
11
# ORI Video Encoding recommendations.
22

3+
The formatted documentation is at [https://academysoftwarefoundation.github.io/EncodingGuidelines/](https://academysoftwarefoundation.github.io/EncodingGuidelines/).
4+
35
This repository contains a variety of test suites to help pick encoding profiles suitable for VFX/Animation media reviews.
46
We are trying to develop best practices, so we will suggest a good starting point, but there isn't a right answer for all cases. We also try to explain what the encoding parameters do, and in what situations you might want to choose different parameters.
57
This is not the site for general encoding, although you may find answers here, we will likely opt for a simple one-size fits all solution over file-size efficiency.
68
We welcome suggestions and improvements.
79

810
This work is being done as part of the [ASWF Open Review Initiative](https://openreviewinitiative.org/). We are grateful for the ASWF for creating the collaborative cross company environment that allows such projects to exist.
911

10-
The main wiki page for this for now is [here](https://wiki.aswf.io/pages/viewpage.action?pageId=16031068)
12+
The main wiki page for this for now is [here](https://wiki.aswf.io/pages/viewpage.action?pageId=16031068).
13+
14+
15+
### Acknowledgements <a name="Acknowledgements"></a>
1116

12-
1. [Acknowledgements](#Acknowledgements)
13-
2. [Encoding Cheat Sheet](Quickstart.html)
14-
3. [Encoding Overview](Encoding.html#Encoding-Overview)
15-
4. [Color space conversion](ColorPreservation.html#Color-space-conversion)
16-
5. [Media Encoding with ffmpeg](ColorPreservation.html#encodestart)
17-
1. [Frame sequence specification](FfmpegInputs.html)
18-
2. [RGB to YCrCb Conversion](ColorPreservation.html#yuv)
19-
3. [TV vs. Full range.](ColorPreservation.html#tvfull)
20-
4. [RGB encode](RGBEncoding.html)
21-
5. [Useful Ffmpeg Filters.](OtherFfmpegArgs.html)
22-
6. [HDR Encoding](HDR_Encoding.html)
23-
7. [Adding Timecode and Editorial Workflow](EditorialWorkflow.html)
24-
6. [Codec Comparsions](Encoding.html#encode)
25-
1. [h264](Encodeh264.html)
26-
2. [Prores](EncodeProres.html)
27-
3. [AV1](EncodeAv1.html)
28-
4. [HEVC/H.265](EncodeHevc.html)
29-
5. [MJPEG](EncodeMJPEG.html)
30-
6. [VP8](EncodeVP8.html)
31-
6. [VP9](EncodeVP9.html)
32-
7. [DNxHD](EncodeDNXHD.html)
33-
7. [Metadata NCLC/NCLX](ColorPreservation.html#nclc)
34-
1. [Gamut - colorprimaries](ColorPreservation.html#gamut)
35-
2. [Color Range](ColorPreservation.html#range)
36-
8. [Web Review](ColorPreservation.html#webreview)
17+
This document is a result of feedback from many people, in particular I would like to thank Kevin Wheatley, Trevor Aylward, Mark Reid, Gates Roberg Clark, Rick Sayre, Wendy Heffner and J Schulte for their time and patience.  

enctests/bitDepth/BitDepthComparisons.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,19 @@ All the values are as expected.
7171

7272
### x265 HEVC
7373

74-
x265 HEVC is struggling with flat color with quite a few values not generating a uniform value.
74+
x265 HEVC is struggling with flat color with quite a few values not generating a uniform value, unless lossless is used.
7575

7676
### VP9
7777

7878
All the values are as expected.
7979

8080
### libsvtav1
8181

82-
Something rather odd going on here, the 10-bit encode is generating only 475 unique values rather than 1024. Looking at the values, it seems like there is some sort of rounding going on here.
82+
All the values are as expected.
8383

8484
### libaom-av1
8585

86-
Is slightly better, with 866 unique values, but many of them are off by one or more. At 12-bit the results are similar.
86+
Is slightly better, with 866 unique values, but many of them are off by one or more. At 12-bit the results are similar. Using lossless will maintain all values (as expected).
8787

8888

8989
Click [here](bitDepthResults.html) to see the full page table.

enctests/bitDepth/bitDepthResults.html

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,15 @@
1414
<TR><TD> h264-slower </TD><TD> 10 </TD><TD> 1024 / 1024 </TD><TD> [0-1023] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p10le -frames:v 1024 -vf geq=N:512:512 -c:v h264 -preset slower -crf 15 ./colors-h264-slower.mov </TD></TR>
1515
<TR><TD> hevc-slower-444-10 </TD><TD> 10 </TD><TD> 1024 / 1024 </TD><TD> [0-1000, 1002-1003, 1005-1023] </TD><TD> [1001, 1004] </TD><TD> </TD><TD> [1001, 1004] </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p10le -frames:v 1024 -vf geq=N:512:512 -c:v hevc -profile:v main444-10 -preset slower -crf 10 ./colors-hevc-slower-444-10.mov </TD></TR>
1616
<TR><TD> hevc-slower-444-12 </TD><TD> 12 </TD><TD> 4096 / 4096 </TD><TD> [0-4, 6, 8, 10 ... 4085, 4087, 4089, 4091-4095] </TD><TD> [5, 7, 9, 11 ... 4083-4084, 4086, 4088, 4090] </TD><TD> </TD><TD> [5, 7, 9, 11 ... 4083-4084, 4086, 4088, 4090] </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p12le -frames:v 4096 -vf geq=N:2048:2048 -c:v hevc -profile:v main444-12 -preset slower -crf 2 ./colors-hevc-slower-444-12.mov </TD></TR>
17+
<TR><TD> hevc-slower-444-12-lossless </TD><TD> 12 </TD><TD> 4096 / 4096 </TD><TD> [0-4095] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p12le -frames:v 4096 -vf geq=N:2048:2048 -c:v hevc -profile:v main444-12 -preset ultrafast -x265-params lossless=1 ./colors-hevc-slower-444-12-lossless.mov </TD></TR>
1718
<TR><TD> vp9-slower-444-10 </TD><TD> 10 </TD><TD> 1024 / 1024 </TD><TD> [0-1023] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p10le -frames:v 1024 -vf geq=N:512:512 -c:v libvpx-vp9 -quality good -crf 5 -b:v 0 ./colors-vp9-slower-444-10.mp4 </TD></TR>
1819
<TR><TD> vp9-slower-444-12 </TD><TD> 12 </TD><TD> 4096 / 4096 </TD><TD> [0-4095] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p12le -frames:v 4096 -vf geq=N:2048:2048 -c:v libvpx-vp9 -quality good -crf 5 -b:v 0 ./colors-vp9-slower-444-12.mp4 </TD></TR>
19-
<TR><TD> libsvtav1-420-8 </TD><TD> 8 </TD><TD> 256 / 256 </TD><TD> [0-255] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p -frames:v 256 -vf geq=N:128:128 -c:v libsvtav1 -preset 9 -crf 3 ./colors-libsvtav1-420-8.mp4 </TD></TR>
20-
<TR><TD> libsvtav1-420-10 </TD><TD> 10 </TD><TD> 475 / 1024 </TD><TD> [0, 4, 8, 12 ... 1016, 1018, 1020, 1022] </TD><TD> </TD><TD> </TD><TD> [1-3, 5-7, 9-11, 13-15 ... 1017, 1019, 1021, 1023] </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p10le -frames:v 1024 -vf geq=N:512:512 -c:v libsvtav1 -preset 9 -crf 3 ./colors-libsvtav1-420-10.mp4 </TD></TR>
21-
<TR><TD> libaom-444-10 </TD><TD> 10 </TD><TD> 866 / 1024 </TD><TD> [1-10, 12-14, 16-18, 20-22 ... 993, 997, 1001-1015, 1018-1023] </TD><TD> [0, 684-685] </TD><TD> [111, 115, 119, 123 ... 994, 996, 998-1000, 1016-1017] </TD><TD> [0, 11, 15, 19 ... 990-992, 994-996, 998-1000, 1016-1017] </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p10le -frames:v 1024 -vf geq=N:512:512 -c:v libaom-av1 -cpu-used 4 -usage good -crf 20 -row-mt 1 ./colors-libaom-444-10.mp4 </TD></TR>
22-
<TR><TD> libaom-444-12 </TD><TD> 12 </TD><TD> 3805 / 4096 </TD><TD> [4-32, 55-70, 72-79, 88-103 ... 4065-4072, 4087, 4091, 4095] </TD><TD> [0-3] </TD><TD> [33-48, 51-54, 80-87, 113-120 ... 4011-4014, 4040-4047, 4073-4080, 4083-4086] </TD><TD> [0-3, 33-54, 71, 80-87 ... 4064, 4073-4086, 4088-4090, 4092-4094] </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p12le -frames:v 4096 -vf geq=N:2048:2048 -c:v libaom-av1 -cpu-used 4 -usage good -crf 20 -row-mt 1 ./colors-libaom-444-12.mp4 </TD></TR>
20+
<TR><TD> libsvtav1-420-8 </TD><TD> 8 </TD><TD> 256 / 256 </TD><TD> [0-255] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p -frames:v 256 -vf geq=N:128:128 -c:v libsvtav1 -preset 5 -crf 3 ./colors-libsvtav1-420-8.mp4 </TD></TR>
21+
<TR><TD> libsvtav1-420-10 </TD><TD> 10 </TD><TD> 1024 / 1024 </TD><TD> [0-1023] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p10le -frames:v 1024 -vf geq=N:512:512 -c:v libsvtav1 -preset 3 -crf 2 ./colors-libsvtav1-420-10.mp4 </TD></TR>
22+
<TR><TD> libaom-444-10 </TD><TD> 10 </TD><TD> 894 / 1024 </TD><TD> [0-10, 12-14, 16-18, 20-22 ... 988-990, 992-994, 996-998, 1000-1023] </TD><TD> </TD><TD> [111, 115, 119, 123 ... 932, 936, 940, 999] </TD><TD> [11, 15, 19, 23 ... 987, 991, 995, 999] </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p10le -frames:v 1024 -vf geq=N:512:512 -c:v libaom-av1 -cpu-used 4 -usage good -crf 15 -row-mt 1 ./colors-libaom-444-10.mp4 </TD></TR>
23+
<TR><TD> libaom-444-12 </TD><TD> 12 </TD><TD> 3975 / 4096 </TD><TD> [32-47, 55-70, 88-120, 127-151 ... 4048-4080, 4087, 4090, 4093] </TD><TD> [0-31, 48-54, 71-79] </TD><TD> [80-87, 121-126, 152-159, 193-198 ... 3968-3975, 4009-4014, 4040-4047, 4081-4086] </TD><TD> [0-31, 48-54, 71-87, 121-126 ... 4081-4086, 4088-4089, 4091-4092, 4094-4095] </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p12le -frames:v 4096 -vf geq=N:2048:2048 -c:v libaom-av1 -cpu-used 4 -usage good -crf 15 -row-mt 1 ./colors-libaom-444-12.mp4 </TD></TR>
24+
<TR><TD> libaom-444-10-lossless </TD><TD> 10 </TD><TD> 1024 / 1024 </TD><TD> [0-1023] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p10le -frames:v 1024 -vf geq=N:512:512 -c:v libaom-av1 -aom-params: lossless=1 -cpu-used 4 -usage good -crf 20 -row-mt 1 ./colors-libaom-444-10-lossless.mp4 </TD></TR>
25+
<TR><TD> libaom-444-12-lossless </TD><TD> 12 </TD><TD> 4096 / 4096 </TD><TD> [0-4095] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv444p12le -frames:v 4096 -vf geq=N:2048:2048 -c:v libaom-av1 -aom-params: lossless=1 -cpu-used 4 -usage good -crf 20 -row-mt 1 ./colors-libaom-444-12-lossless.mp4 </TD></TR>
2326
<TR><TD> hevc_videotoolbox_8_main </TD><TD> 8 </TD><TD> 256 / 256 </TD><TD> [0-255] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=yuv420p -frames:v 256 -vf geq=N:128:128 -c:v hevc_videotoolbox -profile:v main -q:v 100 ./colors-hevc_videotoolbox_8_main.mov </TD></TR>
2427
<TR><TD> hevc_videotoolbox_10_main10 </TD><TD> 10 </TD><TD> 1024 / 1024 </TD><TD> [0-1023] </TD><TD> </TD><TD> </TD><TD> </TD><TD> ffmpeg -y -r 24 -f lavfi -i nullsrc=s=256x120,format=p010le -frames:v 1024 -vf geq=N:512:512 -c:v hevc_videotoolbox -profile:v main10 -q:v 100 ./colors-hevc_videotoolbox_10_main10.mov </TD></TR>
2528
</TABLE>

enctests/bitDepth/testBitDepth.py

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,12 @@ def seqToStr(array):
106106
'codec': 'hevc',
107107
'otherargs': ' -profile:v main444-12 -preset slower -crf 2 ', # 444
108108
'bits': 12
109+
} ,
110+
{'testname': 'hevc-slower-444-12-lossless',
111+
'pix_fmt': 'yuv444p12le',
112+
'codec': 'hevc',
113+
'otherargs': ' -profile:v main444-12 -preset ultrafast -x265-params lossless=1 ', # 444
114+
'bits': 12
109115
} ,
110116
{'testname': 'vp9-slower-444-10',
111117
'pix_fmt': 'yuv444p10le',
@@ -125,28 +131,42 @@ def seqToStr(array):
125131
'pix_fmt': 'yuv444p',
126132
'codec': 'libsvtav1',
127133
'ext': 'mp4',
128-
'otherargs': '-preset 9 -crf 3 ', # 444
134+
'otherargs': '-preset 5 -crf 3 ', # 444
129135
'bits': 8
130136
},
131137
{'testname': 'libsvtav1-420-10',
132138
'pix_fmt': 'yuv444p10le',
133139
'codec': 'libsvtav1',
134140
'ext': 'mp4',
135-
'otherargs': '-preset 9 -crf 3 ', # 444
141+
'otherargs': '-preset 3 -crf 2 ', # 444
136142
'bits': 10
137143
},
138-
{'testname': 'libaom-444-10',
144+
{'testname': 'libaom-444-10',
139145
'pix_fmt': 'yuv444p10le',
140146
'codec': 'libaom-av1',
141147
'ext': 'mp4',
142-
'otherargs': ' -cpu-used 4 -usage good -crf 20 -row-mt 1 ', # 444
148+
'otherargs': ' -cpu-used 4 -usage good -crf 15 -row-mt 1 ', # 444
143149
'bits': 10
144150
},
145151
{'testname': 'libaom-444-12',
146152
'pix_fmt': 'yuv444p12le',
147153
'codec': 'libaom-av1',
148154
'ext': 'mp4',
149-
'otherargs': ' -cpu-used 4 -usage good -crf 20 -row-mt 1 ', # 444
155+
'otherargs': ' -cpu-used 4 -usage good -crf 15 -row-mt 1 ', # 444
156+
'bits': 12
157+
},
158+
{'testname': 'libaom-444-10-lossless',
159+
'pix_fmt': 'yuv444p10le',
160+
'codec': 'libaom-av1',
161+
'ext': 'mp4',
162+
'otherargs': ' -aom-params: lossless=1 -cpu-used 4 -usage good -crf 20 -row-mt 1 ', # 444
163+
'bits': 10
164+
},
165+
{'testname': 'libaom-444-12-lossless',
166+
'pix_fmt': 'yuv444p12le',
167+
'codec': 'libaom-av1',
168+
'ext': 'mp4',
169+
'otherargs': '-aom-params: lossless=1 -cpu-used 4 -usage good -crf 20 -row-mt 1 ', # 444
150170
'bits': 12
151171
},
152172
{'testname': 'hevc_videotoolbox_8_main',
@@ -265,4 +285,4 @@ def seqToStr(array):
265285
#else:
266286
print(test['testname'], count, " unique values, valid values:", seqToStr(validvalues), " invalid values < 1:", seqToStr(nearlymissing), " missing by 1:", seqToStr(nearlymissing1), "other", seqToStr(missing))
267287
print("<TR><TD>", test['testname'], "</TD><TD>", test['bits'],"</TD><TD>", count, "/", test['frames'], "</TD><TD>", seqToStr(validvalues), "</TD><TD>", seqToStr(nearlymissing), "</TD><TD>", seqToStr(nearlymissing1), "</TD><TD>", seqToStr(missing), "</TD><TD>",cmd,"</TD></TR>", file=resultfile)
268-
print("</TABLE>", file=resultfile)
288+
print("</TABLE>", file=resultfile)

index.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ We welcome suggestions and improvements.
1313

1414
The main confluence page for this for now is [here](https://wiki.aswf.io/pages/viewpage.action?pageId=16031068)
1515

16+
{: .highlight }
17+
We would like to encourage the usage of [VP9](EncodeVP9.html) and [AV1](EncodeAv1.html) to encourage the usage of patent-free codecs, for more information on this see the white-paper [Next-gen codecs for VFX Community](https://docs.google.com/document/d/1EJ7Q_HhjL0ELNdjz5AgnPrraUvy7XCo52LL08WxgjtA/edit#heading=h.9rkn78tjmq48).
18+
19+
1620
## Why is this needed.
1721

1822
There are a lot of excellent guides out there. But few addressing the needs of the VFX community.

0 commit comments

Comments
 (0)