Results 1 to 3 of 3

Thread: arecord & file names

  1. #1
    Join Date
    Aug 2008
    Location
    Little Exuma, Bahamas
    Posts
    699

    Default arecord & file names

    I use arecord to record interviews with interesting elderly folks. Yesterday I'd just concluded a 2 hour interview with a delightful 97 year old woman when I carelessly restarted arecord without changing the filename (i.e. I used the up arrow to "recycle" the command line). I realized my mistake immediately, but it was too late.. the interview was lost. The file had already been overwritten.

    Can anyone suggest a command syntax that would generate a unique filename as arecord starts a session? I've tried the suggested example in the man file and as many variations as I can come up with, but I've been unsuccessful.
    Code:
    greyshark@X205:~> arecord -f cd -t wav -max-file-time 3600 --use-strftime %Y/%m/%d/listen-%H-%M-%v.wav
    arecord: invalid option -- 'm'
    Try `arecord --help' for more information.
    Alternatively, can you suggest another program to use? I need something really simple that I can trigger without taking a lot of attention off the interview. (Krecord does not work on this PC)

    (11.4, KDE 4.6.5)
    MS user 1988-2008, Linux user 1998-present, openSUSE user since 2004
    (The first computer I used had a punch card reader)

  2. #2
    Join Date
    Jun 2008
    Location
    UTC+10
    Posts
    9,686
    Blog Entries
    4

    Default Re: arecord & file names

    Use date to generate a unique filename:

    arecord ... $(date '+%Y/%m/%d/listen-%H-%M-1.wav')

    There is no %v in date format specification, you'll have to solve that one. Probably adding seconds is sufficiently unique.

  3. #3
    Join Date
    Aug 2008
    Location
    Little Exuma, Bahamas
    Posts
    699

    Default Re: arecord & file names

    Solved

    Thanx ken_yap. You set me on the right path. I ended up settling on
    Code:
    arecord $(date '+%Y-%m-%d_%H-%M-%s.wav')
    gives me a nice compact file, good since I don't need fidelity to be able to transcribe, and I use the date and time to identify the session and the seconds to ensure the file name is unique.

    Example:
    Code:
    greyshark@X205:~> arecord $(date '+%Y-%m-%d_%H-%M-%s.wav')
    Recording WAVE '2011-08-21_12-54-1313945655.wav' : Unsigned 8 bit, Rate 8000 Hz, Mono
    MS user 1988-2008, Linux user 1998-present, openSUSE user since 2004
    (The first computer I used had a punch card reader)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •