Skip to content

arecord --max-file-time behavior #296

Open

Description

@thk686

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.

Activity

  1. JohnSauter commented on Mar 22, 2025

    @JohnSauter
    Contributor

    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.

  2. thk686 commented on Mar 22, 2025

    @thk686
    Author
  3. thk686 commented on Mar 24, 2025

    @thk686
    Author

    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.

  4. JohnSauter commented on Mar 24, 2025

    @JohnSauter
    Contributor

    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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions