Motion - Bug Report 2005x 01x 06x 181426

BUG: Feature: wrap up mpeg4 file at ^C

When mencoder (of the Mplayer package) is encoding and the user presses ^C, mencoder completes the file gracefully and exits only then, thus leaving behind a non-broken output file. It would be good if motion worked this way also. It seems to work very reliably on mencoder, so while perhaps kludgish, it can be made to work nicely in practice.

Environment

Motion version: 3.1.17
Shared libraries:  
Server OS:  

-- SamuliKaerkkaeinen - 06 Jan 2005

Follow up

Fix record

I will consider if this can be done better. Motion is mainly meant to run as a daemon and then it ormally gets stopped either by xmlrpc or the kill command. Maybe I can find out if any ffmpeg files are open and need to be closed.

-- KennethLavrsen - 10 Jan 2005

I haven't tested this, but I think adding signal(SIGINT, sig_handler); to around line 482 in motion.c would solve the problem. SIGINT is sent when the user presses ^C, and the signal is already taken care of in sig_handler.

-- PerJonsson - 14 Jan 2005

Yes. That works. I have included this fix in MotionRelease3x1x18snap10.

-- KennethLavrsen - 15 Jan 2005
Topic revision: r6 - 30 Jan 2005, KennethLavrsen
Copyright © 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Please do not email Kenneth for support questions (read why). Use the Support Requests page or join the Mailing List.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.