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

Unable to add -safe 0 argument before input #228

Closed
dsvensson opened this issue Jan 21, 2021 · 1 comment
Closed

Unable to add -safe 0 argument before input #228

dsvensson opened this issue Jan 21, 2021 · 1 comment

Comments

@dsvensson
Copy link

Related to #199, when using absolute paths you need -safe 0 before -f concat which is not possible today.

@Euklios
Copy link
Collaborator

Euklios commented Aug 22, 2024

This should be possible now, thanks to #339.
I'm not sure however, how exactly the "-safe" option is applied.

The code:

new FFmpegBuilder()
            .addExtraArgs("-safe", "0")
            .addInput("in.mp4")
            .setFormat("concat")
            .done()
            .addOutput("out.mp4")
            .done()
            .build()

would produce the command ffmpeg -y -v error -safe 0 -f concat -i in.mp4 out.mp4.
However, -safe is treated as an argument for the entire ffmpeg execution.

The code:

new FFmpegBuilder()
            .addInput("in.mp4")
            .addExtraArgs("-safe", "0")
            .setFormat("concat")
            .done()
            .addOutput("out.mp4")
            .done()
            .build()

Would produce ffmpeg -y -v error -f concat -safe 0 -i in.mp4 out.mp4.

I hope this solves the problem you described here.
If not, please re-open and provide me with a command demonstrating what you'd like to build.
If possible, use two inputs, as this would make the usage of -safe much more clearer.

@Euklios Euklios closed this as completed Aug 22, 2024
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

2 participants