Giter VIP home page Giter VIP logo

Comments (4)

tfriedel6 avatar tfriedel6 commented on May 17, 2024

Hi,
that would certainly be great if DrawImage could also draw a video frame. I don't want to add a dependency to a video library, but what would solve it quite nicely is if DrawImage could also take an interface of some kind. Do you happen to know any decent video libraries? I played around with a Go binding for ffmpeg once, but couldn't get it to work.

from canvas.

SuperDog83 avatar SuperDog83 commented on May 17, 2024

@tfriedel6 did you check out https://github.com/3d0c/gmf ? ffmpeg bindings, seems to be still maintened, haven't tested it though. Found it on awesome-go (https://github.com/avelino/awesome-go#video)

from canvas.

SuperDog83 avatar SuperDog83 commented on May 17, 2024

@tfriedel6 hey, any news? would be cool if this was implemented, as this is vital for a project I'm working on weekends..

from canvas.

tfriedel6 avatar tfriedel6 commented on May 17, 2024

Hi! I didn't have much time last week, but I gave it a shot just now to see what could be done. The best I could come up with was to add a Replace function to the Image type, so that you can replace the image every frame and avoid allocating a new texture. I also tried the gmf library you linked, which seems to work better than any I tried before, but I don't know enough to be able to use it correctly.

Anyway, here is a gist that is just a modification of one of their examples and seems to be able to basically display a video, though it does not respect the frame rate. Not sure how to do that.
https://gist.github.com/tfriedel6/be453334bd025ded790b5d11ea584ca2

from canvas.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.