Incorrect rendering h265/HEVC video with alpha channel
Open
Nobody has claimed this yet.
Area:Core
Area:Image
Bug
- Dominant language
- JavaScript
- Stars
- 24k
- Forks
- 3.8k
- Avg merge
- 3d 16h
- Merged PRs (30d)
- 25
Description
Most appropriate sub-area of p5.js?
- Accessibility
- Color
- Core/Environment/Rendering
- Data
- DOM
- Events
- Image
- IO
- Math
- Typography
- Utilities
- WebGL
- Build Process
- Unit Testing
- Internalization
- Friendly Errors
- Other (specify if possible)
p5.js version
1.6.0
Web browser and version
111.0.5563.64 (Official Build) (arm64)
Operating System
macOS Ventura 13.2.1
Steps to reproduce this
When using image() to render a video with an alpha channel, pixels from the previous frames are not being cleared.
Steps:
- Export a video with alpha channel using h265 codec (macOS can convert to by right click > encode selected video files)
- Load it in a p5.js script with
createVideo() - Display it with
image() - Observe frames not clearing.
Snippet:
- Example of bug when rendering inside canvas: https://editor.p5js.org/araid/sketches/TcKkF4gOb
- The video renders correctly outside canvas (not using
image()): https://editor.p5js.org/araid/sketches/7beM-GM1k
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with the linked p5.js Editor sketches, using createVideo() to load an H.265/HEVC video with an alpha channel and image() to draw it. Compare the canvas rendering with playback outside the canvas, then trace the video-image rendering path; done means successive frames clear correctly without pixels from prior frames.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- computer-graphics
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100