[cisco-voip] RAW File Converter
Jeffrey Ollie
jeff at ocjtech.us
Thu Oct 29 12:21:27 EDT 2009
On Thu, Oct 29, 2009 at 8:22 AM, Wes Sisk <wsisk at cisco.com> wrote:
> nice command. as ringers have to be shorter than a certain duration is
> there another switch to truncate to the needed duration?
You can't easily add that to the command line, but by using the
GStreamer Python bindings you can create a short little script to do
the work for you. I've attached the script, it's a little too long to
put inline. It's using elements from GNonLin, which are plugins for
the GStreamer framework for non-linear editing.
The script works thusly:
cisco_ringtone_convert source.wav destination.raw
which will encode the first 2.01 seconds of the source file and store
it in the destination.
You can use the '--start' and/or '--duration' arguments to pick the
part of the audio file that gets converted:
cisco_ringtone_convert --start 60.0 --duration 0.75 source.wav destination.raw
which will encode 0.75 seconds of audio starting 60 seconds into the
file. You can feed the script pretty much any file that GStreamer
supports, it should even be able to extract the audio from a video.
--
Jeff Ollie
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cisco_ringtone_convert
Type: application/octet-stream
Size: 5212 bytes
Desc: not available
URL: <https://puck.nether.net/pipermail/cisco-voip/attachments/20091029/7b64e8be/attachment.obj>
More information about the cisco-voip
mailing list