Converting from G.729 to regular ADPCM

Help for Audacity on Windows.
Forum rules
ImageThis forum is for Audacity on Windows.
Please state which version of Windows you are using,
and the exact three-section version number of Audacity from "Help menu > About Audacity".


Audacity 1.2.x and 1.3.x are obsolete and no longer supported. If you still have those versions, please upgrade at https://www.audacityteam.org/download/.
The old forums for those versions are now closed, but you can still read the archives of the 1.2.x and 1.3.x forums.
john3voltas
Posts: 18
Joined: Wed May 31, 2017 2:28 pm
Operating System: Windows 7

Re: Converting from G.729 to regular ADPCM

Post by john3voltas » Wed May 31, 2017 6:08 pm

steve wrote:That file opens fine on my machine.
Hmmm, how intriguing, because in my case (as you can see on my 1st post Audacity log) it simply won't open.
Can you actually hear people talking in a foreign language? Because ffmpeg would error out on this file but still would output a converted file that had noone talking in a perceivable language.
steve wrote:I can't test on Windows right now, but will probably be able to do so tomorrow, so I'll get back to you when I've tried that.
Now, the truth is, I am working on a PortableApps.com latest version of Audacity because my company IT staff doesn't allow us to install software without their consent. Still waiting for them to approve, I thought I could have a go at a portable version. Might it have anything to do with this?
Cheers

john3voltas
Posts: 18
Joined: Wed May 31, 2017 2:28 pm
Operating System: Windows 7

Re: Converting from G.729 to regular ADPCM

Post by john3voltas » Wed May 31, 2017 6:13 pm

Gale Andrews wrote:Try it now. Do you see a PM button under Steve's name?
Thanks Gale.
Gale Andrews wrote:But as per my previous post you don't have standard G.729 files and I somewhat doubt FFmpeg will open G.729 wrapped in WAV.
Well, in fact ffmpeg did open G.729A wrapped in a WAV but the output of it's conversion was corrupted. So maybe it thought it was opening the G.729 fine while it actually wasn't, right?
BTW, how would I unwrap the G.729 out of the WAV?
Cheers

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Converting from G.729 to regular ADPCM

Post by Gale Andrews » Wed May 31, 2017 7:38 pm

john3voltas wrote:Now, the truth is, I am working on a PortableApps.com latest version of Audacity because my company IT staff doesn't allow us to install software without their consent. Still waiting for them to approve, I thought I could have a go at a portable version. Might it have anything to do with this?
I would guess using the "PortableApps" version of Audacity does not make any difference compared to official Audacity, but we don't know because "PortableApps Audacity" is not our project and we don't provide support for it on this Forum.

If your IT policy allows running applications extracted from ZIP files, you could try official Audacity https://www.fosshub.com/Audacity.html/a ... -2.1.3.zip.
john3voltas wrote:in fact ffmpeg did open G.729A wrapped in a WAV but the output of its conversion was corrupted.
That isn't exactly what you said the first time. You said "unable to load".
john3voltas wrote:how would I unwrap the G.729 out of the WAV?
You might be able to do it with FFmpeg at the command-line (-acodec copy) if it can sufficiently understand the file to accept that command, but the problem in any case is that FFmpeg 2.2.2 can't encode G.729. So if you intend to edit these files in Audacity, format conversion will be needed anyway.

I guess Steve has a later version of FFmpeg which may or may not support G.729 in WAV.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Converting from G.729 to regular ADPCM

Post by steve » Wed May 31, 2017 7:54 pm

john3voltas wrote:Can you actually hear people talking in a foreign language?
As you can see, there's some distortion, but yes I can hear a conversation.
firsttrack004.png
firsttrack004.png (12.2 KiB) Viewed 1586 times
Gale Andrews wrote:I guess Steve has a later version of FFmpeg
Yes, I've got FFmpeg 2.8.11
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Converting from G.729 to regular ADPCM

Post by Gale Andrews » Wed May 31, 2017 8:18 pm

