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

When the SIGKILL is sent the process does not exit. #1303

Open
1 of 3 tasks
JaroslawPokropinski opened this issue Nov 6, 2024 · 1 comment
Open
1 of 3 tasks

When the SIGKILL is sent the process does not exit. #1303

JaroslawPokropinski opened this issue Nov 6, 2024 · 1 comment

Comments

@JaroslawPokropinski
Copy link

When the SIGKILL is sent the process does not exit. I tried using stream as an input.
I tried downgrading to 2.0.1 where I get an error but the process does not finish anyways.

Version information

  • fluent-ffmpeg version: 2.1.3
  • ffmpeg version: 7.1
  • OS: Windows 11

Code to reproduce

const command = ffmpeg(this.streamUrl)
      .on("error", (error) => console.log(`Encoding Error: ${error.message}`))
      .on("end", () => console.log("Video Transcoding succeeded !"))
      .save(filePath);

  setTimeout(() => {
    command.kill("SIGKILL");
    console.log(`Saved recording`);
  }, 500);

(note: if the problem only happens with some inputs, include a link to such an input file)

Expected results

The process is killed, an error is thrown.

Observed results

No error is caught, the process is still alive and the file is still written to.

Checklist

  • I have read the FAQ
  • I tried the same with command line ffmpeg and it works correctly (hint: if the problem also happens this way, this is an ffmpeg problem and you're not reporting it to the right place)
  • I have included full stderr/stdout output from ffmpeg
@JaroslawPokropinski
Copy link
Author

image
After looking a little bit further it seems that this version of ffmpeg spawns a process group and only one of the processes dies on kill.
As a workaround i used spawn and the solution suggested here: https://medium.com/@almenon214/killing-processes-with-node-772ffdd19aad

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

1 participant