Giter Club home page Giter Club logo

Comments (4)

feelosophical88 avatar feelosophical88 commented on July 19, 2024 1

FWIW, I figured out a solution. I forked the repo, then added this block of code inside the Initialize function underneath the original command execution:

outputFolder := outputPath[:strings.LastIndexByte(outputPath, '/')]
actionOutput := outputFolder + "/action-shot.jpg"
actionShotCommand := []string{"-ss", "60", "-i", inputPath, "-qscale:v", "4", "-frames:v", "1", actionOutput}
cmd2 := exec.Command(cfg.FfmpegBin, actionShotCommand...)
cmd2.Stdout = &out2
	
err2 = cmd2.Start()
if err2 != nil {
    return fmt.Errorf("error executing (%s) | error: %s", actionShotCommand, err2)
}

It works but I'm pretty new to Go so some of the code could be unnecessary. The caveat here is that I'm running this code every time a video is transcoded rather than creating a function to use it when I need it, but hopefully this gives someone a head-start.

from goffmpeg.

feelosophical88 avatar feelosophical88 commented on July 19, 2024

@Fyb3roptik Was there ever a solution for this?

from goffmpeg.

Fyb3roptik avatar Fyb3roptik commented on July 19, 2024

Nope

from goffmpeg.

feelosophical88 avatar feelosophical88 commented on July 19, 2024

So I guess I'll be using FFMPEG by command then. Thank you for responding.

from goffmpeg.

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.