tree: 0a1c1f6a894b9e47ba1f018e95b20c10437ec82e
  1. audio-data-serialization.any.js
  2. audio-data.any.js
  3. audio-data.crossOriginIsolated.https.any.js
  4. audio-data.crossOriginIsolated.https.any.js.headers
  5. audio-decoder.crossOriginIsolated.https.any.js
  6. audio-decoder.crossOriginIsolated.https.any.js.headers
  7. audio-decoder.https.any-expected.txt
  8. audio-decoder.https.any.js
  9. audio-decoder.https.any.worker-expected.txt
  10. audio-encoder-codec-specific.https.any.js
  11. audio-encoder-config.https.any-expected.txt
  12. audio-encoder-config.https.any.js
  13. audio-encoder-config.https.any.worker-expected.txt
  14. audio-encoder.https.any.js
  15. audioDecoder-codec-specific.https.any.js
  16. audioDecoder-codec-specific.https.any.worker_adts_aac-expected.txt
  17. audioDecoder-codec-specific.https.any.worker_flac-expected.txt
  18. audioDecoder-codec-specific.https.any.worker_mp3-expected.txt
  19. audioDecoder-codec-specific.https.any.worker_mp4_aac-expected.txt
  20. audioDecoder-codec-specific.https.any.worker_opus-expected.txt
  21. audioDecoder-codec-specific.https.any.worker_pcm_alaw-expected.txt
  22. audioDecoder-codec-specific.https.any.worker_pcm_f32-expected.txt
  23. audioDecoder-codec-specific.https.any.worker_pcm_s16-expected.txt
  24. audioDecoder-codec-specific.https.any.worker_pcm_s24-expected.txt
  25. audioDecoder-codec-specific.https.any.worker_pcm_s32-expected.txt
  26. audioDecoder-codec-specific.https.any.worker_pcm_u8-expected.txt
  27. audioDecoder-codec-specific.https.any.worker_pcm_ulaw-expected.txt
  28. audioDecoder-codec-specific.https.any.worker_vorbis-expected.txt
  29. audioDecoder-codec-specific.https.any_adts_aac-expected.txt
  30. audioDecoder-codec-specific.https.any_flac-expected.txt
  31. audioDecoder-codec-specific.https.any_mp3-expected.txt
  32. audioDecoder-codec-specific.https.any_mp4_aac-expected.txt
  33. audioDecoder-codec-specific.https.any_opus-expected.txt
  34. audioDecoder-codec-specific.https.any_pcm_alaw-expected.txt
  35. audioDecoder-codec-specific.https.any_pcm_f32-expected.txt
  36. audioDecoder-codec-specific.https.any_pcm_s16-expected.txt
  37. audioDecoder-codec-specific.https.any_pcm_s24-expected.txt
  38. audioDecoder-codec-specific.https.any_pcm_s32-expected.txt
  39. audioDecoder-codec-specific.https.any_pcm_u8-expected.txt
  40. audioDecoder-codec-specific.https.any_pcm_ulaw-expected.txt
  41. audioDecoder-codec-specific.https.any_vorbis-expected.txt
  42. av1.mp4
  43. chunk-serialization.any.js
  44. encoded-audio-chunk.any.js
  45. encoded-audio-chunk.crossOriginIsolated.https.any.js
  46. encoded-audio-chunk.crossOriginIsolated.https.any.js.headers
  47. encoded-video-chunk.any.js
  48. encoded-video-chunk.crossOriginIsolated.https.any.js
  49. encoded-video-chunk.crossOriginIsolated.https.any.js.headers
  50. encodedVideoChunk-serialization.crossAgentCluster.helper.html
  51. encodedVideoChunk-serialization.crossAgentCluster.https.html
  52. four-colors-flip.avif
  53. four-colors-flip.gif
  54. four-colors-full-range-bt2020-pq-444-10bpc.avif
  55. four-colors-full-range-hlg-420-10bpc.avif
  56. four-colors-full-range-hlg-420-12bpc.avif
  57. four-colors-full-range-hlg-422-10bpc.avif
  58. four-colors-full-range-hlg-422-12bpc.avif
  59. four-colors-full-range-hlg-444-10bpc.avif
  60. four-colors-full-range-hlg-444-12bpc.avif
  61. four-colors-limited-range-420-8bpc.avif
  62. four-colors-limited-range-420-8bpc.jpg
  63. four-colors-limited-range-420-8bpc.webp
  64. four-colors-limited-range-422-8bpc.avif
  65. four-colors-limited-range-444-8bpc.avif
  66. four-colors.avif
  67. four-colors.gif
  68. four-colors.jpg
  69. four-colors.mp4
  70. four-colors.png
  71. four-colors.webp
  72. full-cycle-test.https.any.js
  73. h264.annexb
  74. h264.mp4
  75. h265.annexb
  76. h265.mp4
  77. idlharness.https.any.js
  78. image-decoder-disconnect-readable-stream-crash.https.html
  79. image-decoder-image-orientation-none.https.html
  80. image-decoder-utils.js
  81. image-decoder.crossOriginIsolated.https.any.js
  82. image-decoder.crossOriginIsolated.https.any.js.headers
  83. image-decoder.https.any.js
  84. META.yml
  85. pattern.png
  86. per-frame-qp-encoding.https.any.js
  87. README.md
  88. reconfiguring-encoder.https.any.js
  89. serialization.crossAgentCluster.serviceworker.js
  90. sfx-aac.mp4
  91. sfx-alaw.wav
  92. sfx-opus.ogg
  93. sfx-pcm-f32.wav
  94. sfx-pcm-s16.wav
  95. sfx-pcm-s24.wav
  96. sfx-pcm-s32.wav
  97. sfx-pcm-u8.wav
  98. sfx-ulaw.wav
  99. sfx-vorbis.ogg
  100. sfx.adts
  101. sfx.flac
  102. sfx.mp3
  103. temporal-svc-encoding.https.any.js
  104. transfering.https.any.js
  105. utils.js
  106. video-decoder-no-size-in-configure.https.any.js
  107. video-decoder.crossOriginIsolated.https.any.js
  108. video-decoder.crossOriginIsolated.https.any.js.headers
  109. video-decoder.https.any.js
  110. video-encoder-canvasImageSource.https.html
  111. video-encoder-config.https.any.js
  112. video-encoder-content-hint.https.any.js
  113. video-encoder-flush.https.any.js
  114. video-encoder-h264.https.any.js
  115. video-encoder-h264.https.any.worker_high-6.2-expected.txt
  116. video-encoder-h264.https.any_high-6.2-expected.txt
  117. video-encoder-h26x-annexb.https.any.js
  118. video-encoder-h26x-annexb.https.any.worker_h264_annexb_hardware-expected.txt
  119. video-encoder-h26x-annexb.https.any.worker_h265_annexb_hardware-expected.txt
  120. video-encoder-h26x-annexb.https.any.worker_h265_annexb_software-expected.txt
  121. video-encoder-h26x-annexb.https.any_h264_annexb_hardware-expected.txt
  122. video-encoder-h26x-annexb.https.any_h265_annexb_hardware-expected.txt
  123. video-encoder-h26x-annexb.https.any_h265_annexb_software-expected.txt
  124. video-encoder-orientation.https.any.js
  125. video-encoder-rescaling.https.any.js
  126. video-encoder-utils.js
  127. video-encoder.https.any.js
  128. video-frame-serialization.any.js
  129. videoColorSpace.any.js
  130. videoDecoder-codec-specific-orientation.https.any.js
  131. videoDecoder-codec-specific-setup.js
  132. videoDecoder-codec-specific.https.any.js
  133. videoDecoder-codec-specific.https.any.worker_av1-expected.txt
  134. videoDecoder-codec-specific.https.any_av1-expected.txt
  135. videoFrame-alpha.any.js
  136. videoFrame-canvasImageSource.html
  137. videoFrame-construction.any.js
  138. videoFrame-construction.any.worker-expected.txt
  139. videoFrame-construction.crossOriginIsolated.https.any.js
  140. videoFrame-construction.crossOriginIsolated.https.any.js.headers
  141. videoFrame-construction.crossOriginSource.sub.html
  142. videoFrame-construction.window.js
  143. videoFrame-copyTo-rgb.any.js
  144. videoFrame-copyTo.any.js
  145. videoFrame-copyTo.crossOriginIsolated.https.any.js
  146. videoFrame-copyTo.crossOriginIsolated.https.any.js.headers
  147. videoFrame-createImageBitmap.any.js
  148. videoFrame-createImageBitmap.https.any.js
  149. videoFrame-drawImage-hbd.any.js
  150. videoFrame-drawImage.any.js
  151. videoFrame-odd-size.any.js
  152. videoFrame-orientation.any.js
  153. videoFrame-serialization.crossAgentCluster.helper.html
  154. videoFrame-serialization.crossAgentCluster.https.html
  155. videoFrame-serialization.https.html
  156. videoFrame-texImage.any.js
  157. videoFrame-utils.js
  158. vp8.webm
  159. vp9.mp4
  160. WEB_FEATURES.yml
  161. webgl-test-utils.js
