carsonDB / frameflow

A both speedy and compatible video processing library for Web Browser, based on WebCodecs and FFmpeg (WebAssembly).
https://frameflow.netlify.app/
GNU Lesser General Public License v2.1
49 stars 3 forks source link

Seeking #3

Open mortenjust opened 4 months ago

mortenjust commented 4 months ago

Hi there, thanks for building this! I'm not sure if this is possible, but I would love to be able to do something like this

    const trackGroup = await fflow.source(blob);
    this.videoTrack = trackGroup.filter("video").tracks()[0];
    this.target = await this.videoTrack.export({ format: "rawvideo" });

   this.target.seek(timeInSeconds)

My use case is decoding a video so I can draw it on a canvas along with animations. I have an animationTime which is driven by my animation setup, and I need to draw the video at an exact time, no matter the frame rate of the source video.

carsonDB commented 4 months ago

Yeah, seeking is important. But it is not available yet. Maybe support in next versions.