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.
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:
| ffmpeg version:
|| curl, xmlrpc, ffmpeg, postgresql
| Server OS:
|| fedora core 1, kernel 2.4.199
- 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
- 16 Apr 2005