Skip to content

Commit

Permalink
ASWF open-source-days update (#98)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
richardssam and SamRichardsDisney authored Jul 29, 2024
1 parent 2821106 commit 3a75b36
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 39 deletions.
33 changes: 7 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,36 +1,17 @@
# ORI Video Encoding recommendations.

The formatted documentation is at [https://academysoftwarefoundation.github.io/EncodingGuidelines/](https://academysoftwarefoundation.github.io/EncodingGuidelines/).

This repository contains a variety of test suites to help pick encoding profiles suitable for VFX/Animation media reviews.
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.
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.
We welcome suggestions and improvements.

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.

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


### Acknowledgements <a name="Acknowledgements"></a>

1. [Acknowledgements](#Acknowledgements)
2. [Encoding Cheat Sheet](Quickstart.html)
3. [Encoding Overview](Encoding.html#Encoding-Overview)
4. [Color space conversion](ColorPreservation.html#Color-space-conversion)
5. [Media Encoding with ffmpeg](ColorPreservation.html#encodestart)
1. [Frame sequence specification](FfmpegInputs.html)
2. [RGB to YCrCb Conversion](ColorPreservation.html#yuv)
3. [TV vs. Full range.](ColorPreservation.html#tvfull)
4. [RGB encode](RGBEncoding.html)
5. [Useful Ffmpeg Filters.](OtherFfmpegArgs.html)
6. [HDR Encoding](HDR_Encoding.html)
7. [Adding Timecode and Editorial Workflow](EditorialWorkflow.html)
6. [Codec Comparsions](Encoding.html#encode)
1. [h264](Encodeh264.html)
2. [Prores](EncodeProres.html)
3. [AV1](EncodeAv1.html)
4. [HEVC/H.265](EncodeHevc.html)
5. [MJPEG](EncodeMJPEG.html)
6. [VP8](EncodeVP8.html)
6. [VP9](EncodeVP9.html)
7. [DNxHD](EncodeDNXHD.html)
7. [Metadata NCLC/NCLX](ColorPreservation.html#nclc)
1. [Gamut - colorprimaries](ColorPreservation.html#gamut)
2. [Color Range](ColorPreservation.html#range)
8. [Web Review](ColorPreservation.html#webreview)
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.  
6 changes: 3 additions & 3 deletions enctests/bitDepth/BitDepthComparisons.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,19 +71,19 @@ All the values are as expected.

### x265 HEVC

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

### VP9

All the values are as expected.

### libsvtav1

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.
All the values are as expected.

### libaom-av1

Is slightly better, with 866 unique values, but many of them are off by one or more. At 12-bit the results are similar.
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).


Click [here](bitDepthResults.html) to see the full page table.
Expand Down
11 changes: 7 additions & 4 deletions enctests/bitDepth/bitDepthResults.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,15 @@
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
<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>
</TABLE>
32 changes: 26 additions & 6 deletions enctests/bitDepth/testBitDepth.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,12 @@ def seqToStr(array):
'codec': 'hevc',
'otherargs': ' -profile:v main444-12 -preset slower -crf 2 ', # 444
'bits': 12
} ,
{'testname': 'hevc-slower-444-12-lossless',
'pix_fmt': 'yuv444p12le',
'codec': 'hevc',
'otherargs': ' -profile:v main444-12 -preset ultrafast -x265-params lossless=1 ', # 444
'bits': 12
} ,
{'testname': 'vp9-slower-444-10',
'pix_fmt': 'yuv444p10le',
Expand All @@ -125,28 +131,42 @@ def seqToStr(array):
'pix_fmt': 'yuv444p',
'codec': 'libsvtav1',
'ext': 'mp4',
'otherargs': '-preset 9 -crf 3 ', # 444
'otherargs': '-preset 5 -crf 3 ', # 444
'bits': 8
},
{'testname': 'libsvtav1-420-10',
'pix_fmt': 'yuv444p10le',
'codec': 'libsvtav1',
'ext': 'mp4',
'otherargs': '-preset 9 -crf 3 ', # 444
'otherargs': '-preset 3 -crf 2 ', # 444
'bits': 10
},
{'testname': 'libaom-444-10',
{'testname': 'libaom-444-10',
'pix_fmt': 'yuv444p10le',
'codec': 'libaom-av1',
'ext': 'mp4',
'otherargs': ' -cpu-used 4 -usage good -crf 20 -row-mt 1 ', # 444
'otherargs': ' -cpu-used 4 -usage good -crf 15 -row-mt 1 ', # 444
'bits': 10
},
{'testname': 'libaom-444-12',
'pix_fmt': 'yuv444p12le',
'codec': 'libaom-av1',
'ext': 'mp4',
'otherargs': ' -cpu-used 4 -usage good -crf 20 -row-mt 1 ', # 444
'otherargs': ' -cpu-used 4 -usage good -crf 15 -row-mt 1 ', # 444
'bits': 12
},
{'testname': 'libaom-444-10-lossless',
'pix_fmt': 'yuv444p10le',
'codec': 'libaom-av1',
'ext': 'mp4',
'otherargs': ' -aom-params: lossless=1 -cpu-used 4 -usage good -crf 20 -row-mt 1 ', # 444
'bits': 10
},
{'testname': 'libaom-444-12-lossless',
'pix_fmt': 'yuv444p12le',
'codec': 'libaom-av1',
'ext': 'mp4',
'otherargs': '-aom-params: lossless=1 -cpu-used 4 -usage good -crf 20 -row-mt 1 ', # 444
'bits': 12
},
{'testname': 'hevc_videotoolbox_8_main',
Expand Down Expand Up @@ -265,4 +285,4 @@ def seqToStr(array):
#else:
print(test['testname'], count, " unique values, valid values:", seqToStr(validvalues), " invalid values < 1:", seqToStr(nearlymissing), " missing by 1:", seqToStr(nearlymissing1), "other", seqToStr(missing))
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)
print("</TABLE>", file=resultfile)
print("</TABLE>", file=resultfile)
4 changes: 4 additions & 0 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ We welcome suggestions and improvements.

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

{: .highlight }
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).


## Why is this needed.

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

0 comments on commit 3a75b36

Please sign in to comment.