[Freeswitch-dev] question on file format codec

Seven Du dujinfang at gmail.com
Sat Sep 1 07:29:51 MSD 2012


Thanks for explaining and sorry to bring you new questions, hope this is the last for this topic:  

On http://fisheye.freeswitch.org/changelog/freeswitch.git?cs=bdd391e5db830e97eb06a7cea5b1059204e5fcac between lines 697-700 I tried to mux the channels but volume is very very low, or I didn't do right. Any highlights?

Line 703 has good sound but only has one channel.


Question 2:

fav should now support any rate 8000/16000 etc, but the ptime around line 571 is still hard coded. Is it possible to get this from the file handle?  

h.audio_ptime = 20; /* FIXME: hard coded */

Thanks.


On Saturday, September 1, 2012 at 1:28 AM, Anthony Minessale wrote:

> when you have multiple channels it still only uses the len of one
> channel assuming you will multiply that len by the * of channels for
> the real size.
>  
>  
> On Thu, Aug 30, 2012 at 10:15 PM, Seven Du <dujinfang at gmail.com (mailto:dujinfang at gmail.com)> wrote:
> > ok, I figured out when use conference record, handle->channels = 1, but in
> > uuid_record, handle->channels = 2, so the following code did the trick in
> > fsv_file_write, but I'm not sure if it's the write approach. Why the *len is
> > always 160 in both cases? where the other half channel data goes to? I use
> > play_fsv so the playback should be right. Only tested on 8000HZ right now.
> > If the following code is confusing I can submit a full patch. Thanks.
> >  
> >  
> >  
> > uint16_t *x = data;
> >  
> >  
> > if (handle->channels == 2) {
> > /* should we use only one channel ? */
> > for (int i=0; i<160; i++) {
> > x[i] = x[i*2];
> > }
> > }
> >  
> >  
> > --
> > Seven Du
> > Sent with Sparrow
> >  
> > On Friday, August 31, 2012 at 8:34 AM, Anthony Minessale wrote:
> >  
> > Right now it always does raw l16 in any of the io or file funcs
> >  
> > On Aug 30, 2012 7:23 PM, "dujinfang" <dujinfang at gmail.com (mailto:dujinfang at gmail.com)> wrote:
> >  
> > yes, my problem is how to make sure switch_file
> > _write always get L16 data when trigger by uuid_record?
> >  
> > thanks
> >  
> > 发自我的 iPhone
> >  
> > 在 2012-8-31,上午4:36,Anthony Minessale <anthony.minessale at gmail.com (mailto:anthony.minessale at gmail.com)> 写道:
> >  
> > > yes, currently the fsv format expects L16 audio
> > >  
> > > On Thu, Aug 30, 2012 at 4:00 AM, Seven Du <dujinfang at gmail.com (mailto:dujinfang at gmail.com)> wrote:
> > > > Hi,
> > > >  
> > > > If you noticed the video-media-bug branch, I managed to record a video
> > > > file
> > > > with the following methods
> > > >  
> > > > conference 3000 record /tmp/testrecord.fsv
> > > >  
> > > > uuid_record <uuid> start /tmp/testrecord.fsv
> > > >  
> > > >  
> > > > The first command works perfect as conference voice is L16, but the last
> > > > one
> > > > has bad audio I guess because it's PCMU ?.
> > > >  
> > > > I noticed a SWITCH_FILE_NATIVE flags which is supposed to disable
> > > > transcoding but in my case in mod_fsv the flag is not set so should it
> > > > transcode to L16 before writing to the fsv file?
> > > >  
> > > > Thanks.
> > > >  
> > > > --
> > > > Seven Du
> > > > Sent with Sparrow
> > > >  
> > > >  
> > > > _________________________________________________________________________
> > > > Professional FreeSWITCH Consulting Services:
> > > > consulting at freeswitch.org (mailto:consulting at freeswitch.org)
> > > > http://www.freeswitchsolutions.com
> > > >  
> > > > 
> > > > 
> > > >  
> > > > Official FreeSWITCH Sites
> > > > http://www.freeswitch.org
> > > > http://wiki.freeswitch.org
> > > > http://www.cluecon.com
> > > >  
> > > > FreeSWITCH-dev mailing list
> > > > FreeSWITCH-dev at lists.freeswitch.org (mailto:FreeSWITCH-dev at lists.freeswitch.org)
> > > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> > > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> > > > http://www.freeswitch.org
> > > >  
> > >  
> > >  
> > >  
> > >  
> > > --
> > > Anthony Minessale II
> > >  
> > > FreeSWITCH http://www.freeswitch.org/
> > > ClueCon http://www.cluecon.com/
> > > Twitter: http://twitter.com/FreeSWITCH_wire
> > >  
> > > AIM: anthm
> > > MSN:anthony_minessale at hotmail.com (mailto:anthony_minessale at hotmail.com)
> > > GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com (mailto:anthony.minessale at gmail.com)
> > > IRC: irc.freenode.net (http://irc.freenode.net) #freeswitch
> > >  
> > > FreeSWITCH Developer Conference
> > > sip:888 at conference.freeswitch.org (mailto:888 at conference.freeswitch.org)
> > > googletalk:conf+888 at conference.freeswitch.org (mailto:conf+888 at conference.freeswitch.org)
> > > pstn:+19193869900
> > >  
> > > _________________________________________________________________________
> > > Professional FreeSWITCH Consulting Services:
> > > consulting at freeswitch.org (mailto:consulting at freeswitch.org)
> > > http://www.freeswitchsolutions.com
> > >  
> > > 
> > > 
> > >  
> > > Official FreeSWITCH Sites
> > > http://www.freeswitch.org
> > > http://wiki.freeswitch.org
> > > http://www.cluecon.com
> > >  
> > > FreeSWITCH-dev mailing list
> > > FreeSWITCH-dev at lists.freeswitch.org (mailto:FreeSWITCH-dev at lists.freeswitch.org)
> > > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> > > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> > > http://www.freeswitch.org
> > >  
> >  
> >  
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org (mailto:consulting at freeswitch.org)
> > http://www.freeswitchsolutions.com
> >  
> > 
> > 
> >  
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >  
> > FreeSWITCH-dev mailing list
> > FreeSWITCH-dev at lists.freeswitch.org (mailto:FreeSWITCH-dev at lists.freeswitch.org)
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> > http://www.freeswitch.org
> >  
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org (mailto:consulting at freeswitch.org)
> > http://www.freeswitchsolutions.com
> >  
> > 
> > 
> >  
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >  
> > FreeSWITCH-dev mailing list
> > FreeSWITCH-dev at lists.freeswitch.org (mailto:FreeSWITCH-dev at lists.freeswitch.org)
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> > http://www.freeswitch.org
> >  
> >  
> >  
> > _________________________________________________________________________
> > Professional FreeSWITCH Consulting Services:
> > consulting at freeswitch.org (mailto:consulting at freeswitch.org)
> > http://www.freeswitchsolutions.com
> >  
> > 
> > 
> >  
> > Official FreeSWITCH Sites
> > http://www.freeswitch.org
> > http://wiki.freeswitch.org
> > http://www.cluecon.com
> >  
> > FreeSWITCH-dev mailing list
> > FreeSWITCH-dev at lists.freeswitch.org (mailto:FreeSWITCH-dev at lists.freeswitch.org)
> > http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> > UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> > http://www.freeswitch.org
> >  
>  
>  
>  
>  
> --  
> Anthony Minessale II
>  
> FreeSWITCH http://www.freeswitch.org/
> ClueCon http://www.cluecon.com/
> Twitter: http://twitter.com/FreeSWITCH_wire
>  
> AIM: anthm
> MSN:anthony_minessale at hotmail.com (mailto:anthony_minessale at hotmail.com)
> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com (mailto:anthony.minessale at gmail.com)
> IRC: irc.freenode.net (http://irc.freenode.net) #freeswitch
>  
> FreeSWITCH Developer Conference
> sip:888 at conference.freeswitch.org (mailto:888 at conference.freeswitch.org)
> googletalk:conf+888 at conference.freeswitch.org (mailto:conf+888 at conference.freeswitch.org)
> pstn:+19193869900
>  
> _________________________________________________________________________
> Professional FreeSWITCH Consulting Services:
> consulting at freeswitch.org (mailto:consulting at freeswitch.org)
> http://www.freeswitchsolutions.com
>  
> 
> 
>  
> Official FreeSWITCH Sites
> http://www.freeswitch.org
> http://wiki.freeswitch.org
> http://www.cluecon.com
>  
> FreeSWITCH-dev mailing list
> FreeSWITCH-dev at lists.freeswitch.org (mailto:FreeSWITCH-dev at lists.freeswitch.org)
> http://lists.freeswitch.org/mailman/listinfo/freeswitch-dev
> UNSUBSCRIBE:http://lists.freeswitch.org/mailman/options/freeswitch-dev
> http://www.freeswitch.org
>  
>  


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freeswitch.org/pipermail/freeswitch-dev/attachments/20120901/46b74215/attachment-0001.html 


Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev mailing list