Motion - Support Question 2005x 04x 16x 144132

Next day Re-record a mpeg movie with the same filename


If have configured motion so that it will save every hour a mpeg movie. (Like movie-%He-hour) That works fine. But the next day it appends the recording instead of overwriting the file. What must I do to overwrite the file instead of appending it.


Motion version: 3.2.1-snap10
ffmpeg version: 0.4.9pre1
Libraries: curl, xmlrpc, ffmpeg, postgresql
Server OS: fedora core 1, kernel 2.4.199

-- MartijnZuiderwijk - 16 Apr 2005


This is not an error. It is a feature. The timelapse feature is made to append if the new filename is the same as the previous.

The reason is if Motion is stopped for a while (fails or machine booted) the idea is that Motion continues where it left.

To delete the file you need to ensure that the file gets a new name. You do this my letting the date be part of the filename. Or the week day.

Every night or every week you can let cron run a script that deletes the older files.

I believe the on_movie_start and on_movie_end also runs when timelapse movie ends. You can let such scripts delete an older file. You can also let it create a link to the latest file. You can do anything you need using cron and on_xxxx features. The only thing I could not easily do was append with external programs so this is why this is the designed behavour of Motion which has been requested by users.

Note that latest motion-3.2.1 snap is 13 with 14 comming soon containing authentication of the control http access.

Note that since snap 11 the onxxxx options have been renamed and improved. (OnXxxxFeatureDiscussion)

-- KennethLavrsen - 16 Apr 2005
Topic revision: r3 - 16 Apr 2005, KennethLavrsen
Copyright © 1999-2024 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.