Gale Andrews wrote:
john3voltas wrote:how would I unwrap the G.729 out of the WAV?
You might be able to do it with FFmpeg at the command-line (-acodec copy) if it can sufficiently understand the file to accept that command, but the problem in any case is that FFmpeg 2.2.2 can't encode G.729. So if you intend to edit these files in Audacity, format conversion will be needed anyway.
According to https://en.wikipedia.org/wiki/G.729#Licensing G.729 is recently free of patents or royalty-free, and https://ffmpeg.org/general.html#File-Formats claims that FFmpeg could encode G.729 "BIT" (whatever that means) but not G.729 raw.

So that does raise the "possibility" that you could download the latest FFmpeg static library from http://ffmpeg.zeranoe.com/builds/ and point Audacity's Command-line encoder to the FFmpeg.exe in the download to export as G.729. I have not tried it.

For imports, you are still tied to FFmpeg 2.2.2.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

john3voltas
Posts: 18
Joined: Wed May 31, 2017 2:28 pm
Operating System: Windows 7

Re: Converting from G.729 to regular ADPCM

Post by john3voltas » Thu Jun 01, 2017 6:15 am

Gale Andrews wrote:If your IT policy allows running applications extracted from ZIP files, you could try official Audacity https://www.fosshub.com/Audacity.html/a ... -2.1.3.zip.
Yep, our IT policy just states that we cannot install software without previous consent, for which we would need to login with a higher privileged user. In the case of a zip file, I am not installing anything, so I'm not breaking any rules and don't need higher privileges to do so.
So I just downloaded and extracted audacity 2.1.3 from the zip, set it up to English and to use ffmpeg 2.2.2.
Tried to open the G.729 but I get the same error. So I guess it's got nothing to do with the portable version.
Gale Andrews wrote:
john3voltas wrote:in fact ffmpeg did open G.729A wrapped in a WAV but the output of its conversion was corrupted.
That isn't exactly what you said the first time. You said "unable to load".
Wait, I made i unclear with that statement. On the 1st post when we said that I was "unable to load" I meant using Audacity. So, I had Audacity setup to use ffmpeg and it was unable to load the G.729.
On the other hand, my latest sentence says that "in fact ffmpeg did open" whereas in this case I was not using Audacity, I was simply using ffmpeg from the CLI with a "ffmpeg -f g729 -i source.g729 dest.wav". It opened the file, actually did a conversion but the output cannot be cataloged as human speech.
Sorry for having mislead you here.
Gale Andrews wrote:I guess Steve has a later version of FFmpeg which may or may not support G.729 in WAV.
But can I set Audacity to a later ffmpeg library? I tried to point Audacity to ffmpeg 3.3.1 and I couldn't...

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Converting from G.729 to regular ADPCM

Post by Gale Andrews » Thu Jun 01, 2017 3:31 pm

john3voltas wrote:
Gale Andrews wrote:
john3voltas wrote:in fact ffmpeg did open G.729A wrapped in a WAV but the output of its conversion was corrupted.
That isn't exactly what you said the first time. You said "unable to load".
Wait, I made i unclear with that statement. On the 1st post when we said that I was "unable to load" I meant using Audacity. So, I had Audacity setup to use ffmpeg and it was unable to load the G.729.
On the other hand, my latest sentence says that "in fact ffmpeg did open" whereas in this case I was not using Audacity, I was simply using ffmpeg from the CLI with a "ffmpeg -f g729 -i source.g729 dest.wav". It opened the file, actually did a conversion but the output cannot be cataloged as human speech.
Which FFmpeg version is that? Did you get the latest from http://ffmpeg.zeranoe.com/builds/?

What does this code typed into FFmpeg CLI return?

Code: Select all

ffmpeg -encoders | grep -i "g\."

