[Freeswitch-dev] Audio formats without transcoding
I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem? Thanks.
yes, you can use mod_native_file. Mike On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:
I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem?
Unfortunately mod_native_file hasn't been documented on the wiki yet. I'm going to work on that. However, the gist of it is this: if you have a file in the proper format, such as g711, then you can specify the file name w/o the extension and FreeSWITCH will pick the right one for the codec being used. You'll need to make sure that your file names have the proper extensions, like .pcmu for mu-law. A complete list is available here: http://www.iana.org/assignments/media-types/audio/ so if you have these files: /tmp/hello.wav /tmp/hello.pcmu /tmp/hello.gsm /tmp/hello.g729 you can specify the exact file name, in which case FS will play the file and do whatever transcoding is needed. Or you can specify the filename without the extension and FS will pick the appropriate one: <action application="playback" data="/tmp/hello"/> Look for an update on the wiki in the next day or two. In the meantime please report back if you have any issues. -MC On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris <mike@jerris.com> wrote:
yes, you can use mod_native_file.
Mike
On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:
I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem?
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Michael, let's say G722 isn't found, but .wav is, will FS revert to using the .wav file and transcode if the file extension is not specified in playback? I will be creating a script to convert any file using sox to every specified format so we can avoid transcoding as much as possible. The script will appear at http://wiki.freeswitch.org/wiki/Mod_native_file anytime soon. El mar, 09-12-2008 a las 08:34 -0800, Michael Collins escribió:
Unfortunately mod_native_file hasn't been documented on the wiki yet. I'm going to work on that. However, the gist of it is this: if you have a file in the proper format, such as g711, then you can specify the file name w/o the extension and FreeSWITCH will pick the right one for the codec being used. You'll need to make sure that your file names have the proper extensions, like .pcmu for mu-law. A complete list is available here: http://www.iana.org/assignments/media-types/audio/
so if you have these files: /tmp/hello.wav /tmp/hello.pcmu /tmp/hello.gsm /tmp/hello.g729
you can specify the exact file name, in which case FS will play the file and do whatever transcoding is needed. Or you can specify the filename without the extension and FS will pick the appropriate one:
<action application="playback" data="/tmp/hello"/>
Look for an update on the wiki in the next day or two. In the meantime please report back if you have any issues.
-MC
On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris <mike@jerris.com> wrote:
yes, you can use mod_native_file.
Mike
On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:
I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem?
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
BTW, what are you planning to use to convert WAV files to G.722? On Fri, Jan 2, 2009 at 9:38 AM, Mikael A. Bjerkeland <mikael@bjerkeland.com>wrote:
Michael,
let's say G722 isn't found, but .wav is, will FS revert to using the .wav file and transcode if the file extension is not specified in playback?
I will be creating a script to convert any file using sox to every specified format so we can avoid transcoding as much as possible. The script will appear at http://wiki.freeswitch.org/wiki/Mod_native_file anytime soon.
El mar, 09-12-2008 a las 08:34 -0800, Michael Collins escribió:
Unfortunately mod_native_file hasn't been documented on the wiki yet. I'm going to work on that. However, the gist of it is this: if you have a file in the proper format, such as g711, then you can specify the file name w/o the extension and FreeSWITCH will pick the right one for the codec being used. You'll need to make sure that your file names have the proper extensions, like .pcmu for mu-law. A complete list is available here: http://www.iana.org/assignments/media-types/audio/
so if you have these files: /tmp/hello.wav /tmp/hello.pcmu /tmp/hello.gsm /tmp/hello.g729
you can specify the exact file name, in which case FS will play the file and do whatever transcoding is needed. Or you can specify the filename without the extension and FS will pick the appropriate one:
<action application="playback" data="/tmp/hello"/>
Look for an update on the wiki in the next day or two. In the meantime please report back if you have any issues.
-MC
On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris <mike@jerris.com> wrote:
yes, you can use mod_native_file.
Mike
On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:
I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem?
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Haven't thought of that. I suppose as you are asking this question since sox doesn't support converting to or from G.722? If that's the case and you figure out how we could do this please let me know. El vie, 02-01-2009 a las 11:41 -0200, Juan Jose Comellas escribió:
BTW, what are you planning to use to convert WAV files to G.722?
On Fri, Jan 2, 2009 at 9:38 AM, Mikael A. Bjerkeland <mikael@bjerkeland.com> wrote: Michael,
let's say G722 isn't found, but .wav is, will FS revert to using the .wav file and transcode if the file extension is not specified in playback?
I will be creating a script to convert any file using sox to every specified format so we can avoid transcoding as much as possible. The script will appear at http://wiki.freeswitch.org/wiki/Mod_native_file anytime soon.
El mar, 09-12-2008 a las 08:34 -0800, Michael Collins escribió:
> Unfortunately mod_native_file hasn't been documented on the wiki yet. > I'm going to work on that. However, the gist of it is this: if you > have a file in the proper format, such as g711, then you can specify > the file name w/o the extension and FreeSWITCH will pick the right one > for the codec being used. You'll need to make sure that your file > names have the proper extensions, like .pcmu for mu-law. A complete > list is available here: > http://www.iana.org/assignments/media-types/audio/ > > so if you have these files: > /tmp/hello.wav > /tmp/hello.pcmu > /tmp/hello.gsm > /tmp/hello.g729 > > you can specify the exact file name, in which case FS will play the > file and do whatever transcoding is needed. Or you can specify the > filename without the extension and FS will pick the appropriate one: > > <action application="playback" data="/tmp/hello"/> > > Look for an update on the wiki in the next day or two. In the meantime > please report back if you have any issues. > > -MC > > On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris <mike@jerris.com> wrote: > > yes, you can use mod_native_file. > > > > Mike > > > > On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote: > > > >> I need to support calls using G.711, G.729 and G.722 and I want to > >> avoid transcoding as much as possible. Does FreeSWITCH support playing > >> audios in a raw format that does not require transcoding for any of > >> these codecs? It looks like FS provides WAV audio files with the > >> frequencies of the supported codecs and relies on transcoding all the > >> time. Is my analysis correct? How does everybody else handle this > >> problem? > > > > > > _______________________________________________ > > Freeswitch-dev mailing list > > Freeswitch-dev@lists.freeswitch.org > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > > http://www.freeswitch.org > > > > _______________________________________________ > Freeswitch-dev mailing list > Freeswitch-dev@lists.freeswitch.org > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev > http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
From my experience if the native file format is not found then it will not play anything, but will show a file not found error. -MC Sent from my iPhone On Jan 2, 2009, at 3:38 AM, "Mikael A. Bjerkeland" <mikael@bjerkeland.com
wrote:
Michael,
let's say G722 isn't found, but .wav is, will FS revert to using the .wav file and transcode if the file extension is not specified in playback?
I will be creating a script to convert any file using sox to every specified format so we can avoid transcoding as much as possible. The script will appear at http://wiki.freeswitch.org/wiki/Mod_native_file anytime soon.
El mar, 09-12-2008 a las 08:34 -0800, Michael Collins escribió:
Unfortunately mod_native_file hasn't been documented on the wiki yet. I'm going to work on that. However, the gist of it is this: if you have a file in the proper format, such as g711, then you can specify the file name w/o the extension and FreeSWITCH will pick the right one for the codec being used. You'll need to make sure that your file names have the proper extensions, like .pcmu for mu-law. A complete list is available here: http://www.iana.org/assignments/media-types/audio/
so if you have these files: /tmp/hello.wav /tmp/hello.pcmu /tmp/hello.gsm /tmp/hello.g729
you can specify the exact file name, in which case FS will play the file and do whatever transcoding is needed. Or you can specify the filename without the extension and FS will pick the appropriate one:
<action application="playback" data="/tmp/hello"/>
Look for an update on the wiki in the next day or two. In the meantime please report back if you have any issues.
-MC
On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris <mike@jerris.com> wrote:
yes, you can use mod_native_file.
Mike
On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:
I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem?
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
Hmm, what about setting a channel variable to change this behaviour? I might be off track, but shouldn't the file be transcoded if that's the only way to play it? El vie, 02-01-2009 a las 07:09 -0800, Michael S Collins escribió:
From my experience if the native file format is not found then it will not play anything, but will show a file not found error.
-MC
Sent from my iPhone
On Jan 2, 2009, at 3:38 AM, "Mikael A. Bjerkeland" <mikael@bjerkeland.com
wrote:
Michael,
let's say G722 isn't found, but .wav is, will FS revert to using the .wav file and transcode if the file extension is not specified in playback?
I will be creating a script to convert any file using sox to every specified format so we can avoid transcoding as much as possible. The script will appear at http://wiki.freeswitch.org/wiki/Mod_native_file anytime soon.
El mar, 09-12-2008 a las 08:34 -0800, Michael Collins escribió:
Unfortunately mod_native_file hasn't been documented on the wiki yet. I'm going to work on that. However, the gist of it is this: if you have a file in the proper format, such as g711, then you can specify the file name w/o the extension and FreeSWITCH will pick the right one for the codec being used. You'll need to make sure that your file names have the proper extensions, like .pcmu for mu-law. A complete list is available here: http://www.iana.org/assignments/media-types/audio/
so if you have these files: /tmp/hello.wav /tmp/hello.pcmu /tmp/hello.gsm /tmp/hello.g729
you can specify the exact file name, in which case FS will play the file and do whatever transcoding is needed. Or you can specify the filename without the extension and FS will pick the appropriate one:
<action application="playback" data="/tmp/hello"/>
Look for an update on the wiki in the next day or two. In the meantime please report back if you have any issues.
-MC
On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris <mike@jerris.com> wrote:
yes, you can use mod_native_file.
Mike
On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:
I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem?
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
That's a reasonable expectation. However, if there is more than one file format from which the sound could be played then a decision must be made as to which one to use. You could default to .wav and hope that there's a .wav file present or you could create a logic tree that looks for various file types and chooses the most appropriate under the circumstances. Most likely you'd need more than just a channel variable - you'd need to do a small script in your preferred language, be it Lua, Perl, Python, JavaScript... -MC On Fri, Jan 2, 2009 at 7:38 AM, Mikael A. Bjerkeland <mikael@bjerkeland.com>wrote:
Hmm, what about setting a channel variable to change this behaviour? I might be off track, but shouldn't the file be transcoded if that's the only way to play it?
El vie, 02-01-2009 a las 07:09 -0800, Michael S Collins escribió:
From my experience if the native file format is not found then it will not play anything, but will show a file not found error.
-MC
Sent from my iPhone
On Jan 2, 2009, at 3:38 AM, "Mikael A. Bjerkeland" < mikael@bjerkeland.com
wrote:
Michael,
let's say G722 isn't found, but .wav is, will FS revert to using the .wav file and transcode if the file extension is not specified in playback?
I will be creating a script to convert any file using sox to every specified format so we can avoid transcoding as much as possible. The script will appear at http://wiki.freeswitch.org/wiki/Mod_native_file anytime soon.
El mar, 09-12-2008 a las 08:34 -0800, Michael Collins escribió:
Unfortunately mod_native_file hasn't been documented on the wiki yet. I'm going to work on that. However, the gist of it is this: if you have a file in the proper format, such as g711, then you can specify the file name w/o the extension and FreeSWITCH will pick the right one for the codec being used. You'll need to make sure that your file names have the proper extensions, like .pcmu for mu-law. A complete list is available here: http://www.iana.org/assignments/media-types/audio/
so if you have these files: /tmp/hello.wav /tmp/hello.pcmu /tmp/hello.gsm /tmp/hello.g729
you can specify the exact file name, in which case FS will play the file and do whatever transcoding is needed. Or you can specify the filename without the extension and FS will pick the appropriate one:
<action application="playback" data="/tmp/hello"/>
Look for an update on the wiki in the next day or two. In the meantime please report back if you have any issues.
-MC
On Tue, Dec 9, 2008 at 7:24 AM, Michael Jerris <mike@jerris.com> wrote:
yes, you can use mod_native_file.
Mike
On Dec 9, 2008, at 9:10 AM, Juan Jose Comellas wrote:
I need to support calls using G.711, G.729 and G.722 and I want to avoid transcoding as much as possible. Does FreeSWITCH support playing audios in a raw format that does not require transcoding for any of these codecs? It looks like FS provides WAV audio files with the frequencies of the supported codecs and relies on transcoding all the time. Is my analysis correct? How does everybody else handle this problem?
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE: http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch- dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
_______________________________________________ Freeswitch-dev mailing list Freeswitch-dev@lists.freeswitch.org http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev http://www.freeswitch.org
participants (5)
-
Juan Jose Comellas
-
Michael Collins
-
Michael Jerris
-
Michael S Collins
-
Mikael A. Bjerkeland