Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Timestamps must be monotonically increasing on Firefox #56

Open
fax1ty opened this issue Nov 30, 2024 · 0 comments
Open

Timestamps must be monotonically increasing on Firefox #56

fax1ty opened this issue Nov 30, 2024 · 0 comments

Comments

@fax1ty
Copy link

fax1ty commented Nov 30, 2024

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant