Thread: [Bash] Sending the TERM Signal to a Process
my question deals ffmpeg. trying cleanly shut down ffmpeg process started in background same way shut down if "q" key pressed while program running in foreground. i've figured out can kill process in background using "kill" command , "$!" variable:
code:nohup ffmpeg -y -f x11grab -r 30 -s 1280x800 -i :0.0 -sameq -vcodec libx264 test.avi > nohup$$.out 2>&1 & p1=$! sleep 5s kill $p1is sending term signal ffmpeg process same pressing "q" key stop encoding, or prematurely shut down program potentially causing problems output? far output videos seem work fine. haven't looked through ffmpeg source code, perhaps should.the default signal kill term.
instead of looking through ffmpeg source code, asking on mailing-lists way simulate press on q key take less time , effort.![]()
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk [SOLVED] [Bash] Sending the TERM Signal to a Process
Ubuntu
Comments
Post a Comment