In any case I just noticed your aim is to convert to ADPCM so the objective of FFmepg writing G.729 is just if it could remove the WAV packaging which seems to be the stumbling block importing with older FFmpeg.
john3voltas wrote:
Gale Andrews wrote:I guess Steve has a later version of FFmpeg which may or may not support G.729 in WAV.
But can I set Audacity to a later ffmpeg library? I tried to point Audacity to ffmpeg 3.3.1 and I couldn't...
As I said in my post before this, you can point Audacity to other FFmpeg versions (EXE file) for exporting, but for importing you are tied to FFmpeg 2.2.2 on Windows.

Did the file you converted to PCM online sound OK? If so that is one solution. With what application are you playing these files now, so you know what they sound like?

I don't mind if you also want to PM your sample file to me, under the same terms, but I can't guarantee I'll be able to do any more than Steve can when he gets to Windows.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

john3voltas
Posts: 18
Joined: Wed May 31, 2017 2:28 pm
Operating System: Windows 7

Re: Converting from G.729 to regular ADPCM

Post by john3voltas » Thu Jun 01, 2017 10:14 pm

Gale Andrews wrote:Which FFmpeg version is that? Did you get the latest from http://ffmpeg.zeranoe.com/builds/?
I tried both with this one http://ffmpeg.zeranoe.com/builds/win32/ ... shared.zip
and also this one too http://ffmpeg.zeranoe.com/builds/win64/ ... shared.zip
Gale Andrews wrote:What does this code typed into FFmpeg CLI return?

Code: Select all

ffmpeg -encoders | grep -i "g\."
That's a bash script. As said I'm on Windows, but since I always have cygwin installed I was able to run it.
Here's the result with a zeranoe 3.3.1 for win32:

Code: Select all

$ ./ffmpeg -encoders | grep -i "g\."
ffmpeg version 3.3.1 Copyright (c) 2000-2017 the FFmpeg developers
  built with gcc 6.3.0 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --enable-cuda --enable-cuvid --enable-d3d11va --enable-dxva2 --enable-libmfx --enable-nvenc --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libbs2b --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenh264 --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libsnappy --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-libzimg --enable-lzma --enable-zlib
  libavutil      55. 58.100 / 55. 58.100
  libavcodec     57. 89.100 / 57. 89.100
  libavformat    57. 71.100 / 57. 71.100
  libavdevice    57.  6.100 / 57.  6.100
  libavfilter     6. 82.100 /  6. 82.100
  libswscale      4.  6.100 /  4.  6.100
  libswresample   2.  7.100 /  2.  7.100
  libpostproc    54.  5.100 / 54.  5.100
 A..... g722                 G.722 ADPCM (codec adpcm_g722)
 A..... g726                 G.726 ADPCM (codec adpcm_g726)
 A..... g723_1               G.723.1
 A..... pcm_alaw             PCM A-law / G.711 A-law
 A..... pcm_mulaw            PCM mu-law / G.711 mu-law
And this is the result for the ffmpeg 2.2.2 that's linked on Audacity's help page:

Code: Select all

$ ./ffmpeg -encoders | grep -i "g\."
ffmpeg version 2.2.2 Copyright (c) 2000-2014 the FFmpeg developers
  built on May 22 2014 19:56:44 with gcc 4.8.2 (GCC)
  configuration: --disable-static --enable-shared --enable-gpl --enable-version3 --disable-w32threads --enable-avisynth --enable-bzlib --enable-fontconfig --enable-frei0r --enable-gnutls --enable-iconv --enable-libass --enable-libbluray --enable-libcaca --enable-libfreetype --enable-libgme --enable-libgsm --enable-libilbc --enable-libmodplug --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-librtmp --enable-libschroedinger --enable-libsoxr --enable-libspeex --enable-libtheora --enable-libtwolame --enable-libvidstab --enable-libvo-aacenc --enable-libvo-amrwbenc --enable-libvorbis --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxavs --enable-libxvid --enable-decklink --enable-zlib
  libavutil      52. 66.100 / 52. 66.100
  libavcodec     55. 52.102 / 55. 52.102
  libavformat    55. 33.100 / 55. 33.100
  libavdevice    55. 10.100 / 55. 10.100
  libavfilter     4.  2.100 /  4.  2.100
  libswscale      2.  5.102 /  2.  5.102
  libswresample   0. 18.100 /  0. 18.100
  libpostproc    52.  3.100 / 52.  3.100
 A..... g722                 G.722 ADPCM (codec adpcm_g722)
 A..... g726                 G.726 ADPCM (codec adpcm_g726)
 A..... g723_1               G.723.1
 A..... pcm_alaw             PCM A-law / G.711 A-law
 A..... pcm_mulaw            PCM mu-law / G.711 mu-law
