LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   convert wav files using different codecs (https://www.linuxquestions.org/questions/linux-software-2/convert-wav-files-using-different-codecs-753771/)

kirukan 09-09-2009 02:44 AM

convert wav files using different codecs
 
I need to convert wave files with g726 codec. i have done this using ffmpeg like this.
Quote:

#ffmpeg -i rec01.wav -ab 40000 -ar 8000 -acodec g726 rec_g726.wav
I streamed this file using my darwin server and open the url at quicktime player. Quicktime player notifying that this is a unsupported media type.

Is this codec conversion correct?(no error return when i convert this file)
How can i play and listen whether this wave file is working?

Actually i need to convert a audio file with g729,g711,g726 and g723.1 codecs. Input may be any audio files but the output with wave file and above mentioned codecs.

How can i do this task?
Please anybody help me.

Shadow_7 09-09-2009 10:59 AM

ffmpeg -formats
...
DEA g726
...

Mine supports g726, I don't see any of the others. D for decoder, E for encoder, A for audio. Use ffplay to test it if it's playable, it should at a minimum play using ffplay. You might need to install libsdl and libsdl-dev to have ffplay function. Not to imply quicktime compliant, but it appears to at least exist to a limited extent. (Is there some reason that PCM or MP3 can't be used?)

-ab is the audio bitrate, the syntax changed between ffmpeg versions. You should use k now, instead of the long form.
-ab 40k

-ac is the number of channels
-ac 2

-ar is the sampling rate. You could probably use k here too, but for odd rates, I don't like using decimels.
-ar 44100

You can also try ffmpeg -i <output.format> to see what it reports back as after conversion. There's a mediainfo (unrelated) option for an additional, tell me what this file really is option. With out explicitly telling ffmpeg every option for the output, it'll inherit from the source material. Even if it's not compatible with the output format. Or I could be wrong.


All times are GMT -5. The time now is 12:35 AM.