Coder Social home page Coder Social logo

Comments (6)

igracia avatar igracia commented on June 28, 2024

@bramp Could this be related with #76?

from ffmpeg-cli-wrapper.

igracia avatar igracia commented on June 28, 2024

More failed tests with similar results

  • [1:0]adelay=10000[t1];[t1]amix=inputs=1 (remove the pipe |)
  • [1:0]adelay=10000[t1],[t1]amix=inputs=1 (replace the semicolon ;)

The last filter would allow us to run from the command line as ffmpeg -y -v error -i video.trk -i audio.trk -filter_complex [1:0]adelay=10000[t1],[t1]amix=inputs=1 -c:v copy out.webm, but both produce wrong output when run from a Java program.

from ffmpeg-cli-wrapper.

igracia avatar igracia commented on June 28, 2024

It seems like it is related to how ProcessBuilder handles those args, and the fact that certain args have to be escaped. I've managed to get it working with this workaround

ffmpeg = new ProcessBuilder(
                    new String[] { "/bin/sh", "-c", "/usr/local/bin/ffmpeg " + argsStr })
                            .redirectErrorStream(true).start();

Not sure the "/bin/sh" , "-c" is something you want to have there. Should I upload a PR?

from ffmpeg-cli-wrapper.

igracia avatar igracia commented on June 28, 2024

@bramp Would you accept a pull request with this modification?

from ffmpeg-cli-wrapper.

bramp avatar bramp commented on June 28, 2024

There are a lot of Windows users of this library, so I wouldn't want to put a Linux specific fix in place. I will accept pull requests to fix this in a generic way.

from ffmpeg-cli-wrapper.

bramp avatar bramp commented on June 28, 2024

I just read more about the failings in how java handles character escaping. http://bugs.java.com/view_bug.do?bug_id=6468220 and http://bugs.java.com/view_bug.do?bug_id=6518827

It might be worth using https://commons.apache.org/proper/commons-exec/index.html instead of the process builder. Happy to accept that pull request.

from ffmpeg-cli-wrapper.

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.