tree: c08e5e3cb3d92cb5d94babd29cc8c434311e1d6b [path history] [tgz]
  1. audio-decoder.any.js
  2. audio-encoder-config.any.js
  3. audio-encoder.any.js
  4. audio-frame-serialization.any.js
  5. audio-frame.any.js
  6. four-colors-flip.avif
  7. four-colors-flip.gif
  8. four-colors-full-range-bt2020-pq-444-10bpc.avif
  9. four-colors-limited-range-420-8bpc.avif
  10. four-colors-limited-range-420-8bpc.jpg
  11. four-colors-limited-range-420-8bpc.webp
  12. four-colors-limited-range-422-8bpc.avif
  13. four-colors-limited-range-444-8bpc.avif
  14. four-colors.avif
  15. four-colors.gif
  16. four-colors.jpg
  17. four-colors.mp4
  18. four-colors.png
  19. four-colors.webp
  20. h264.mp4
  21. image-decoder-image-orientation-none.html
  22. image-decoder-utils.js
  23. image-decoder.any.js
  24. META.yml
  25. pattern.png
  26. README.md
  27. sfx-opus.ogg
  28. utils.js
  29. video-decoder.any.js
  30. video-encoder-config.any.js
  31. video-encoder.any.js
  32. video-frame-serialization.any.js
  33. video-frame.any.js
  34. videoFrame-canvasImageSource.html
  35. videoFrame-createImageBitmap.any.js
  36. videoFrame-drawImage.any.js
  37. videoFrame-texImage.any.js
  38. vp9.mp4
  39. webgl-test-utils.js
webcodecs/README.md

WebCodecs Test Files

Instructions

To add, update or remove a test file, please update the list below.

Please provide full reference and steps to generate the test file so that any people can regenerate or update the file in the future.

List of Test Files

four-colors.png

Generated using MSPaint like a true professional.

four-colors.avif

Lossless encoding must be used to ensure colors are perfect.

avifenc -l four-colors.png -o four-colors.avif

four-colors.webp

Lossless encoding must be used to ensure colors are perfect.

ffmpeg -i four-colors.png -lossless 1 -y four-colors.webp

four-colors-limited-range-420-8bpc.webp

ffmpeg -i four-colors.png -pix_fmt yuv420p four-colors-limited-range-420-8bpc.webp

four-colors.gif

High quality encoding must be used to ensure colors are perfect.

cp four-colors.png four-colors2.png
gifski -o four-colors.gif four-colors*.png

four-colors-flip.gif

High quality encoding must be used to ensure colors are perfect.

ffmpeg -i four-colors.png -vf "rotate=PI" four-colors2.png
gifski -o four-colors-flip.gif four-colors*.png

four-colors-flip.avif

ffmpeg -i four-colors-flip.gif -vcodec libaom-av1 -crf 16 four-colors-flip.mp4
mp4box -add-image ref:primary:tk=1:samp=1 -ab avis -ab avif -ab miaf -brand avis four-colors-flip.mp4 -out four-colors-flip.avif

four-colors-limited-range-(420|422|444)-8bpc.avif

avifenc -r l -d 8 -y 420 -s 0 four-colors.png four-colors-limited-range-420-8bpc.avif
avifenc -r l -d 8 -y 422 -s 0 four-colors.png four-colors-limited-range-422-8bpc.avif
avifenc -r l -d 8 -y 444 -s 0 four-colors.png four-colors-limited-range-444-8bpc.avif

four-colors-full-range-bt2020-pq-444-10bpc.avif

avifenc -r f -d 10 -y 444 -s 0 --nclx 9/16/9 four-colors.png four-colors-full-range-bt2020-pq-444-10bpc.avif

four-colors.jpg

Used Sqoosh.app with MozJPEG compression and RGB channels. exiftool was then used to add an orientation marker.

exiftool -Orientation=1 -n four-colors.jpg

four-colors-limited-range-420-8bpc.jpg

Used Sqoosh.app with MozJPEG compression and YUV channels.

four-colors.mp4

Used a custom tool to convert four-colors.avif into a .mp4 file.

sfx-opus.ogg

sox -n -r 48000 sfx.wav synth 1 sine 480
ffmpeg -i sfx.wav -frames:a 10 -acodec libopus -b:a 96K sfx-opus.ogg