Add support for reading/writing non-square pixel video frames (fixes #309)

This commit is contained in:
Vanilagy
2026-02-25 17:16:33 +01:00
parent a7dc2c198b
commit bb4749cd8d
25 changed files with 744 additions and 69 deletions
+2 -2
View File
@@ -350,7 +350,7 @@ type CanvasSinkOptions = {
- `rotation`\
The clockwise rotation by which to rotate the raw video frame. Defaults to the rotation set in the file metadata. Rotation is applied before cropping and resizing.
- `crop`\
Specifies the rectangular region of the input video to crop to. The crop region will automatically be clamped to the dimensions of the input video track. Cropping is performed after rotation but before resizing.
Specifies the rectangular region of the input video to crop to. The crop region will automatically be clamped to the dimensions of the input video track. Cropping is performed after rotation but before resizing. The crop region is in the _display pixel space_ of the underlying video data.
- `poolSize`\
See [Canvas pool](#canvas-pool).
@@ -374,7 +374,7 @@ new CanvasSink(videoTrack, {
fit: 'cover',
});
// This sink yields canvases with the unaltered coded dimensions of the track,
// This sink yields canvases with the unrotated dimensions of the track,
// and without applying any rotation.
new CanvasSink(videoTrack, {
rotation: 0,