You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I do environmental sound recordings where arecord runs for months to years with --max-file-time set to something like 15 minutes. It is very nice to have this feature, yet there is one aspect that is problematic. It is not simple to know which file is currently being written. One can time stamp the file names and ignore the most recent, which is probably the simplest. Nonetheless, I wonder if it could be the case that the current write file could be named something else, such as the file name but preceded by a . or other indicator, and have it renamed to its intended name once it is closed and arecord has moved on to another file.
I assume you know about --use-strftime which lets you place a time stamp and a file number in the file name. While marking the current output file with a special character would make identifying it a little simpler, the method you describe is almost as simple. I think you will need to make a better case to persuade someone to add this logic. Of course, you could always add it yourself.
Just to follow up on this. Because arecord may have stopped processing, the most recent timestamp in a file name is ambiguous as to whether the file is active. The only method available currently is to wait a timeout past the last modification time of the file and hope that the timeout is long enough and the file system is reporting accurately.
I am not sure what situation you are considering. Do you mean that arecord might fail unexpectedly? If that is what you mean I don't see how having arecord leave a mark in the file name to flag the active file helps, since arecord won't be able to clear that mark if it fails unexpectedly.
Activity
JohnSauter commentedon Mar 22, 2025
I assume you know about --use-strftime which lets you place a time stamp and a file number in the file name. While marking the current output file with a special character would make identifying it a little simpler, the method you describe is almost as simple. I think you will need to make a better case to persuade someone to add this logic. Of course, you could always add it yourself.
thk686 commentedon Mar 22, 2025
thk686 commentedon Mar 24, 2025
Just to follow up on this. Because arecord may have stopped processing, the most recent timestamp in a file name is ambiguous as to whether the file is active. The only method available currently is to wait a timeout past the last modification time of the file and hope that the timeout is long enough and the file system is reporting accurately.
JohnSauter commentedon Mar 24, 2025
I am not sure what situation you are considering. Do you mean that arecord might fail unexpectedly? If that is what you mean I don't see how having arecord leave a mark in the file name to flag the active file helps, since arecord won't be able to clear that mark if it fails unexpectedly.