-
Notifications
You must be signed in to change notification settings - Fork 123
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Error:
Uncaught Error: Timestamps must be monotonically increasing (DTS went from 440000 to 400000).
Code:
import * as core from "@diffusionstudio/core";
import { DotFilter } from "pixi-filters";
import videoFile from "/1.mp4?url";
const d1 = Date.now();
const source = await core.VideoSource.from(videoFile);
const video = new core.VideoClip(source, { filters: [new DotFilter()] })
.subclip(0, 160);
const text = new core.TextClip({
text: "Very own text",
position: "center",
stop: 80,
stroke: { color: "#000000" },
});
const composition = new core.Composition({ backend: "webgl" });
await composition.add(video);
await composition.add(text);
const encoder = new core.Encoder(composition, { fps: 25 });
encoder.on("render", ({ detail }) =>
console.log(
`[RENDERING:progress] Processed frame #${detail.progress} out of ${detail.total}`
)
);
encoder.on("error", ({ detail }) => console.error(detail));
await encoder.render();
const d2 = Date.now();
console.log(`[RENDERING:done] Served video in ${d2 - d1}ms`);Environment: Ubuntu 22.04, Playwright, Firefox 132.0
firefoxUserPrefs: {
"gfx.webgpu.force-enabled": true,
"gfx.webrender.all": true,
"media.ffmpeg.vaapi.enabled": true,
"webgl.force-enabled": true,
}Related:
Vanilagy/mp4-muxer#25
Corrupted output:
1732977471482.mp4
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working