Marc Leurent
2009-Sep-09 14:33 UTC
[asterisk-users] CLI file convert from alaw to g729 with TC400B transcoding card results to an empty file
Good afternoon, I'm trying to use the CLI command file convert on an Asterisk 1.4.26 server with a TC400B transcoding card. The transcoding card is working well for calls but I have some trouble converting sound files from alaw to g729. The command creates empty file as you can see below... CLI> file convert /var/lib/asterisk/sounds/fr/service_notactivated.alaw /var/lib/asterisk/sounds/fr/service_notactivated.g729 (SCREEN):root at nutella:[/var/../fr]# file service_notactivated* service_notactivated.alaw: RIFF (little-endian) data, WAVE audio, ITU G.711 A-law, mono 8000 Hz service_notactivated.g729: empty service_notactivated.gsm: data I was able to create the gsm file with the command, but the g729 one is empty. Have you got any idea how I can solve this? Thanks PS: I'm able to place call in g729 without problem and the TC400B works well -- -- -- Marc LEURENT lftsy at leurent.eu
Shaun Ruffell
2009-Sep-09 17:32 UTC
[asterisk-users] CLI file convert from alaw to g729 with TC400B transcoding card results to an empty file
On 09/09/2009 09:33 AM, Marc Leurent wrote:> Good afternoon, > I'm trying to use the CLI command file convert on an Asterisk 1.4.26 server with a TC400B transcoding card. > The transcoding card is working well for calls but I have some trouble converting sound files from alaw to g729. The command creates empty > file as you can see below... > > CLI> file convert /var/lib/asterisk/sounds/fr/service_notactivated.alaw /var/lib/asterisk/sounds/fr/service_notactivated.g729 > > (SCREEN):root at nutella:[/var/../fr]# file service_notactivated* > service_notactivated.alaw: RIFF (little-endian) data, WAVE audio, ITU G.711 A-law, mono 8000 Hz > service_notactivated.g729: empty > service_notactivated.gsm: data > > I was able to create the gsm file with the command, but the g729 one is empty. Have you got any idea how I can solve this? > Thanks > PS: I'm able to place call in g729 without problem and the TC400B works well >The problem is that 'convert' finishes when it receives back a NULL frame. For the software based codecs, this isn't a problem because the transcoding happens synchronously with the caller. However, codec_dahdi doesn't block the caller while the hardware is transcoding the audio, and therefore can return NULL frames if the hardware hasn't had enough time to transcode the frame. Probably what is needed is a standalone utility in dahdi-tools that can be used to transcode audio files with the hardware. Cheers, -- Shaun Ruffell Digium, Inc. | Linux Kernel Developer 445 Jan Davis Drive NW - Huntsville, AL 35806 - USA Check us out at: www.digium.com & www.asterisk.org