docker-ffmpeg icon indicating copy to clipboard operation
docker-ffmpeg copied to clipboard

[BUG] Cannot terminate/signal `ffmpeg` process in container

Open strarsis opened this issue 1 year ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Current Behavior

It is not possible to signal the ffmpeg process inside the container (probably because of the wrapper shell script). This is required for cleanly terminating ffmpeg inside the container (and the container) itself (ffmpeg handling disconnections, etc.).

Expected Behavior

Process signals correctly passed to ffmpeg process inside container.

Steps To Reproduce

  1. Start a container from linuxserver/ffmpeg image.
  2. Use docker kill to send a signal to ffmpeg to cleanly shut down.
  3. Note that the signal is not handled, ffmpeg and the container continues running.
  4. Attach shell in running container.
  5. Send termination signal using Ctrl + c, note that it is not handled by ffmpeg but by shell script/Docker instead.

Environment

- OS: `Ubuntu 22.04.5 LTS`
- How docker service was installed: By official `docker` package.

Docker creation

Default docker run test command.

Container logs

got 3 SIGTERM/SIGINTs, forcefully exiting

strarsis avatar Sep 23 '24 13:09 strarsis

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

github-actions[bot] avatar Sep 23 '24 13:09 github-actions[bot]

Can you give this test image a try? lsiodev/ffmpeg:7.0.2-cli-pkg-85b1e43f-dev-2f3a3ee9b1d99fb5cdad454804a22c6759218881

Built off of https://github.com/linuxserver/docker-ffmpeg/tree/exec

aptalca avatar Sep 23 '24 15:09 aptalca

@aptalca: Yes, this fixed the issue. Ctrl+C terminates ffmpeg.

strarsis avatar Sep 24 '24 11:09 strarsis