[Live-devel] Problems with Streaming of AMR

Martin marthi at graphics.cs.uni-sb.de
Fri Nov 10 08:08:52 PST 2006


Hi Ross,

Ross Finlayson wrote:
>>Is the frame header restored after streaming over RTP?
> 
> 
> No, not by default.  However, the frame header byte is available - 
> from the "AMRAudioRTPSource" - using the "lastFrameHeader()" member 
> function.
> 
> See, for example, the code for "AMRAudioFileSink".  If you feed your 
> incoming data (from "AMRAudioRTPSource" into an "AMRAudioFileSink", 
> you'll end up with an AMR-format data file that you should be able to 
> play using QuickTime Player (for example).
> 
> 
>> If not, I suppose
>>ffmpeg expects the header in every frame
> 
> 
> That's a FFMPEG-related question; you're going to have to figure that 
> out yourself from looking at the code.  I haven't yet used FFMPEG at 
> all to *decode* AMR audio.

its working now, thanks a lot for your help!
The ffmpeg decoder expects the header in every frame so one has to
restore it before decoding.

I still have a small problem: I have noticed regular cracks when
streaming AMR over RTP. I tracked it down to a timestamp problem. As I
understand it, I have to increase the fPresentationTime by 20 ms for
every frame, because AMR_NB and AMR_WB contain 20 ms of sound data. Is
that right?

Martin


More information about the live-devel mailing list