Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I am able to convert it to wav using:

ffmpeg -i audio.3pg audio.wav

but I need the command to convert it to ulaw.

Anyone?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

The simplest example is:

$ ffmpeg -i input -codec:a pcm_mulaw output.wav

Refer to ffmpeg -encoders to see a list of available encoders.

share|improve this answer
    
thanks, but I would like to have the ulaw extension instead, when I change the extensions I get [NULL @ 0250ef00] Unable to find a suitable output format for 'output.ulaw' output.ulaw: Invalid argument –  meda Nov 6 '13 at 22:21
    
@meda You can probably make a raw, headerless output with: ffmpeg -i input -codec:a pcm_mulaw -f mulaw output.ulaw. The -codec:a pcm_mulaw might be superfluous but it does not hurt to be explicit. I'm not sure if this is what you want. –  LordNeckbeard Nov 6 '13 at 23:52
    
what do you mean, sorry I did not get it –  meda Nov 7 '13 at 1:16
    
@meda If you use .wav as an extension, ffmpeg automatically guesses that you want a WAV container wrapping your PCM audio. If you do not want that, and instead need raw audio data in a .ulaw file, you need to use -f mulaw to force ffmpeg to use the PCM mu-law output format. –  slhck Nov 7 '13 at 6:20
    
Ok that worked, eventhough the quality is terrible, thanks anyway –  meda Nov 7 '13 at 14:39

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.