diff --git a/enctests/test_configs/base_tests.yml b/enctests/base_tests.yml similarity index 100% rename from enctests/test_configs/base_tests.yml rename to enctests/base_tests.yml diff --git a/enctests/runtest.sh b/enctests/runtest.sh index 0e15100..650dea5 100644 --- a/enctests/runtest.sh +++ b/enctests/runtest.sh @@ -1,54 +1,24 @@ -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/prores_tests.yml --output prores-results.otio --encoded-folder prores-encode -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/prores_qscale_tests.yml --output prores-qscale-results.otio --encoded-folder prores-qscale-encode - -python3 -m testframework.otio2html --test-config test_configs/prores_tests.yml --results prores-results.otio - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/codec_tests.yml --output codec-results.otio --encoded-folder codec-encode - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/h264_tests.yml --output h264-results.otio --encoded-folder h264-encode - -python3 -m testframework.otio2html --test-config test_configs/h264_tests.yml --results h264-results.otio - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/h264_crf_tests.yml --output h264-crf-results.otio --encoded-folder h264-crf-encode - -python3 -m testframework.otio2html --test-config test_configs/h264_crf_tests.yml --results h264-crf-results.otio - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/color_tests.yml --output color-results.otio --encoded-folder color-encode -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/hevc_color_tests.yml --output hevc-color-results.otio --encoded-folder hevc-color-encode - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/rgb_color_tests.yml --output rgb-color-results.otio --encoded-folder rgb-color-encode - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/rgb_tests.yml --output rgb-results.otio --encoded-folder rgb-encode - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/mjpeg_color_tests.yml --output mjpeg-color-results.otio --encoded-folder mjpeg-color-encode - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/av1_color_tests.yml --output av1-color-results.otio --encoded-folder av1-color-encode - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/vp9_color_tests.yml --output vp9-color-results.otio --encoded-folder vp9-color-encode -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/vp9_crf_tests.yml --output vp9-crf-results.otio --encoded-folder vp9-crf-encode - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/dnxhd_color_tests.yml --output dnxhd-color-results.otio --encoded-folder dnxhd-color-encode -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/dnxhd_tests.yml --output dnxhd-results.otio --encoded-folder dnxhd-encode - -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/hevc_tests.yml --output hevc-results.otio --encoded-folder hevc-encode -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/av1_crf_tests.yml --output av1-crf-results.otio --encoded-folder av1-crf-encode +python3 -m testframework.generatetests +python3 -m testframework.main +python3 -m testframework.main --test-config test_wedge_configs --results-folder wedge_results -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/hevc_crf_tests.yml --output hevc-crf-results.otio --encoded-folder hevc-crf-encode -python3 -m testframework.otio2html --test-config test_configs/hevc_crf_tests.yml --results hevc-crf-results.otio +# python3 -m testframework.otio2html --test-config test_configs/prores_tests.yml --results prores-results.otio -python3 -m testframework.main --source-folder sources/enc_sources --test-config test_configs/color_tests.yml --output color-results.otio --encoded-folder color-encode # Windows only with nvenc -python -m testframework.main --source-folder sources/enc_sources --test-config test_configs/hevc_nvenc_color_tests.yml --output hevc-nvenc-color-results.otio --encoded-folder hevc-color-encode -python -m testframework.main --source-folder sources/enc_sources --test-config test_configs/hevc_nvenc_tests.yml --output hevc-nvenc-results.otio --encoded-folder hevc-nvenc-encode -python -m testframework.otio2html --test-config test_configs/hevc_nvenc_tests.yml --results hevc-nvenc-results.otio +#python -m testframework.main --source-folder sources/enc_sources --test-config test_configs/hevc_nvenc_color_tests.yml --output hevc-nvenc-color-results.otio --encoded-folder hevc-color-encode +#python -m testframework.main --source-folder sources/enc_sources --test-config test_configs/hevc_nvenc_tests.yml --output hevc-nvenc-results.otio --encoded-folder hevc-nvenc-encode +#python -m testframework.otio2html --test-config test_configs/hevc_nvenc_tests.yml --results hevc-nvenc-results.otio # OSX Only tests -python -m testframework.main --source-folder sources/enc_sources --test-config test_configs/osx_prores_tests.yml --output osx-prores-results.otio --encoded-folder osx-prores-encode +#python -m testframework.main --source-folder sources/enc_sources --test-config test_configs/osx_prores_tests.yml --output osx-prores-results.otio --encoded-folder osx-prores-encode #WIP -python3 -m testframework.generatetests -python3 -m testframework.main --test-config test_configs/documentation_tests.yml --output doc-results.otio --encoded-folder docs-encode -python3 -m testframework.otio2html --test-config test_configs/documentation_tests.yml --results doc-results.otio +#python3 -m testframework.main --test-config test_configs/documentation_tests.yml --output doc-results.otio --encoded-folder docs-encode +#python3 -m testframework.otio2html --test-config test_configs/documentation_tests.yml --results doc-results.otio + +# Below will re-do all the tests in "test_wedge_configs" where the output data is in --results-folder +# python3 -m testframework.otio2html --test-config-dir test_wedge_configs --results-folder wedge_results + diff --git a/enctests/test_configs/aomav1_color_tests.yml b/enctests/test_configs/aomav1_color_tests.yml new file mode 100755 index 0000000..a3bea33 --- /dev/null +++ b/enctests/test_configs/aomav1_color_tests.yml @@ -0,0 +1,66 @@ + +--- +test_av1_color: + app: ffmpeg + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/chip-chart-1080-16bit-noicc-yuv420p10le.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + description: av1 color tests of different pix-fmts + encoding_template: ffmpeg -y {input_args} -i "{source}" {encoding_args} -y "{outfile}" + name: test_av1_color + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + suffix: .mp4 + wedges: + av1-yuv422p10le: &baseav1 + -c:v: libaom-av1 + -crf: 25 + -row-mt: 1 + -cpu-used: 6 + -vf: '"scale=in_color_matrix=bt709:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: bt709 + -pix_fmt: yuv422p10le + -strict: experimental + + av1-yuv422p10le-cpu5: + << : *baseav1 + -cpu-used: 5 + + av1-yuv422p10le-cpu6-pass1: + << : *baseav1 + -cpu-used: 5 + -aom-params: passes=1 + -pass: 1 + + av1-yuv422p10le-cpu5-g1: + << : *baseav1 + -g: 1 + + + svtav1-yuv422p10le: + -c:v: libsvtav1 + -crf: 18 + -row-mt: 1 + -preset: 9 + -vf: '"scale=in_color_matrix=bt709:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: bt709 + -pix_fmt: yuv420p10le + +--- +reports: + description: This is testing av1 color encoding (both libaom-av1 and libsvtav1) + directory: aom-av1-color-encode + name: aom-av1-color-tests + templatefile: colorweb.html.jinja + title: Ffmpeg AV1 encoding color tests diff --git a/enctests/test_configs/av1_color_tests.yml b/enctests/test_configs/av1_color_tests.yml index 86b6a92..c189b68 100755 --- a/enctests/test_configs/av1_color_tests.yml +++ b/enctests/test_configs/av1_color_tests.yml @@ -9,7 +9,7 @@ test_av1_color: tests: - assert: less value: max_error - less: 0.00195 + less: 0.004 description: av1 color tests of different pix-fmts encoding_template: ffmpeg -y {input_args} -i "{source}" {encoding_args} -y "{outfile}" name: test_av1_color diff --git a/enctests/test_configs/bitdepth_color_tests.yml b/enctests/test_configs/bitdepth_color_tests.yml new file mode 100644 index 0000000..68170a0 --- /dev/null +++ b/enctests/test_configs/bitdepth_color_tests.yml @@ -0,0 +1,80 @@ + + +test_bitdepth: + app: ffmpeg + comparisontest: + - extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -pred mixed -pix_fmt rgb48be -frames:v 1 {newpngfile} + testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + description: Bitdepth tests. + encoding_template: ffmpeg -y {input_args} -i "{source}" {encoding_args} + -y "{outfile}" + name: test_rgb + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + suffix: .mp4 + wedges: + h264: + -c:v: libx264 + -preset: placebo + -qp: 0 + -pix_fmt: yuv420p10le + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: bt709 + 10bit_h264: + -c:v: libx264 + -preset: placebo + -qp: 0 + -pix_fmt: yuv420p10le + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: bt709 + vp9_8bit: + -c:v: libvpx-vp9 + -quality: good + -crf: 0 + -pix_fmt: yuv420p + -colorspace: bt709 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: tv + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + vp9_10bit: + -c:v: libvpx-vp9 + -quality: good + -crf: 0 + -pix_fmt: yuv420p10le + -colorspace: bt709 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: tv + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + vp9_12bit: + -c:v: libvpx-vp9 + -quality: good + -crf: 0 + -pix_fmt: yuv420p12le + -colorspace: bt709 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + +--- +reports: + description: Testing colorbars at different bit-depths for h264 and vp9, showing the file size. + directory: bitdepth-color-encode + name: bitdepth-color-tests + templatefile: colorweb.html.jinja + title: Bit-depth color comparisons. Browser support. diff --git a/enctests/test_configs/documentation_tests.yml b/enctests/test_configs/documentation_tests.yml new file mode 100644 index 0000000..85842a8 --- /dev/null +++ b/enctests/test_configs/documentation_tests.yml @@ -0,0 +1,708 @@ +test_dnxhd_mov: + name: test_dnxhd_mov + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/smptehdbars_10_yuv422p10le.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -y {encoding_args} -y {outfile} ' + suffix: .mov + description: Test from ../EncodeDNXHD.md line 41 + app: ffmpeg + wedges: + wedge0: + -frames:v: '200' + -c:v: dnxhd + -pix_fmt: yuv422p10le + -profile:v: dnxhr_hqx + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: bt709 +--- +test_dnxhd_rgb: + name: test_dnxhd_rgb + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg -y {input_args} -i {source} -vframes {duration} {encoding_args} + -y {outfile} ' + suffix: .mov + description: Test from ../EncodeDNXHD.md line 79 + app: ffmpeg + wedges: + wedge0: + -c:v: dnxhd + -profile:v: dnxhr_444 + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: rgb + -pix_fmt: gbrp10le +--- +test_dnxhd_op1a_mxf: + name: test_dnxhd_op1a_mxf + sources: + - ../sourceimages/smptehdbars_8.png.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/smptehdbars_8_yuv422p.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg -y {input_args} -i {source} -vframes {duration} {encoding_args} + -y {outfile} ' + suffix: .mxf + description: Test from ../EncodeDNXHD.md line 110 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv422p + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -c:v: dnxhd + -profile:v: dnxhr_sq + -metadata: '"material_package_name=MY CLIP"' + -timecode: 01:00:20:00 + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: bt709 +--- +test_dnxhd_opatom_mxf: + name: test_dnxhd_opatom_mxf + sources: + - ../sourceimages/smptehdbars_8.png.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/smptehdbars_8_yuv422p.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg -y {input_args} -i {source} -vframes {duration} {encoding_args} + -y {outfile} ' + suffix: .mxf + description: Test from ../EncodeDNXHD.md line 140 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv422p + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -c:v: dnxhd + -profile:v: dnxhr_sq + -metadata: '"material_package_name=MY CLIP"' + -timecode: 01:00:20:00 + -f: mxf_opatom + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: bt709 +--- +test_dnxhd_profile: + name: test_dnxhd_profile + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/smptehdbars_10_yuv422p10le.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg -y {input_args} -i {source} -vframes {duration} {encoding_args} + -y {outfile} ' + suffix: .mov + description: Test from ../EncodeDNXHD.md line 176 + app: ffmpeg + wedges: + wedge0: + -vf: scale=in_color_matrix=bt709:out_color_matrix=bt709 + -pix_fmt: yuv422p10 + -c:v: dnxhd + -b:v: 175M + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: bt709 +--- +test_libsvtav1: + name: test_libsvtav1 + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/chip-chart-1080-16bit-noicc-yuv420p10le.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -y {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../EncodeAv1.md line 59 + app: ffmpeg + wedges: + wedge0: + -frames:v: '200' + -c:v: libsvtav1 + -pix_fmt: yuv420p10le + -crf: '18' + -preset: '9' + -svtav1-params: tune=0 + -sws_flags: lanczos + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 +--- +test_mjpeg: + name: test_mjpeg + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + comparisontest: + - testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mov + description: Test from ../EncodeMJPEG.md line 35 + app: ffmpeg + wedges: + wedge0: + -frames:v: '200' + -c:v: mjpeg + -qscale:v: '4' +--- +test_quickstart: + name: test_quickstart + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/chip-chart-1080-16bit-noicc-yuv420p.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../Quickstart.md line 29 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv420p + -vf: scale=in_color_matrix=bt709:out_color_matrix=bt709 + -frames:v: '100' + -c:v: libx264 + -preset: slower + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 + -movflags: faststart +--- +test_proresquickstart: + name: test_proresquickstart + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/smptehdbars_10_yuv422p10le.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -vframes {duration} {encoding_args} + -y {outfile} ' + suffix: .mov + description: Test from ../Quickstart.md line 84 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv422p10le + -c:v: prores_ks + -profile:v: '3' + -qscale:v: '9' + -vf: scale=in_color_matrix=bt709:out_color_matrix=bt709 +--- +test_prores444: + name: test_prores444 + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -vframes {duration} {encoding_args} + -y {outfile} ' + suffix: .mov + description: Test from ../Quickstart.md line 117 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv444p10le + -c:v: prores_ks + -profile:v: '4444' + -qscale:v: '9' + -vf: scale=in_color_matrix=bt709:out_color_matrix=bt709 +--- +test_fullrange: + name: test_fullrange + sources: + - ../sourceimages/radialgrad.png.yml + comparisontest: + - testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg -y {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../Quickstart.md line 160 + app: ffmpeg + wedges: + wedge0: + -loop: '1' + -pix_fmt: yuv420p + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=full:out_color_matrix=bt709 + -c:v: libx264 + -t: '5' + -qscale:v: '1' + -color_range: pc + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 +--- +test_vp9: + name: test_vp9 + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/chip-chart-1080-16bit-noicc-yuv420p10le.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -y {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../EncodeVP9.md line 49 + app: ffmpeg + wedges: + wedge0: + -frames:v: '200' + -c:v: libvpx-vp9 + -pix_fmt: yuv420p10le + -crf: '22' + -speed: '2' + -row-mt: '1' + -quality: good + -b:v: '0' + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 +--- +test_movgama: + name: test_movgama + sources: + - ../sourceimages/smptehdbars_8.png.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/smptehdbars_8_yuv420p.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mov + description: Test from ../WebColorPreservation.md line 108 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv420p + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -c:v: libx264 + -t: '5' + -qscale:v: '1' + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: unknown + -movflags: write_colr+write_gama + -mov_gamma: '2.4' +--- +test_h265: + name: test_h265 + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/chip-chart-1080-16bit-noicc-yuv420p10le.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -y {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../EncodeHevc.md line 50 + app: ffmpeg + wedges: + wedge0: + -frames:v: '200' + -c:v: libx265 + -pix_fmt: yuv420p10le + -crf: '22' + -preset: slow + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -color_range: '1' + -colorspace: '1' + -color_primaries: '1' + -color_trc: '2' + -movflags: faststart +--- +test_proresks: + name: test_proresks + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/smptehdbars_10_yuv422p10le.png + extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -pred mixed -pix_fmt + rgb48be -frames:v 1 -vf scale=in_color_matrix=bt709:out_color_matrix=bt709 + -sws_flags lanczos+accurate_rnd+full_chroma_int {newpngfile} + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -y {encoding_args} -y {outfile} ' + suffix: .mov + description: Test from ../EncodeProres.md line 40 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv422p10le + -vf: scale=in_color_matrix=bt709:out_color_matrix=bt709 + -frames:v: '100' + -c:v: prores_ks + -profile:v: '3' + -vendor: apl0 + '-qscale:v:': '10' + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 +--- +test_prores_videotoolbox: + name: test_prores_videotoolbox + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/smptehdbars_10_yuv422p10le.png + extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -pred mixed -pix_fmt + rgb48be -frames:v 1 -vf scale=in_color_matrix=bt709:out_color_matrix=bt709 + -sws_flags spline+accurate_rnd+full_chroma_int {newpngfile} + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -vframes {duration} {encoding_args} + -y {outfile} ' + suffix: .mov + description: Test from ../EncodeProres.md line 121 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv422p10le + -vf: scale=in_color_matrix=bt709:out_color_matrix=bt709 + -c:v: prores_videotoolbox + -profile:v: '3' + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: bt709 +--- +test_h264: + name: test_h264 + sources: + - ../sourceimages/chromatest_1080.png.yml + comparisontest: + - testtype: idiff + compare_image: ../sourceimages/chromatest_1080-yuv420p10le.png + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} -y {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../Encodeh264.md line 41 + app: ffmpeg + wedges: + wedge0: + -frames:v: '200' + -c:v: libx264 + -pix_fmt: yuv420p10le + -crf: '18' + -preset: slow + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -color_range: '1' + -colorspace: '1' + -color_primaries: '1' + -color_trc: '2' + -movflags: faststart +--- +test_colormatch_raw: + name: test_colormatch_raw + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + wedges: + rawcolor: + -c:v: libx264 + -pix_fmt: yuv444p10le + -preset: placebo + wedge0: + -pix_fmt: yuv444p10le + -vf: colormatrix=bt470bg:bt709 + -c:v: libx264 + -preset: placebo + -qp: '0' + -x264-params: keyint=15:no-deblock=1 + -qscale:v: '1' + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 + comparisontest: + - testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + between: 0.37125, 0.37126 + encoding_template: 'ffmpeg -y {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../ColorPreservation.md line 50 + app: ffmpeg +--- +test_colormatch_colorspace: + name: test_colormatch_colorspace + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + comparisontest: + - testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg -y {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../ColorPreservation.md line 77 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv444p10le + -vf: colorspace=bt709:iall=bt601-6-625:fast=1 + -c:v: libx264 + -preset: placebo + -qp: '0' + -x264-params: keyint=15:no-deblock=1 + -qscale:v: '1' + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 +--- +test_colormatch_libswscale: + name: test_colormatch_libswscale + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + comparisontest: + - testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg -y {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mp4 + description: Test from ../ColorPreservation.md line 107 + app: ffmpeg + wedges: + wedge0: + -pix_fmt: yuv444p10le + -vf: scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709 + -c:v: libx264 + -preset: placebo + -qp: '0' + -x264-params: keyint=15:no-deblock=1 + -qscale:v: '1' + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 +--- +test_pq2000: + name: test_pq2000 + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -sws_flags lanczos+accurate_rnd+full_chroma_inp+full_chroma_int + -pred mixed -pix_fmt rgb48be -vf scale=in_color_matrix=bt2020:out_color_matrix=bt2020 -frames:v + 1 {newpngfile} + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mov + description: Test from ../enctests/HDR_Encoding.md line 68 + app: ffmpeg + wedges: + wedge0: + -c:v: libx265 + -vf: scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020 + -tag:v: hvc1 + -color_range: tv + -color_trc: smpte2084 + -color_primaries: bt2020 + -colorspace: bt2020nc + -pix_fmt: yuv444p10le + -x265-params: colorprim=bt2020:transfer=smpte2084:colormatrix=bt2020nc:range=limited:master-display=G\(13250,34500\)B\(7500,3000\)R\(34000,16000\)WP\(15635,16450\)L\(10000000,1\):max-cll=2000,400 +--- +test_hlg: + name: test_hlg + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -sws_flags lanczos+accurate_rnd+full_chroma_inp+full_chroma_int + -pred mixed -pix_fmt rgb48be -vf scale=in_color_matrix=bt2020:out_color_matrix=bt2020 -frames:v + 1 {newpngfile} + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mov + description: Test from ../enctests/HDR_Encoding.md line 149 + app: ffmpeg + wedges: + wedge0: + -c:v: libx265 + -tag:v: hvc1 + -vf: scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020 + -color_range: tv + -color_trc: arib-std-b67 + -color_primaries: bt2020 + -colorspace: bt2020nc + -pix_fmt: yuv444p10le + -x265-params: colorprim=bt2020:transfer=arib-std-b67:colormatrix=bt2020nc:range=limited:master-display=G\(13250,34500\)B\(7500,3000\)R\(34000,16000\)WP\(15635,16450\)L\(10000000,1\):max-cll=1000,400 +--- +test_hlg420: + name: test_hlg420 + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -sws_flags lanczos+accurate_rnd+full_chroma_inp+full_chroma_int + -pred mixed -pix_fmt rgb48be -vf scale=in_color_matrix=bt2020:out_color_matrix=bt2020 -frames:v + 1 {newpngfile} + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mov + description: Test from ../enctests/HDR_Encoding.md line 204 + app: ffmpeg + wedges: + wedge0: + -c:v: libx265 + -tag:v: hvc1 + -vf: scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020 + -color_range: tv + -color_trc: arib-std-b67 + -color_primaries: bt2020 + -colorspace: bt2020nc + -pix_fmt: yuv420p10le + -x265-params: colorprim=bt2020:transfer=arib-std-b67:colormatrix=bt2020nc:range=limited:master-display=G\(13250,34500\)B\(7500,3000\)R\(34000,16000\)WP\(15635,16450\)L\(10000000,1\):max-cll=1000,400 +--- +test_hlg422: + name: test_hlg422 + sources: + - ../sourceimages/smptehdbars_10.dpx.yml + comparisontest: + - testtype: idiff + extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -sws_flags lanczos+accurate_rnd+full_chroma_inp+full_chroma_int + -pred mixed -pix_fmt rgb48be -vf scale=in_color_matrix=bt2020:out_color_matrix=bt2020 -frames:v + 1 {newpngfile} + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + encoding_template: 'ffmpeg {input_args} -i {source} {encoding_args} -y {outfile} ' + suffix: .mov + description: Test from ../enctests/HDR_Encoding.md line 231 + app: ffmpeg + wedges: + wedge0: + -c:v: libx265 + -color_range: tv + -color_trc: arib-std-b67 + -color_primaries: bt2020 + -colorspace: bt2020nc + -pix_fmt: yuv420p10le + -tag:v: hvc1 + -vf: scale=in_range=full:in_color_matrix=bt2020:out_range=tv:out_color_matrix=bt2020 + -x265-params: colorprim=bt2020:transfer=arib-std-b67:colormatrix=bt2020nc:range=limited:master-display=G\(13250,34500\)B\(7500,3000\)R\(34000,16000\)WP\(15635,16450\)L\(10000000,1\):max-cll=1000,400 +--- +reports: + name: doc-tests + title: Ffmpeg encoding guide documentation tests + description: This is testing commands that are in the documentation as a way to + confirm that all the commands in the documentation produce the desired results. + directory: docs-encode + templatefile: doctests.html.jinja diff --git a/enctests/test_configs/rgb_color_tests.yml b/enctests/test_configs/rgb_color_tests.yml new file mode 100644 index 0000000..b7aafa4 --- /dev/null +++ b/enctests/test_configs/rgb_color_tests.yml @@ -0,0 +1,170 @@ + + +test_rgb: + app: ffmpeg + comparisontest: + - extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -pred mixed -pix_fmt rgb48be -frames:v 1 {newpngfile} + testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + description: Uncompressed tests. + encoding_template: ffmpeg -y {input_args} -i "{source}" {encoding_args} + -y "{outfile}" + name: test_rgb + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + - ../sourceimages/smptehdbars_16.png.yml + suffix: .mp4 + wedges: + 10bit_h264: + -c:v: libx264 + -preset: placebo + -qp: 0 + -pix_fmt: yuv444p10le + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: bt709 + 16bit_png: + -c:v: png + -pix_fmt: rgb48be + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -color_range: pc + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + vp9_10bit_rgb: + -c:v: libvpx-vp9 + -quality: good + -crf: 0 + -speed: 2 + -row-mt: 1 + -pix_fmt: gbrp10le + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -color_range: pc + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + vp9_12bit_rgb: + -c:v: libvpx-vp9 + -quality: good + -crf: 0 + -speed: 2 + -row-mt: 1 + -pix_fmt: gbrp12le + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -color_range: pc + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + +test_rgb8: + app: ffmpeg + comparisontest: + - extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -pred mixed -pix_fmt rgb24 -frames:v 1 {newpngfile} + testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + description: Uncompressed tests. + encoding_template: ffmpeg -y {input_args} -i "{source}" {encoding_args} + -y "{outfile}" + name: test_rgb8 + sources: + - ../sourceimages/chip-chart-1080-noicc.png.yml + suffix: .mp4 + wedges: + 8bit_h264: + -c:v: libx264 + -pix_fmt: yuv444p + -preset: placebo + -qp: 0 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: bt709 + 8bit_libx264rgb: + -c:v: libx264rgb + -pix_fmt: rgb24 + -preset: placebo + -qp: 0 + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -x264-params: "keyint=15:no-deblock=1" + -color_range: pc + -color_primaries: bt709 + -color_trc: bt709 + 8bit_png: + -c:v: png + -pix_fmt: rgb24 + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -color_range: pc + -color_primaries: bt709 + -color_trc: bt709 + 8bit_mjpeg: + -c:v: mjpeg + -pix_fmt: rgb24 + -colorspace: rgb + -q:v: 2 + -vf: '"scale=in_range=full:out_range=full"' + -color_range: pc + -color_primaries: bt709 + -color_trc: bt709 + vp9_8bit_rgb: + -c:v: libvpx-vp9 + -quality: good + -crf: 0 + -pix_fmt: gbrp + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -color_range: pc + -color_primaries: bt709 + -color_trc: bt709 + +test_rgb_mov: + app: ffmpeg + comparisontest: + - extracttemplate: ffmpeg -y -i {newfile} -compression_level 10 -pred mixed -pix_fmt rgb48be -frames:v 1 -vf scale=in_color_matrix=bt709:out_color_matrix=bt709 {newpngfile} + testtype: idiff + - testtype: assertresults + tests: + - assert: less + value: max_error + less: 0.00195 + description: Uncompressed tests. + encoding_template: ffmpeg -y {input_args} -i "{source}" {encoding_args} + -y "{outfile}" + name: test_rgb + sources: + - ../sourceimages/chip-chart-1080-16bit-noicc.png.yml + - ../sourceimages/chip-chart-1080-noicc.png.yml + - ../sourceimages/smptehdbars_16.png.yml + suffix: .mov + wedges: + 10bit_dnxhd: &base_args2 + -c:v: dnxhd + -pix_fmt: gbrp10le + -vf: '"scale=in_color_matrix=bt709:out_color_matrix=bt709"' + -profile:v: dnxhr_444 + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: rgb +--- +reports: + description: Testing different codecs encoding directly to RGB rather than YCrCb. What we see is good color accuracy at the expense of file compression. + directory: rgb-color-encode + name: rgb-color-tests + templatefile: colorweb.html.jinja + title: Ffmpeg RGB encoding color tests. diff --git a/enctests/test_wedge_configs/aomav1_crf_tests.yml b/enctests/test_wedge_configs/aomav1_crf_tests.yml new file mode 100644 index 0000000..5a32e04 --- /dev/null +++ b/enctests/test_wedge_configs/aomav1_crf_tests.yml @@ -0,0 +1,245 @@ +test_aom: + name: test_crf + description: variations of colorspace yuv420p + app: ffmpeg + suffix: .mp4 + encoding_template: 'ffmpeg {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + #- sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + #- sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + #- sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + cpu3_crf_16: &base_args + -c:v: libaom-av1 + -crf: 16 + -cpu-used: 3 + -row-mt: 1 + -pix_fmt: yuv422p10le + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: 1 + -colorspace: 1 + -color_primaries: 1 + -color_trc: 2 + + # cpu3_crf_18: + # << : *base_args + # -crf: 18 + + cpu3_crf_20: + << : *base_args + -crf: 20 + + # cpu3_crf_22: + # << : *base_args + # -crf: 22 + + cpu3_crf_25: + << : *base_args + -crf: 25 + + cpu3_crf_30: + << : *base_args + -crf: 30 + + cpu5_crf_16: + << : *base_args + -crf: 16 + -cpu-used: 5 + + # cpu5_crf_18: + # << : *base_args + # -crf: 18 + # -cpu-used: 5 + + cpu5_crf_20: + << : *base_args + -crf: 20 + -cpu-used: 5 + + # cpu5_crf_22: + # << : *base_args + # -crf: 22 + # -cpu-used: 5 + + cpu5_crf_25: + << : *base_args + -crf: 25 + -cpu-used: 5 + + cpu5_crf_30: + << : *base_args + -crf: 30 + -cpu-used: 5 + + cpu6_crf_16: + << : *base_args + -crf: 16 + -cpu-used: 6 + + # cpu6_crf_18: + # << : *base_args + # -crf: 18 + # -cpu-used: 6 + + cpu6_crf_20: + << : *base_args + -crf: 20 + -cpu-used: 6 + + # cpu6_crf_22: + # << : *base_args + # -crf: 22 + # -cpu-used: 6 + + cpu6_crf_25: + << : *base_args + -crf: 25 + -cpu-used: 6 + + cpu6_crf_30: + << : *base_args + -crf: 30 + -cpu-used: 6 + + cpu4_crf_16: + << : *base_args + -crf: 16 + -cpu-used: 4 + + # cpu4_crf_18: + # << : *base_args + # -crf: 18 + # -cpu-used: 4 + + cpu4_crf_20: + << : *base_args + -crf: 20 + -cpu-used: 4 + + # cpu4_crf_22: + # << : *base_args + # -crf: 22 + # -cpu-used: 4 + + cpu4_crf_25: + << : *base_args + -crf: 25 + -cpu-used: 4 + + cpu4_crf_30: + << : *base_args + -crf: 30 + -cpu-used: 4 + + cpu2_crf_16: + << : *base_args + -crf: 16 + -cpu-used: 2 + + # cpu2_crf_18: + # << : *base_args + # -crf: 18 + # -cpu-used: 2 + + cpu2_crf_20: + << : *base_args + -crf: 20 + -cpu-used: 2 + + # cpu2_crf_22: + # << : *base_args + # -crf: 22 + # -cpu-used: 2 + + cpu2_crf_25: + << : *base_args + -crf: 25 + -cpu-used: 2 + + cpu2_crf_30: + << : *base_args + -crf: 30 + -cpu-used: 2 + + cpu1_crf_16: + << : *base_args + -crf: 16 + -cpu-used: 1 + + # cpu1_crf_18: + # << : *base_args + # -crf: 18 + # -cpu-used: 1 + + cpu1_crf_20: + << : *base_args + -crf: 20 + -cpu-used: 1 + + # cpu1_crf_22: + # << : *base_args + # -crf: 22 + # -cpu-used: 1 + + cpu1_crf_25: + << : *base_args + -crf: 25 + -cpu-used: 1 + + cpu1_crf_30: + << : *base_args + -crf: 30 + -cpu-used: 1 +--- + +reports: + graphs: + - args: + color: -cpu-used + height: 400 + x: -crf + y: psnr_y_harmonic_mean + markers: True + name: psnr_y_harmonic_mean.png + sortby: -crf + - args: + color: -cpu-used + height: 400 + x: -crf + y: vmaf_harmonic_mean + markers: True + name: vmaf_harmonic_mean.png + sortby: -crf + - args: + color: -cpu-used + height: 400 + x: -crf + y: encode_time + range_y: [0, 500] + markers: True + name: encode_time_zoom.png + sortby: -crf + - args: + color: -cpu-used + height: 400 + x: -crf + y: encode_time + markers: True + name: encode_time.png + sortby: -crf + - args: + color: -cpu-used + height: 400 + x: -crf + y: filesize + markers: True + name: filesize.png + sortby: -crf + name: aomav1-crf-test + title: Libaom AV1 CRF vs. cpu-used Comparison + description: This is a comparison of different CRF values against cpu-used for the libaom av1 encoder. The -cpu-used flag defaults to 1, which gives a very slow but efficient encode. We are finding values of at least 4 still give an excellent quality, but quite a bit faster (although still significantly slower than other encoders. Values of 5 may also be worth considering. In this case we are encoding to 422. If you are ok with 420, do use svt-av1, which is significantly faster. + directory: aomav1-crf-encode + templatefile: basicmovie.html.jinja + diff --git a/enctests/test_wedge_configs/aomav1_tests.yml b/enctests/test_wedge_configs/aomav1_tests.yml new file mode 100644 index 0000000..5ec4caa --- /dev/null +++ b/enctests/test_wedge_configs/aomav1_tests.yml @@ -0,0 +1,102 @@ +test_aom: + name: test_crf + description: variations of colorspace yuv420p + app: ffmpeg + suffix: .mp4 + encoding_template: 'ffmpeg {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + crf27_422: &base_args + -c:v: libaom-av1 + -crf: 27 + -cpu-used: 6 + -row-mt: 1 + -pix_fmt: yuv422p10le + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: 1 + -colorspace: 1 + -color_primaries: 1 + -color_trc: 2 + + # cpu4_crf_18: + # << : *base_args + # -crf: 18 + + crf27_420: + << : *base_args + -pix_fmt: yuv420p10le + + crf27_444: + << : *base_args + -pix_fmt: yuv444p10le + + crf27_444_12bit: + << : *base_args + -pix_fmt: yuv444p12le + + crf27_rgb: + << : *base_args + -pix_fmt: gbrp10le + -colorspace: rgb + -color_range: pc + + crf27_444_allintra: + << : *base_args + -usage: allintra + -pix_fmt: yuv444p10le + + crf27_444_g1: + << : *base_args + -g: 1 + -pix_fmt: yuv444p10le + +--- + +reports: + graphs: + - args: + color: wedge + height: 400 + barmode: group + x: media + y: psnr_y_harmonic_mean + name: psnr_y_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + barmode: group + x: media + y: vmaf_harmonic_mean + range_y: + - 90 + - 100 + name: vmaf_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: encode_time + name: encode_time.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: filesize + name: filesize.png + type: bar + name: av1-crf-test + title: AV1 Comparison + description: This is a comparison of different libaom-av1 pix_fmt's at the same CRM (27). + directory: av1-encode + templatefile: basicmovie.html.jinja + diff --git a/enctests/test_configs/av1_crf_tests.yml b/enctests/test_wedge_configs/av1_crf_tests.yml similarity index 98% rename from enctests/test_configs/av1_crf_tests.yml rename to enctests/test_wedge_configs/av1_crf_tests.yml index 5e8e64c..35eccb4 100644 --- a/enctests/test_configs/av1_crf_tests.yml +++ b/enctests/test_wedge_configs/av1_crf_tests.yml @@ -93,7 +93,7 @@ reports: sortby: name name: av1-crf-test title: AV1 CRF Comparison - description: This is a comparison of different CRF values for av1 encoding. + description: This is a comparison of different CRF values for libsvtav1 (av1) encoding. directory: av1-crf-encode templatefile: basicmovie.html.jinja diff --git a/enctests/test_wedge_configs/bitdepth_tests.yml b/enctests/test_wedge_configs/bitdepth_tests.yml new file mode 100644 index 0000000..c441950 --- /dev/null +++ b/enctests/test_wedge_configs/bitdepth_tests.yml @@ -0,0 +1,155 @@ +test_bitdepth: + app: ffmpeg + description: Uncompressed tests. + encoding_template: ffmpeg -y {input_args} -i "{source}" {encoding_args} + -y "{outfile}" + name: test_bitdepth + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + suffix: .mp4 + wedges: + libx264_8bit: + -c:v: libx264 + -preset: slow + -crf: 18 + -pix_fmt: yuv420p + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: iec61966-2-1 + -colorspace: bt709 + libx264_10bit: + -c:v: libx264 + -preset: slow + -crf: 18 + -pix_fmt: yuv420p10le + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: iec61966-2-1 + -colorspace: bt709 + vp9_8bit_crf22: + -c:v: libvpx-vp9 + -quality: good + -crf: 22 + -speed: 2 + -row-mt: 1 + -pix_fmt: yuv420p + -colorspace: bt709 + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: tv + -color_primaries: bt709 + -color_range: tv + -color_trc: iec61966-2-1 + vp9_8bit_crf22_yuv444: + -c:v: libvpx-vp9 + -quality: good + -crf: 22 + -b:v: 0 + -speed: 2 + -row-mt: 1 + -pix_fmt: yuv444p + -colorspace: bt709 + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: tv + -color_primaries: bt709 + -color_range: tv + -color_trc: iec61966-2-1 + vp9_10bit: + -c:v: libvpx-vp9 + -quality: good + -crf: 20 + -speed: 2 + -row-mt: 1 + -pix_fmt: yuv420p10le + -colorspace: bt709 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: tv + -color_primaries: bt709 + -color_range: tv + -color_trc: iec61966-2-1 + vp9_12bit: + -c:v: libvpx-vp9 + -quality: good + -crf: 20 + -speed: 2 + -row-mt: 1 + -pix_fmt: yuv420p12le + -colorspace: bt709 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: iec61966-2-1 + libsvtav1_10bit_yuv420: + -crf: 18 + -c:v: libsvtav1 + -preset: slow + -svtav1-params: tune=0 + -preset: 9 + -speed: 2 + -pix_fmt: yuv420p12le + -colorspace: bt709 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: iec61966-2-1 + libaom-av1_10bit_yuv444: + -crf: 27 + -c:v: libaom-av1 + -cpu-used: 6 + -row-mt: 1 + -pix_fmt: yuv444p10le + -colorspace: bt709 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: iec61966-2-1 + +--- +reports: + graphs: + - args: + color: wedge + height: 400 + barmode: group + x: media + y: psnr_y_harmonic_mean + name: psnr_y_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + barmode: group + x: media + y: vmaf_harmonic_mean + range_y: + - 90 + - 100 + name: vmaf_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: encode_time + name: encode_time.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: filesize + name: filesize.png + type: bar + description: Testing clips at different bit-depths for h264 and vp9, and av1, what this is showing is that you can go to higher bitdepths or even switch from 420 to 444 with minimal increase in file size. + directory: bitdepth-encode + name: bitdepth-tests + templatefile: basicmovie.html.jinja + title: Bit-depth comparisons. Browser support. diff --git a/enctests/test_configs/codec_tests.yml b/enctests/test_wedge_configs/codec_tests.yml similarity index 98% rename from enctests/test_configs/codec_tests.yml rename to enctests/test_wedge_configs/codec_tests.yml index 5433a13..994eef0 100644 --- a/enctests/test_configs/codec_tests.yml +++ b/enctests/test_wedge_configs/codec_tests.yml @@ -112,7 +112,7 @@ test_mov: reports: graphs: - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -120,7 +120,7 @@ reports: name: psnr_y_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -131,7 +131,7 @@ reports: name: vmaf_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group @@ -139,7 +139,7 @@ reports: name: encode_time.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group diff --git a/enctests/test_configs/dnxhd_tests.yml b/enctests/test_wedge_configs/dnxhd_tests.yml similarity index 94% rename from enctests/test_configs/dnxhd_tests.yml rename to enctests/test_wedge_configs/dnxhd_tests.yml index 0905a7a..219d843 100644 --- a/enctests/test_configs/dnxhd_tests.yml +++ b/enctests/test_wedge_configs/dnxhd_tests.yml @@ -77,7 +77,7 @@ test_dnxhr: reports: graphs: - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -85,7 +85,7 @@ reports: name: psnr_y_harmonic_mean.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 barmode: group @@ -94,7 +94,7 @@ reports: name: vmaf_harmonic_mean.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 x: media @@ -103,7 +103,7 @@ reports: name: encode_time.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 x: media @@ -113,7 +113,7 @@ reports: type: bar name: dnxhd-tests title: DNxHR Config Comparison - description: This is a comparison of different config values for DNxHD encoding. + description: This is a comparison of different profile and bit-rate values for DNxHD encoding. directory: dnxhd-encode templatefile: basicmovie.html.jinja diff --git a/enctests/test_configs/h264_bitdepth_tests.yml b/enctests/test_wedge_configs/h264_bitdepth_tests.yml similarity index 100% rename from enctests/test_configs/h264_bitdepth_tests.yml rename to enctests/test_wedge_configs/h264_bitdepth_tests.yml diff --git a/enctests/test_configs/h264_crf_tests.yml b/enctests/test_wedge_configs/h264_crf_tests.yml similarity index 100% rename from enctests/test_configs/h264_crf_tests.yml rename to enctests/test_wedge_configs/h264_crf_tests.yml diff --git a/enctests/test_configs/h264_tests.yml b/enctests/test_wedge_configs/h264_tests.yml similarity index 100% rename from enctests/test_configs/h264_tests.yml rename to enctests/test_wedge_configs/h264_tests.yml diff --git a/enctests/test_configs/hevc_crf_tests.yml b/enctests/test_wedge_configs/hevc_crf_tests.yml similarity index 100% rename from enctests/test_configs/hevc_crf_tests.yml rename to enctests/test_wedge_configs/hevc_crf_tests.yml diff --git a/enctests/test_configs/hevc_crfmedium_tests.yml b/enctests/test_wedge_configs/hevc_crfmedium_tests.yml similarity index 100% rename from enctests/test_configs/hevc_crfmedium_tests.yml rename to enctests/test_wedge_configs/hevc_crfmedium_tests.yml diff --git a/enctests/test_wedge_configs/hevc_g_tests.yml b/enctests/test_wedge_configs/hevc_g_tests.yml new file mode 100644 index 0000000..7be41a4 --- /dev/null +++ b/enctests/test_wedge_configs/hevc_g_tests.yml @@ -0,0 +1,99 @@ +test_g_yuv420p: + name: test_g + description: variations of colorspace yuv420p + app: ffmpeg + suffix: .mp4 + encoding_template: 'ffmpeg {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + medium_01: &base_args + -c:v: libx265 + -crf: 20 + -g: 1 + -preset: medium + -pix_fmt: yuv420p10le + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: 1 + -colorspace: 1 + -color_primaries: 1 + -color_trc: 2 + + medium_02: + << : *base_args + -g: 2 + + medium_03: + << : *base_args + -g: 3 + + medium_04: + << : *base_args + -g: 4 + + medium_05: + << : *base_args + -g: 5 + + medium_10: + << : *base_args + -g: 10 + + medium_20: + << : *base_args + -g: 20 + + medium_30: + << : *base_args + -g: 30 + + medium_50: + << : *base_args + -g: 50 + +--- + +reports: + graphs: + - args: + color: media + height: 400 + x: -g + y: psnr_y_harmonic_mean + markers: True + name: psnr_y_harmonic_mean.png + sortby: name + - args: + color: media + height: 400 + x: -g + y: vmaf_harmonic_mean + markers: True + name: vmaf_harmonic_mean.png + sortby: name + - args: + color: media + height: 400 + x: -g + y: encode_time + markers: True + name: encode_time.png + sortby: name + - args: + color: media + height: 400 + x: -g + y: filesize + markers: True + name: filesize.png + sortby: name + name: hevc-g-tests + title: HEVC g Comparison + description: This is a comparison of different GOP values for hevc encoding. + directory: hevc-g-encode + templatefile: basicmovie.html.jinja + diff --git a/enctests/test_configs/hevc_tests.yml b/enctests/test_wedge_configs/hevc_tests.yml similarity index 100% rename from enctests/test_configs/hevc_tests.yml rename to enctests/test_wedge_configs/hevc_tests.yml diff --git a/enctests/test_wedge_configs/j2k_qscale_tests.yml b/enctests/test_wedge_configs/j2k_qscale_tests.yml new file mode 100644 index 0000000..7f18cc7 --- /dev/null +++ b/enctests/test_wedge_configs/j2k_qscale_tests.yml @@ -0,0 +1,85 @@ +test_j2k: + name: test_j2k_quality + description: variations of j2k_quality + app: ffmpeg + suffix: .mov + encoding_template: '{ffmpeg_bin} {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + #- sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + #- sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + wedges: + qscale_04: &base_args + -c:v: libopenjpeg + -compression_level: 4 + -threads: 8 + -pix_fmt: rgb48le + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 + + qscale_06: + << : *base_args + -compression_level: 6 + + qscale_08: + << : *base_args + -compression_level: 8 + + qscale_10: + << : *base_args + -compression_level: 10 + + qscale_12: + << : *base_args + -compression_level: 12 + + qscale_16: + << : *base_args + -compression_level: 16 + + qscale_20: + << : *base_args + -compression_level: 20 + +--- + +reports: + graphs: + - args: + color: media + height: 400 + x: -compression_level + y: psnr_y_harmonic_mean + markers: True + name: psnr_y_harmonic_mean.png + sortby: name + - args: + color: media + height: 400 + x: -compression_level + y: vmaf_harmonic_mean + markers: True + name: vmaf_harmonic_mean.png + sortby: name + - args: + color: media + height: 400 + x: -compression_level + y: encode_time + markers: True + name: encode_time.png + sortby: name + - args: + color: media + height: 400 + x: -compression_level + y: filesize + markers: True + name: filesize.png + sortby: name + name: j2k-qscale-tests + title: openjpeg quality comparison. + description: This is a comparison of different quality settings for the openjpeg encoder. + directory: j2k-qscale-encode + templatefile: basicmovie.html.jinja diff --git a/enctests/test_wedge_configs/j2k_tests.yml b/enctests/test_wedge_configs/j2k_tests.yml new file mode 100644 index 0000000..0b98043 --- /dev/null +++ b/enctests/test_wedge_configs/j2k_tests.yml @@ -0,0 +1,83 @@ +test_j2k: + name: test_j2k + description: variations of j2k_quality + app: ffmpeg + suffix: .mov + encoding_template: '{ffmpeg_bin} {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + rgb48le: &base_args + -c:v: libopenjpeg + -compression_level: 10 + -pix_fmt: gbrp12le + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 + + rgb24: + << : *base_args + -pix_fmt: rgb24 + + gbrp10le: + << : *base_args + -pix_fmt: gbrp10le + + gbrp12le: + << : *base_args + -pix_fmt: gbrp12le + + gbrp16le: + << : *base_args + -pix_fmt: gbrp16le + +--- + +reports: + graphs: + - args: + color: wedge + height: 400 + barmode: group + x: media + y: psnr_y_harmonic_mean + range_y: + - 90 + - 100 + name: psnr_y_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + barmode: group + x: media + y: vmaf_harmonic_mean + range_y: + - 90 + - 100 + name: vmaf_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: encode_time + name: encode_time.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: filesize + name: filesize.png + type: bar + name: j2k-tests + title: J2K comparison. + description: This is a comparison of different quality settings for the openjpeg encoder. + directory: j2k-encode + templatefile: basicmovie.html.jinja diff --git a/enctests/test_configs/mjpeg_qscale_tests.yml b/enctests/test_wedge_configs/mjpeg_qscale_tests.yml similarity index 98% rename from enctests/test_configs/mjpeg_qscale_tests.yml rename to enctests/test_wedge_configs/mjpeg_qscale_tests.yml index 8270b76..1d40b90 100644 --- a/enctests/test_configs/mjpeg_qscale_tests.yml +++ b/enctests/test_wedge_configs/mjpeg_qscale_tests.yml @@ -40,7 +40,7 @@ test_mjpeg: qscale_08: << : *base_args - -qscale:v: 08 + -qscale:v: 8 qscale_10: << : *base_args diff --git a/enctests/test_wedge_configs/osx_hevc_tests.yml b/enctests/test_wedge_configs/osx_hevc_tests.yml new file mode 100644 index 0000000..3d57b1d --- /dev/null +++ b/enctests/test_wedge_configs/osx_hevc_tests.yml @@ -0,0 +1,91 @@ +test_osx-prores: + name: test_prores_quality + description: variations of prores_quality + app: ffmpeg + suffix: .mov + encoding_template: '{ffmpeg_bin} {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + prores_ks: &base_args + -c:v: prores_ks + -profile:v: 3 +# -qscale:v: 16 + -pix_fmt: yuv422p10le + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 +# -color_trc: iec61966-2-1 + + + hevc_videotoolbox_q90: + << : *base_args + -c:v: hevc_videotoolbox + -pix_fmt: yuv420p + -profile:v: main + -q:v: 90 + -color_range: tv + -colorspace: bt709 + -color_primaries: bt709 +# -color_trc: iec61966-2-1 + + hevc_videotoolbox_q80: + << : *base_args + -c:v: hevc_videotoolbox + -pix_fmt: yuv420p + -profile:v: main + -q:v: 80 + + hevc_videotoolbox_q70: + << : *base_args + -c:v: hevc_videotoolbox + -pix_fmt: yuv420p + -profile:v: main + -q:v: 70 + + hevc_videotoolbox_q60: + << : *base_args + -c:v: hevc_videotoolbox + -pix_fmt: yuv420p + -profile:v: main + -q:v: 60 +--- + +reports: + graphs: + - args: + color: wedge + height: 400 + barmode: group + x: media + y: vmaf_harmonic_mean + range_y: + - 90 + - 100 + name: vmaf_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: encode_time + name: encode_time.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: filesize + name: filesize.png + type: bar + name: osx-hevc + title: OSX HEVC Videotoolbox Comparison + description: This is a comparison of different quality settings for HEVC Videotoolbox. + directory: osx-prores-encode + templatefile: basic.html.jinja + diff --git a/enctests/test_configs/osx_prores_tests.yml b/enctests/test_wedge_configs/osx_prores_tests.yml similarity index 97% rename from enctests/test_configs/osx_prores_tests.yml rename to enctests/test_wedge_configs/osx_prores_tests.yml index a6503fb..49c1193 100644 --- a/enctests/test_configs/osx_prores_tests.yml +++ b/enctests/test_wedge_configs/osx_prores_tests.yml @@ -78,7 +78,7 @@ test_osx-prores: reports: graphs: - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -89,7 +89,7 @@ reports: name: vmaf_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group @@ -97,7 +97,7 @@ reports: name: encode_time.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group diff --git a/enctests/test_configs/prores_qscale_tests.yml b/enctests/test_wedge_configs/prores_qscale_tests.yml similarity index 95% rename from enctests/test_configs/prores_qscale_tests.yml rename to enctests/test_wedge_configs/prores_qscale_tests.yml index 5cd3d15..62ee94b 100644 --- a/enctests/test_configs/prores_qscale_tests.yml +++ b/enctests/test_wedge_configs/prores_qscale_tests.yml @@ -38,7 +38,7 @@ test_prores: qscale_08: << : *base_args - -qscale:v: 08 + -qscale:v: 8 qscale_10: << : *base_args @@ -52,10 +52,6 @@ test_prores: << : *base_args -qscale:v: 14 - qscale_14: - << : *base_args - -qscale:v: 14 - --- reports: diff --git a/enctests/test_configs/prores_tests.yml b/enctests/test_wedge_configs/prores_tests.yml similarity index 100% rename from enctests/test_configs/prores_tests.yml rename to enctests/test_wedge_configs/prores_tests.yml diff --git a/enctests/test_wedge_configs/rgb_tests.yml b/enctests/test_wedge_configs/rgb_tests.yml new file mode 100644 index 0000000..144d28e --- /dev/null +++ b/enctests/test_wedge_configs/rgb_tests.yml @@ -0,0 +1,135 @@ + + +test_rgb: + app: ffmpeg + description: RGB encoding tests. + encoding_template: ffmpeg -y {input_args} -i "{source}" {encoding_args} + -y "{outfile}" + name: test_rgb + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + suffix: .mp4 + wedges: + 10bit_h264: + -c:v: libx264 + -preset: slow + -crf: 18 + -pix_fmt: yuv444p10le + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_trc: bt709 + -colorspace: bt709 + -color_range: tv + vp9_10bit_rgb: + -c:v: libvpx-vp9 + -quality: good + -crf: 22 + -speed: 2 + -row-mt: 1 + -pix_fmt: gbrp10le + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -color_primaries: bt709 + -color_trc: bt709 + -color_range: pc + vp9_12bit_rgb: + -c:v: libvpx-vp9 + -quality: good + -crf: 22 + -speed: 2 + -row-mt: 1 + -pix_fmt: gbrp12le + -color_primaries: bt709 + -color_trc: bt709 + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -color_range: pc + 8bit_h264: + -c:v: libx264 + -pix_fmt: yuv444p + -preset: slow + -crf: 18 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: bt709 + -color_range: tv + -color_trc: bt709 + -colorspace: bt709 + 8bit_libx264rgb: + -c:v: libx264rgb + -pix_fmt: rgb24 + -crf: 18 + -preset: slow + -colorspace: rgb + -vf: '"scale=in_range=full:out_range=full"' + -x264-params: "keyint=15:no-deblock=1" + -color_primaries: bt709 + -color_trc: bt709 + -color_range: pc + 8bit_mjpeg: + -c:v: mjpeg + -pix_fmt: rgb24 + -colorspace: rgb + -q:v: 2 + -vf: '"scale=in_range=full:out_range=full"' + -color_primaries: bt709 + -color_trc: bt709 + -color_range: pc + vp9_8bit_rgb: + -c:v: libvpx-vp9 + -quality: good + -crf: 22 + -pix_fmt: gbrp + -colorspace: rgb + -color_primaries: bt709 + -color_trc: bt709 + -vf: '"scale=in_range=full:out_range=full"' + -color_range: pc + +--- + +reports: + graphs: + - args: + color: wedge + height: 400 + barmode: group + x: media + y: psnr_y_harmonic_mean + name: psnr_y_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + barmode: group + x: media + y: vmaf_harmonic_mean + range_y: + - 90 + - 100 + name: vmaf_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: encode_time + name: encode_time.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: filesize + name: filesize.png + type: bar + name: rgb-tests + title: Comparison of different RGB codecs + description: This is comparing different codecs with source media encoding directly to RGB rather than YCrCb, with approximately the same tuning factors such that vmaf > 98. + directory: rgb-encode + templatefile: basicmovie.html.jinja + diff --git a/enctests/test_wedge_configs/uncompressed_rgb_tests.yml b/enctests/test_wedge_configs/uncompressed_rgb_tests.yml new file mode 100644 index 0000000..079bf12 --- /dev/null +++ b/enctests/test_wedge_configs/uncompressed_rgb_tests.yml @@ -0,0 +1,159 @@ +test_mp4: + name: test_mp4 + description: A comparison of different codecs with uncompressed settings, with VMAF > 98. + app: ffmpeg + suffix: .mp4 + encoding_template: 'ffmpeg {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + #- sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + libvpx-vp9-10bit-yuv: + -c:v: libvpx-vp9 + -pix_fmt: yuv444p10le + -speed: 7 + -quality: realtime + -row-mt: 1 + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -lossless: 1 + -color_range: 1 + -colorspace: 1 + -color_primaries: 1 + -color_trc: 2 + + libvpx-vp9-10bit: &basevp9 + -c:v: libvpx-vp9 + -pix_fmt: gbrp10le + -lossless: 1 + -quality: good + -speed: 7 + -row-mt: 1 + -color_range: pc + -colorspace: rgb + -color_primaries: 1 + -color_trc: 2 + + speed-7-mt: + << : *basevp9 + -speed: 7 + -quality: realtime + -row-mt: 1 + + speed-7-mt-12bit: + << : *basevp9 + -pix_fmt: gbrp12le + -speed: 7 + -quality: realtime + -row-mt: 1 + + +test_mov: + name: test_mov + description: A comparison of different codecs with uncompressed settings, with VMAF > 98. + app: ffmpeg + suffix: .mov + encoding_template: 'ffmpeg {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + #- sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + v410-10bit: + -c:v: v410 + -pix_fmt: yuv444p10le + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: 1 + -colorspace: 1 + -color_primaries: 1 + -color_trc: 2 + + libx264rgb-8bit-ultrafast: + -c:v: libx264rgb + -pix_fmt: rgb24 + -preset: ultrafast + -qp: 0 + -color_range: 1 + -colorspace: rgb + -color_primaries: 1 + -color_trc: 2 + + libx265-10bit-ultrafast: + -c:v: libx265 + -pix_fmt: gbrp10le + -preset: ultrafast + -x265-params: lossless=1 + -color_range: 1 + -colorspace: rgb + -color_primaries: 1 + -color_trc: 2 + + libx265-12bit-ultrafast: + -c:v: libx265 + -pix_fmt: gbrp12le + -preset: ultrafast + -x265-params: lossless=1 + -color_range: 1 + -colorspace: rgb + -color_primaries: 1 + -color_trc: 2 + + dnxhd: + -c:v: dnxhd + -pix_fmt: yuv444p10le + -profile:v: dnxhr_444 + -sws_flags: lanczos+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: 1 + -colorspace: 1 + -color_primaries: 1 + -color_trc: 2 + + +--- + +reports: + graphs: + - args: + color: wedge + height: 400 + barmode: group + x: media + y: psnr_y_harmonic_mean + name: psnr_y_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + barmode: group + x: media + y: vmaf_harmonic_mean + range_y: + - 90 + - 100 + name: vmaf_harmonic_mean.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: encode_time + name: encode_time.png + type: bar + - args: + color: wedge + height: 400 + x: media + barmode: group + y: filesize + name: filesize.png + type: bar + name: uncompressed-rgb-test + title: Comparison of different lossless RGB codecs + description: This is comparing different codecs encoding direct to RGB with a lossless encoding, the original 16-bit files are roughly 2GB in size. So its particularly impressive that the 12-bit files have just over a 50% compression. NOTE, the DNxHD encoding is dnxhr_444 is lossy by comparisons to the others shown here. + directory: uncompressed-rgb-encode + templatefile: basicmovie.html.jinja + diff --git a/enctests/test_configs/uncompressed_tests.yml b/enctests/test_wedge_configs/uncompressed_tests.yml similarity index 98% rename from enctests/test_configs/uncompressed_tests.yml rename to enctests/test_wedge_configs/uncompressed_tests.yml index c0132a5..b45e921 100644 --- a/enctests/test_configs/uncompressed_tests.yml +++ b/enctests/test_wedge_configs/uncompressed_tests.yml @@ -105,7 +105,7 @@ test_mov: reports: graphs: - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -113,7 +113,7 @@ reports: name: psnr_y_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -124,7 +124,7 @@ reports: name: vmaf_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group @@ -132,7 +132,7 @@ reports: name: encode_time.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group diff --git a/enctests/test_configs/vp9_crf_tests.yml b/enctests/test_wedge_configs/vp9_crf_tests.yml similarity index 100% rename from enctests/test_configs/vp9_crf_tests.yml rename to enctests/test_wedge_configs/vp9_crf_tests.yml diff --git a/enctests/test_wedge_configs/vp9_g1_crf_tests.yml b/enctests/test_wedge_configs/vp9_g1_crf_tests.yml new file mode 100644 index 0000000..fe6fb9c --- /dev/null +++ b/enctests/test_wedge_configs/vp9_g1_crf_tests.yml @@ -0,0 +1,105 @@ +test_crf_yuv420p: + name: test_colorspace_yuv420p + description: variations of colorspace yuv420p + app: ffmpeg + suffix: .mp4 + encoding_template: 'ffmpeg {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + medium_crf_02: &base_args + -c:v: libvpx-vp9 + -quality: good + -crf: 2 + -b:v: 0 + -g: 1 + -speed: 2 + -row-mt: 1 + -pix_fmt: yuv444p + -sws_flags: lanczos+accurate_rnd + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: 1 + -colorspace: 1 + -color_primaries: 1 + -color_trc: 2 + + medium_crf_05: + << : *base_args + -crf: 5 + + medium_crf_10: + << : *base_args + -crf: 10 + + medium_crf_14: + << : *base_args + -crf: 14 + + medium_crf_16: + << : *base_args + -crf: 16 + + medium_crf_18: + << : *base_args + -crf: 18 + + medium_crf_20: + << : *base_args + -crf: 20 + + medium_crf_22: + << : *base_args + -crf: 22 + + medium_crf_25: + << : *base_args + -crf: 25 + + medium_crf_28: + << : *base_args + -crf: 28 +--- + +reports: + graphs: + - args: + color: media + height: 400 + x: -crf + y: psnr_y_harmonic_mean + markers: True + name: psnr_y_harmonic_mean.png + sortby: name + - args: + color: media + height: 400 + x: -crf + y: vmaf_harmonic_mean + markers: True + name: vmaf_harmonic_mean.png + sortby: name + - args: + color: media + height: 400 + x: -crf + y: encode_time + markers: True + name: encode_time.png + sortby: name + - args: + color: media + height: 400 + x: -crf + y: filesize + markers: True + name: filesize.png + sortby: name + name: vp9-g1-crf-test + title: VP9 CRF Comparison with GOP of 1. + description: This is a comparison of different CRF values for vp9 encoding with GOP of 1. + directory: vp9-g1-crf-encode + templatefile: basicmovie.html.jinja + diff --git a/enctests/test_wedge_configs/vp9_g_tests.yml b/enctests/test_wedge_configs/vp9_g_tests.yml new file mode 100644 index 0000000..f0057b0 --- /dev/null +++ b/enctests/test_wedge_configs/vp9_g_tests.yml @@ -0,0 +1,102 @@ +test_g_yuv420p: + name: test_g + description: Comparing vp9 with different GOP values + app: ffmpeg + suffix: .mp4 + encoding_template: 'ffmpeg {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + medium_01: &base_args + -c:v: libvpx-vp9 + -quality: good + -crf: 22 + -b:v: 0 + -g: 1 + -speed: 2 + -row-mt: 1 + -pix_fmt: yuv444p + -sws_flags: area+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_range: 1 + -colorspace: 1 + -color_primaries: 1 + -color_trc: 2 + + medium_02: + << : *base_args + -g: 2 + + medium_03: + << : *base_args + -g: 3 + + medium_04: + << : *base_args + -g: 4 + + medium_05: + << : *base_args + -g: 5 + + medium_10: + << : *base_args + -g: 10 + + medium_20: + << : *base_args + -g: 20 + + medium_30: + << : *base_args + -g: 30 + + medium_50: + << : *base_args + -g: 50 + +--- + +reports: + graphs: + - args: + color: media + height: 400 + x: -g + y: psnr_y_harmonic_mean + markers: True + name: psnr_y_harmonic_mean.png + sortby: name + - args: + color: media + height: 400 + x: -g + y: vmaf_harmonic_mean + markers: True + name: vmaf_harmonic_mean.png + sortby: name + - args: + color: media + height: 400 + x: -g + y: encode_time + markers: True + name: encode_time.png + sortby: name + - args: + color: media + height: 400 + x: -g + y: filesize + markers: True + name: filesize.png + sortby: name + name: vp9-g-test + title: VP9 GOP Comparison + description: This is a comparison of different GOP values for vp9 encoding. + directory: vp9-g-encode + templatefile: basicmovie.html.jinja + diff --git a/enctests/test_configs/vp9_speed_tests.yml b/enctests/test_wedge_configs/vp9_speed_tests.yml similarity index 97% rename from enctests/test_configs/vp9_speed_tests.yml rename to enctests/test_wedge_configs/vp9_speed_tests.yml index a4b6cb4..9f02a0a 100644 --- a/enctests/test_configs/vp9_speed_tests.yml +++ b/enctests/test_wedge_configs/vp9_speed_tests.yml @@ -73,7 +73,7 @@ test_crf_yuv420p: reports: graphs: - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 barmode: group @@ -85,7 +85,7 @@ reports: name: psnr_y_harmonic_mean.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 barmode: group @@ -97,7 +97,7 @@ reports: name: vmaf_harmonic_mean.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 x: media @@ -106,7 +106,7 @@ reports: name: encode_time.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 x: media diff --git a/enctests/test_configs/vp9_tests.yml b/enctests/test_wedge_configs/vp9_tests.yml similarity index 97% rename from enctests/test_configs/vp9_tests.yml rename to enctests/test_wedge_configs/vp9_tests.yml index 743e7b9..9b4ff52 100644 --- a/enctests/test_configs/vp9_tests.yml +++ b/enctests/test_wedge_configs/vp9_tests.yml @@ -60,7 +60,7 @@ test_crf_yuv420p: reports: graphs: - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 barmode: group @@ -72,7 +72,7 @@ reports: name: psnr_y_harmonic_mean.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 barmode: group @@ -84,7 +84,7 @@ reports: name: vmaf_harmonic_mean.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 x: media @@ -93,7 +93,7 @@ reports: name: encode_time.png type: bar - args: - color: name + color: wedge #colororder: ['veryfast', 'fast', 'medium', 'slow', 'slower', 'veryslow', 'placebo'] height: 400 x: media diff --git a/enctests/test_wedge_configs/vp9av1_nextgen_tests.yml b/enctests/test_wedge_configs/vp9av1_nextgen_tests.yml new file mode 100644 index 0000000..9001da9 --- /dev/null +++ b/enctests/test_wedge_configs/vp9av1_nextgen_tests.yml @@ -0,0 +1,136 @@ +test_mp4: + name: test_mp4 + description: A comparison of different codecs, with VMAF > 98. + app: ffmpeg + suffix: .mp4 + encoding_template: 'ffmpeg {input_args} -i "{source}" -vframes {duration} {encoding_args} -y "{outfile}"' + sources: + - sources/enc_sources/chimera_cars_srgb/chimera_cars_srgb.%05d.png.yml + - sources/enc_sources/chimera_coaster_srgb/chimera_coaster_srgb.%06d.png.yml + - sources/enc_sources/chimera_fountains_srgb/chimera_fountains_srgb.%05d.png.yml + - sources/hdr_sources/sparks_srgb/sparks_srgb.%05d.png.yml + wedges: + x264-10bit: &base_args_h264 + -c:v: libx264 + -pix_fmt: yuv420p10le + -crf: 20 + -preset: slow + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 + + x264-08bit: + << : *base_args_h264 + -pix_fmt: yuv420p + + av1-08bit: &base_args_av1 + -pix_fmt: yuv420p + -c:v: libsvtav1 + -crf: 22 + -preset: slow + -svtav1-params: tune=0 + -preset: 9 + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 + + av1-10bit: + << : *base_args_av1 + -pix_fmt: yuv420p10le + + vp9-10bit: &base_args_vp9 + -pix_fmt: yuv420p10le + -c:v: libvpx-vp9 + -quality: good + -speed: 2 + -row-mt: 1 + -b:v: 0 + -crf: 22 + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 + + vp9-10bit-444: + << : *base_args_vp9 + -pix_fmt: yuv444p10le + + vp9-08bit: + << : *base_args_vp9 + -pix_fmt: yuv420p + + x265-08bit: &base_args_h265 + -c:v: libx265 + -pix_fmt: yuv420p10le + -crf: 20 + -preset: medium + -tag:v: hvc1 + -sws_flags: spline+accurate_rnd+full_chroma_int + -vf: '"scale=in_range=full:in_color_matrix=bt709:out_range=tv:out_color_matrix=bt709"' + -color_primaries: tv + -colorspace: bt709 + -color_primaries: bt709 + -color_trc: iec61966-2-1 + + x265-10bit: + << : *base_args_h265 + -pix_fmt: yuv420p10le + + x265-10bit-444: + << : *base_args_h265 + -pix_fmt: yuv444p10le + + +--- + +reports: + graphs: + - args: + color: wedge + height: 450 + barmode: group + x: media + y: psnr_y_harmonic_mean + name: psnr_y_harmonic_mean.png + type: bar + - args: + color: wedge + height: 450 + barmode: group + x: media + y: vmaf_harmonic_mean + range_y: + - 90 + - 100 + name: vmaf_harmonic_mean.png + type: bar + - args: + color: wedge + height: 450 + x: media + barmode: group + y: encode_time + name: encode_time.png + type: bar + - args: + color: wedge + height: 450 + x: media + barmode: group + y: filesize + name: filesize.png + type: bar + name: vp9av1-test + title: VP9 vs AV1 vs HEVC NextGen Tests + description: This is a comparison of vp9 and AV1 with HEVC and h264. + directory: vp9av1-nextgen-encode + templatefile: basicmovie.html.jinja + diff --git a/enctests/test_configs/vp9av1_tests.yml b/enctests/test_wedge_configs/vp9av1_tests.yml similarity index 98% rename from enctests/test_configs/vp9av1_tests.yml rename to enctests/test_wedge_configs/vp9av1_tests.yml index 8af98d4..c001e5f 100644 --- a/enctests/test_configs/vp9av1_tests.yml +++ b/enctests/test_wedge_configs/vp9av1_tests.yml @@ -115,7 +115,7 @@ test_mp4: reports: graphs: - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -123,7 +123,7 @@ reports: name: psnr_y_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -134,7 +134,7 @@ reports: name: vmaf_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group @@ -142,7 +142,7 @@ reports: name: encode_time.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group diff --git a/enctests/test_configs/vp9av1_v2_tests.yml b/enctests/test_wedge_configs/vp9av1_v2_tests.yml similarity index 95% rename from enctests/test_configs/vp9av1_v2_tests.yml rename to enctests/test_wedge_configs/vp9av1_v2_tests.yml index 03a0f48..d0f3ee9 100644 --- a/enctests/test_configs/vp9av1_v2_tests.yml +++ b/enctests/test_wedge_configs/vp9av1_v2_tests.yml @@ -99,7 +99,7 @@ test_mp4: reports: graphs: - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -107,7 +107,7 @@ reports: name: psnr_y_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 barmode: group x: media @@ -118,7 +118,7 @@ reports: name: vmaf_harmonic_mean.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group @@ -126,7 +126,7 @@ reports: name: encode_time.png type: bar - args: - color: name + color: wedge height: 400 x: media barmode: group @@ -135,7 +135,7 @@ reports: type: bar name: vp9av1-test title: VP9 and AV1 vs HEVC - description: This is a comparison of vp9 and AV1 with HEVC and h264. + description: This is a comparison of vp9 and AV1 (libaom-av1) with HEVC and h264. directory: vp9av1-encode templatefile: basicmovie.html.jinja