Gale Andrews wrote:In any case I just noticed your aim is to convert to ADPCM so the objective of FFmepg writing G.729 is just if it could remove the WAV packaging which seems to be the stumbling block importing with older FFmpeg.
Exactly, my aim is to convert and edit some parts with Audacity.
Gale Andrews wrote:As I said in my post before this, you can point Audacity to other FFmpeg versions (EXE file) for exporting, but for importing you are tied to FFmpeg 2.2.2 on Windows.
Oh...Ok. That's a real pity. Even because with the latest security issues, I'd really like to stick to maintained and up-to-date versions of software installed on my PC. I mean, 2.2.2 is really old and I checked FFmpeg's changelog and you can really see some pretty nasty vulnerabilities in there, even in not that old releases.
Gale Andrews wrote:Did the file you converted to PCM online sound OK? If so that is one solution.
Yea, the file I got from that website is just fine. The only real issue is a privacy one. I'm not a security freak but this is company's calls and there's nothing keeping that website from hearing these phone calls or simply posting them on their website. :o
Gale Andrews wrote:With what application are you playing these files now, so you know what they sound like?
To be honest, I using windows media player because that's what comes with this PC install.
Tried VLC (from PortableApps.com too) with these G.729 wrapped in WAV and it works fine too.
I guess this is working because for professional reasons I had to install some software that comes bundled with some G.729 decoder, probably the call recording software. Otherwise I think neither WMP not VLC would play it. Unless they work because it's wrapped in WAV?
Gale Andrews wrote:I don't mind if you also want to PM your sample file to me, under the same terms, but I can't guarantee I'll be able to do any more than Steve can when he gets to Windows.
Sure, will do just that in a few minutes.

Thank you both for your support.
Cheers

Gale Andrews
Quality Assurance
Posts: 41761
Joined: Fri Jul 27, 2007 12:02 am
Operating System: Windows 10

Re: Converting from G.729 to regular ADPCM

Post by Gale Andrews » Fri Jun 02, 2017 4:53 pm

john3voltas wrote:
galeandrews wrote:

Code: Select all

ffmpeg -encoders | grep -i "g\."
That's a bash script. As said I'm on Windows
I can run that command in cmd.exe on Windows. It's probably because I have the GNU tools for Windows.
john3voltas wrote: but since I always have cygwin installed I was able to run it.
Here's the result with a zeranoe 3.3.1 for win32:

Code: Select all

 A..... g722                 G.722 ADPCM (codec adpcm_g722)
 A..... g726                 G.726 ADPCM (codec adpcm_g726)
 A..... g723_1               G.723.1
 A..... pcm_alaw             PCM A-law / G.711 A-law
 A..... pcm_mulaw            PCM mu-law / G.711 mu-law
And this is the result for the ffmpeg 2.2.2 that's linked on Audacity's help page:

Code: Select all

 A..... g722                 G.722 ADPCM (codec adpcm_g722)
 A..... g726                 G.726 ADPCM (codec adpcm_g726)
 A..... g723_1               G.723.1
 A..... pcm_alaw             PCM A-law / G.711 A-law
 A..... pcm_mulaw            PCM mu-law / G.711 mu-law
According to the FFmpeg documentation, G.729 "BIT" is supported natively via libav without need of building external libraries into FFmpeg. So, that result for FFmpeg 3.3.1 seems confusing.

If I run:

Code: Select all

ffmpeg -decoders | grep -i "g\."
in FFmpeg 2.2.2 it shows that G.729 is supported thus:

Code: Select all

 A....D g722                 G.722 ADPCM (codec adpcm_g722)
 A....D g726                 G.726 ADPCM (codec adpcm_g726)
 A....D g726le               G.726 ADPCM little-endian (codec adpcm_g726le)
 A....D g723_1               G.723.1
 A....D g729                 G.729
 A....D pcm_alaw             PCM A-law / G.711 A-law
 A....D pcm_mulaw            PCM mu-law / G.711 mu-law 
It does not say G.729a but I am not yet convinced the G.729a variant is the problem. The G.729 annexes are "supposed" to be interoperable with G.729.
john3voltas wrote:
Gale Andrews wrote:As I said in my post before this, you can point Audacity to other FFmpeg versions (EXE file) for exporting, but for importing you are tied to FFmpeg 2.2.2 on Windows.
Oh...Ok. That's a real pity. Even because with the latest security issues, I'd really like to stick to maintained and up-to-date versions of software installed on my PC.
You can use later FFmpeg for Audacity import if you compile Audacity on Linux. You could do that on a virtual machine.
john3voltas wrote:
Gale Andrews wrote:Did the file you converted to PCM online sound OK? If so that is one solution.
Yea, the file I got from that website is just fine. The only real issue is a privacy one. I'm not a security freak but this is company's calls and there's nothing keeping that website from hearing these phone calls or simply posting them on their website. :o
I am unclear whether Steve's attempt at importing "80088.wav" into Audacity on Linux is actually comprehensible (that is, if you can hear it is a non-English language). The PCM output of the online encoder is comprehensible.

The G.729 decoder I have http://www.codecpro.com/LicenseG729.php wants G.729 not wrapped in WAV. It does convert your file to raw 16-bit PCM data which I can import raw into Audacity, but it sounds incomprehensible when played back.

The wrapping in WAV is very strange. They make it a dual mono file (that is, nominally "stereo", but left and right are identical).
john3voltas wrote:
Gale Andrews wrote:With what application are you playing these files now, so you know what they sound like?
To be honest, I using windows media player because that's what comes with this PC install.
Tried VLC (from PortableApps.com too) with these G.729 wrapped in WAV and it works fine too.
I guess this is working because for professional reasons I had to install some software that comes bundled with some G.729 decoder, probably the call recording software. Otherwise I think neither WMP not VLC would play it. Unless they work because it's wrapped in WAV?
You can play the files in WMP and the other players because of the professional decoder you installed. On my machine I just get an error about missing ACM codec when I play 80088.wav.

Are you sure your call software has no conversion utility out of G.729 in WAV? That would be the best solution. I have not found any other Windows applications that can convert your 80088.wav on the computer. Most converters will rely on FFmpeg.

Mencoder has a second non-FFmpeg G.729 decoder but when I play your 80088.wav in mplayer it says "Requested audio codec family [g729dmo] (afm=dmo) not available. Enable it at compilation."

If you compile mplayer with that support you will have to go through ridiculous hoops pretending to mencoder that your audio file is a video file so I don't think that is a way forward.

Let us know if you find anything.


Gale
________________________________________FOR INSTANT HELP: (Click on Link below)
* * * * * Tips * * * * * Tutorials * * * * * Quick Start Guide * * * * * Audacity Manual

steve
Site Admin
Posts: 80752
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Converting from G.729 to regular ADPCM

Post by steve » Fri Jun 02, 2017 5:18 pm

Gale Andrews wrote:I am unclear whether Steve's attempt at importing "80088.wav" into Audacity on Linux is actually comprehensible
It would be comprehensible if I understood the language.
It's only like poor telephone quality, but it is clearly a man and woman talking in a non-English language.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)

Post Reply