[Freeswitch-dev] question on file format codec
Anthony Minessale
anthony.minessale at gmail.com
Fri Aug 31 21:28:11 MSD 2012
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> 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> 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> 写道:
>
>> yes, currently the fsv format expects L16 audio
>>
>> On Thu, Aug 30, 2012 at 4:00 AM, Seven Du <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
>>> 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
>>> 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
>> GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
>> IRC: irc.freenode.net #freeswitch
>>
>> FreeSWITCH Developer Conference
>> sip:888 at conference.freeswitch.org
>> googletalk:conf+888 at conference.freeswitch.org
>> pstn:+19193869900
>>
>> _________________________________________________________________________
>> Professional FreeSWITCH Consulting Services:
>> 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
>> 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
> 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
> 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
> 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
> 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
> 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
> 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
GTALK/JABBER/PAYPAL:anthony.minessale at gmail.com
IRC: irc.freenode.net #freeswitch
FreeSWITCH Developer Conference
sip:888 at conference.freeswitch.org
googletalk:conf+888 at conference.freeswitch.org
pstn:+19193869900
Join us at ClueCon 2011 Aug 9-11, 2011
More information about the FreeSWITCH-dev
mailing list