[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [listener] one file per hour



I would have to look at all the details but you could create a script that would collect all the files for a given hour and create one file, then delete the individual files. The problem with that is you loose the time data as to when a particular sound was recorded.

email me off list and I can give you some suggestions. I have created a radio logging package for the local fire department using listener as a core.

Ted
----- Original Message ----- From: <mark@antistatic.org>
To: <listener@vanheusden.com>
Sent: Wednesday, March 01, 2006 5:33 PM
Subject: [listener] one file per hour




I recently stumbled upon Listener while looking for a way to record scanner audio on my Linux box. Currently I am using XCorder Lite on Windows.


Listener is nice, but I am wondering if anyone know of a way to use only one file per hour (XCorder has this option and it has been very useful to me).

From what I understand, the libsndfile API does not have the option of "appending" WAV data to an existing file, which is why listener makes lots of little files.

I have thought up a number of possibilities:

1) the cheap workaround: a utility that reads and combines all *.wav files per hour into one file. this can be done possibly with the "external script" option. anyone got one of these?

2) the impractical solution: wait for libsndfile to allow appending

3) the dangerous solution: re-open the file for that hour, pipe it into a new temp file, add the current sound data, close the temp file, rename the temp file for that hour. this could be dangerous because it uses a lot of cpu/memory.

4) the practical, but time consuming, solution: re-write parts of listener so that only one file per hour is open, then when there is data, write to it.
when the hour changes, close the file and open a new one.
(so basically, when there is silence, we dont close the file. when there is no silence, we dont open a new file, we just write.)


problems: if listener is killed we need to make sure to close the file properly, otherwise it may not be playable or we may lose the data altogether.

memory usage - in theory, we could use the full 60 minutes of audio.

I know #4 is probably not going to be done by the original writer because it changes a lot of stuff already worked into the program, so I may fiddle with it myself.

Anyone got any other ideas?

-Mark



------------------------------------------------------------------------------------
This message was sent through the Listener mailinglist (www.vanheusden.com/listener)



-- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.1.1/272 - Release Date: 3/1/2006





-- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.375 / Virus Database: 268.1.1/272 - Release Date: 3/1/2006