third_party/blink/web_tests/external/wpt/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 anybody can regenerate or update the file in the future.

Notes

  • When updating the sample offsets and descriptions for tests using mp4 files, it's easiest to use mp4box.js.
    • Sample offsets can be copied from the “Sample View” tab after unchecking all but offset and size. Use a multi-line edit mode and clang-format to quickly format entries.
    • Description entries can be found under moov.trak.mdia.minf.stbl.stsd in box view.
      • avc1.avcC or hvc1.hvcC has an offset, size in the same view. Add 8 to offset and subtract 8 from the size to get the values the tests want.
    • If you use ffprobe -show_packets to get sample offsets, you may need to add 4 to each pos value. You can tell if you need to by whether or not tests pass.

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 -crf 16 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-full-range-(420|422|444)-hlg-(10|12)bpc.avif

avifenc -r f -d 10 -y 420 -s 0 --nclx 9/18/9 four-colors.png four-colors-full-range-hlg-420-10bpc.avif
avifenc -r f -d 10 -y 422 -s 0 --nclx 9/18/9 four-colors.png four-colors-full-range-hlg-422-10bpc.avif
avifenc -r f -d 10 -y 444 -s 0 --nclx 9/18/9 four-colors.png four-colors-full-range-hlg-444-10bpc.avif
avifenc -r f -d 12 -y 420 -s 0 --nclx 9/18/9 four-colors.png four-colors-full-range-hlg-420-12bpc.avif
avifenc -r f -d 12 -y 422 -s 0 --nclx 9/18/9 four-colors.png four-colors-full-range-hlg-422-12bpc.avif
avifenc -r f -d 12 -y 444 -s 0 --nclx 9/18/9 four-colors.png four-colors-full-range-hlg-444-12bpc.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. exiftool was then used to add an orientation marker.

exiftool -Orientation=1 -n four-colors-limited-range-420-8bpc.jpg

four-colors.mp4

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

h264.mp4

ffmpeg -f lavfi -i testsrc=rate=10:n=1 -t 1 -pix_fmt yuv420p -vcodec h264 -tune zerolatency h264.mp4

h264.annexb

ffmpeg -i h264.mp4 -codec copy -bsf:v h264_mp4toannexb -f h264 h264.annexb

h265.mp4

ffmpeg -f lavfi -i testsrc=rate=10:n=1 -t 1 -pix_fmt yuv420p -vcodec hevc -tag:v hvc1 -tune zerolatency h265.mp4

h265.annexb

ffmpeg -i h265.mp4 -codec copy -bsf:v hevc_mp4toannexb -f hevc h265.annexb

sfx.adts

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

sfx.mp3

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

sfx.flac

sox -n -r 48000 sfx.wav synth 1 sine 480
ffmpeg -i sfx.wav -frames:a 10 sfx.flac

sfx-aac.mp4

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

sfx-*.wav

sox -n -r 48000 sfx.wav synth 1 sine 480
for codec in s16 s24 s32 f32
do
  # Add "le" suffix
  ffmpeg -i sfx.wav -frames:a 10 -acodec pcm_"$codec"le sfx-pcm-$codec.wav
done
ffmpeg -i sfx.wav -frames:a 10 -acodec pcm_u8 sfx-pcm-u8.wav
for codec in alaw mulaw
do
  ffmpeg -i sfx.wav -frames:a 10 -acodec pcm_$codec sfx-$codec.wav
done

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

### sfx-vorbis.ogg

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


### av1.mp4

ffmpeg -f lavfi -i testsrc=rate=10:n=1 -t 1 -pix_fmt yuv420p -vcodec libaom-av1 av1.mp4


### vp8.webm

ffmpeg -f lavfi -i testsrc=rate=10:n=1 -t 1 -pix_fmt yuv420p -vcodec vp8 vp8.webm


### vp9.mp4

ffmpeg -f lavfi -i testsrc=rate=10:n=1 -t 1 -pix_fmt yuv420p -vcodec vp9 vp9.mp4