[Vorbis] splitting vorbis files
James M. Rotenberry
rotenber at io.com
Mon Mar 27 07:38:49 PST 2006
Greetings
The Unix application 'wavsilence' is a program that takes a WAV file with
gaps of silence and creates smaller WAV files, containing the data between
the gaps. ( http://danplanet.com/wav/ )
Is there a similar program for ogg vorbis?
How difficult would it be to write such a program?
---------------------------------------------------------------------------
The usage information, as displayed by 'wavsilence -h':
| wavsilence v0.40 - Dan Smith (dsmith at danplanet.com)
| Usage: wavsilence <options>
| Options:
| -g <gap> Minimum gap (in seconds) to be considered silence
| -t <threshold> Volume (in % of Max) to be considered silence
| -v Verbose mode (specify multiple times to increase verbosity)
| -I Print input WAV information
| -e <cmd> Execute <cmd> when each piece is finished, with the filename
| as the last argument
| -r Remove the WAV file after <cmd> (only valid with -e)
| -p Display progress and statistics during operation
| -i <file> Read from <file> instead of stdin
| -n <name> Name output files <name>N
| -l <file> Log summary information in <file>
| -b <num> Buffer input by <num> samples (1 is default; try 16)
| -P <cmd> Pipe output of each segment to <cmd>
| -m <seconds> Minimum track length (in seconds)
| -M <minutes> Minimum track length (in minutes)
| -s Skip silence (remove the silence between pieces)
| -c <num> Counter-start. With this option you can set the initial
| value of the file-number-counter.
| -h Display this message
| Operation:
| WAV file is read via stdin, split at points of silence into files
| named "piece-N.wav" (unless user specified)
An example invocation is:
% ./wavsilence -g 2 -t 4 -b 64 -l log.txt -p -i bigfile.wav
This will search for gaps of >=2s where the volume is <=4% of max. 64
samples will be read at a time (to increase performance). Progress
will be displayed during execution and a summary will be left in the
'log.txt' file when finished.
Regards,
JM Rotenberry
rotenber at io.com
More information about the Vorbis
mailing list