[gst-devel] Amr Encoding

Benoit Fouet benoit.fouet at purplelabs.com
Tue Oct 30 10:27:28 CET 2007


Hi,

Stefan Kost wrote:
> Hi,
>
> Benoit Fouet schrieb:
>   
>> Hi,
>>
>> Rahul Mittal wrote:
>>     
>>> Hi,
>>> I am trying out this pipeline to decode audio from a 3gp file and Amr
>>> encode it..
>>> but the output file that i am getting is not a valid amr file
>>>
>>> gst-launch -v filesrc location=footsie.3gp ! decodebin ! audioconvert
>>> ! audioresample ! amrnbenc name=amrenc ! queue ! filesink location=
>>> exam.amr
>>>
>>> Does anybody has any idea what is wrong with this pipeline ???
>>>   
>>>       
>> i'd say it lacks an element to write the amr header... (and possibly,
>> you don't need the queue element)
>> have you tried adding "#!AMR\n" at the beginning of your file, to see if
>> it becomes playable (with an hex editor) ?
>>
>>     
>
> yes, that should help. We do infact miss simple armnbformat and amrwbformat
> elements that should be parts of amrnb amrwb plugins and do the opposite of the
> parse elements.

it could be part of the encoder, no ?
setting a capability to tell it to write the header should be far more
simple
or even use the sink capabilities to decide whether or not to write the
AMR header.
something like the following should do it:

GST_STATIC_CAPS (
      "audio/x-amrnb-sh, "
      "rate = (int) 8000, "
      "channels = (int) 1;"
      "audio/AMR, "
      "rate = (int) 8000, "
      "channels = (int) 1"
      )

header would be added when caps are audio/x-amrnb-sh, and not if it's
audio/AMR

>  I would say they are an excellect oppurtunity for someone who
> would like to start contributing to gstreamer as they should not be very hard to
> write. A starting point could a simple muxer like xingmux, id3mux, id3v2mux or
> apemux.
>   

-- 
Ben
Purple Labs S.A.
www.purplelabs.com




More information about the gstreamer-devel mailing list