gifine icon indicating copy to clipboard operation
gifine copied to clipboard

recording doesnt stop when stop button is pressed, ffmpeg needs to be killed manually

Open digitalcreature opened this issue 8 years ago • 9 comments

On Ubuntu 16.04. After clicking Stop Recording, ffmpeg continues to count up frames in terminal, persisting even after closing the application. The process is completely detached from job control and it's parent process, requiring manual SIGKILL'n. Heres a snapshot of the process tree: image

digitalcreature avatar Dec 24 '16 23:12 digitalcreature

Here's the line of code that attempts to quit the ffmpeg process: https://github.com/leafo/gifine/blob/master/gifine/load_window.moon#L92

Here's the kill method for GIO: https://developer.gnome.org/gio/unstable/GSubprocess.html#g-subprocess-force-exit

I'm not sure why it wouldn't stop. What version of ffmpeg do you have?

mine is:

ffmpeg version 3.2.2 Copyright (c) 2000-2016 the FFmpeg developers

leafo avatar Dec 25 '16 00:12 leafo

Also can you run it from the console and see if there's a lua runtime error that's happening

leafo avatar Dec 25 '16 00:12 leafo

image my ffmpeg seems to be an older version; which is strange considering i just ran apt upgrade (come on ubuntu main update yer packages..) lua doesn't seem to be causing any issues; ill try updating ffmpeg

digitalcreature avatar Dec 25 '16 00:12 digitalcreature

FWIW I have ffmpeg version 3.1.5 and I'm having the same problem.

osa1 avatar Dec 25 '16 07:12 osa1

Also seeing this issue: ffmpeg version 3.0.5-0ubuntu0.16.10.1

LiamDawe avatar Dec 27 '16 19:12 LiamDawe

One thing I did notice, was that it did kill ffmpeg when I exported a gif, the only time it actually did it.

LiamDawe avatar Dec 27 '16 19:12 LiamDawe

@LiamDawe Same situation to me. When gifine try to exports on gif you can see how tmp dir increase with frames that shouldn't be there becouse record have stopped but process don't do it... It's a terrible memory issue! ffmpeg version 2.8.10-0ubuntu0.16.04.1

koyal13 avatar Dec 29 '16 12:12 koyal13

Before the program shows the frame editor window it waits for the process it spawned for ffmpeg to terminate. Is it possible that your ffmpeg command is actually a shell script that executes ffmpeg in the background? That's my only guess.

You can do a quick check with file $(which ffmpeg).

In any case, I added a patch that sends a q to stdin, which is how ffmpeg asks to be terminated from recording. So maybe that's better than sending a kill signal to the process. Please give it another shot to see if it works.

You can install the latest code again with the same command you used to install:

luarocks install --server=http://luarocks.org/dev gifine

leafo avatar Dec 31 '16 21:12 leafo

I had the same problem. It is still recording after i pressed/clicked the stop recording. I just recently installed it on ubuntu 16.04

flamendless avatar Jan 02 '17 08:01 flamendless