Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Pgina 1
My 1st Blog
Home Jun 03
va_g729_decoder.exe
So now you have the G729 converted to a PCM file named stream.pcm But the .pcm file contains 16-bit linear PCM samples at 8000 Hz. in Little -Endian format. To convert to .au format, you need to appened the 24 byte au header, and convert each PCM sample to network byte order (or Big-Endian). The following Perl Script as present on Wikeshak wiki page will be used to do the conversion
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
# # USAGE: perl pcm2au.pl inputFile outputFile $usage = "Usage: 'perl $0 <source PCM File > <destination AU File>' "; $srcFile = shift @ARGV || die $usage; $dstFile = shift @ARGV || die $usage; open(SRCFILE, "$srcFile") || die "Unable to open file : $!\n"; binmode SRCFILE; open(DSTFILE, "> $dstFile") || die "Unable to open file: $!\n"; binmode DSTFILE; ################################### # Write the AU header ################################### print DSTFILE ".snd";
$foo = pack ("CCCC", 0,0,0,24); print DSTFILE $foo; $foo = pack ("CCCC", 0xff,0xff,0xff,0xff); print DSTFILE $foo; $foo = pack ("CCCC", 0,0,0,3); print DSTFILE $foo; $foo = pack ("CCCC", 0,0,0x1f,0x40);
http://www.wapopia.com/blog/2010/06/03/decode-and-play-g729-on-windows/
30/05/2011 16:19:27
Pgina 2
print DSTFILE
$foo;
############################# # swap the PCM samples ############################# while (read (SRCFILE, $inWord, 2) == 2) { @bytes = unpack('CC ', $inWord); $outWord = pack('CC', $bytes[1], $bytes[0]); print DSTFILE $outWord; } close(DSTFILE); close(SRCFILE);
Copy and save the above script in a text file named pcm 2au.pl in C:\g729de Google for Strawberry Perl and install in on your PC Now again fire -up the command prompt cd to C:\g729de And issue the following command
perl pcm2au.pl stream.pcm steream.au
And thats it , now you have successfully decoded the G729 on your Windows Computer and can play the stream.au file using any player like Windows Media Player or VLC player Related posts: 1. 2. 3. 4. 5. 6. How to run a FTP script in Windows? Not only Windows has a built-in command line FTP utility... Play mp3 in Linux If you want to play MP3s in Linux than a. .. Creating Tar.gz files in Windows You can open and extract the content from gzipped in... Windows Standby / Hibernation & Network Connections Disappear I had been having this problems for many months, whenever... Windows reboots during booting Once again Windows Troubles, last week I turned off the... How to Show arp entries in Windows arp a Displays the ARP entries in Windows by checking...
Address: http://www.wapopia .com/blog/2010/06/03/decode-and-play-g729-on-windows/ Unlimited Long Distance Calling Tip : Detecting RTP Streams in Wireshark Trackback
I cant decode with the perl command, it just open a window Windows Cannot Execute the Program .. 2. Pat @ 2010-06-09 22:51
There is a problem with line 12 of the script. It should read open(DSTFILE, > $dstFile) Looks like HTML has screwed this up 3. the imax @ 2010-06-10 05:57
@Anderson Have you installed Strawberry Perl ? @Pat Thanks for the tip , I have fixed that up
http://www.wapopia.com/blog/2010/06/03/decode-and-play-g729-on-windows/
30/05/2011 16:19:27
Pgina 3
Hi, Ran the command, and got the following error message >perl pcm2au.pl stream.pcm stream.au Search pattern no terminated at pcm2au.pl line 49. 5. the imax @ 2010-06-20 16:04
@Charles Sorry, WYSIWYG had messed up the code, please again copy the perl code from above and save it to the pcm 2au.pl file. conversion will work now
Submit
Recent Comments
Mohamed on How to Copy Text from Nokia Symbian Browser ? Pam on Download USBSTOR.SYS Gamal3434 on Nokia E72 VoIP Settings Sameer on Nokia E72 VoIP Settings Jordan Enriquez on SIM Card Rejected Nokia
Recent Posts
Pure-Ftpd Unix Authentication Search and replace text in all files in Sub directories Manage Music in Linux cellular Mobile Phone Technologies used in US Turn off & Disable Google Search Preview Recover iPad, iPod, iPhone Backup password How to save iPhone Battery Nokia 1800 Features, Review & Price iPhone 4 vs Samsung Captivate How to reset Samsung t239
Blogroll
OpenSolaris Tech FAQs
Archives
December 2010 November 2010
http://www.wapopia.com/blog/2010/06/03/decode-and-play-g729-on-windows/
30/05/2011 16:19:27
Decode and Play G729 on Windows October 2010 September 2010 August 2010 July 2010 June 2010 May 2010 February 2010 January 2010 December 2009 November 2009 October 2009 September 2009 August 2009 July 2009 June 2009 May 2009 April 2009 March 2009 February 2009 January 2009 December 2008 November 2008 September 2008 August 2008 June 2008 May 2008 April 2008 March 2008 February 2008 January 2008 December 2007 September 2007 August 2007 July 2007 June 2007 May 2007 December 2006 October 2006 September 2006 August 2006 May 2006 April 2006 March 2006 January 2006 December 2005 November 2005 October 2005 September 2005 My 1st Blog coogee theme 2008 RSS Feed WordPress TOP
Pgina 4
http://www.wapopia.com/blog/2010/06/03/decode-and-play-g729-on-windows/
30/05/2011 16:19:27