[Live-devel] Problems with Streaming of AMR

Martin marthi at graphics.cs.uni-sb.de
Mon Nov 6 02:47:26 PST 2006


Hi Ross,

thank you for your help so far, I really appreciate it!

> Sorry - my mistake.  I had forgotten how the FFMPEG encoder works, 
> and what "AMRAudioRTPSink"s requirements are.  I had it all 
> backwards.  In fact, when delivering AMR frames to "AMRAudioRTPSink", 
> we *don't* want to include the 1-byte header in each frame (because 
> it instead gets included in a special RTP header).  However, the 
> FFMPEG encoder, by default, *does* include the 1-byte header in each 
> frame, so we had to change the FFMPEG code, and, in the code that 
> calls the FFMPEG code, do:
> 
> 	extern int EncoderIncludeHeaderByte;
> 	EncoderIncludeHeaderByte = 0;
> and, for each frame
> 	fLastFrameHeader = toc_byte[ourAMRMode];
> See "AMRAudioEncoder.cpp" in the "wis-streamer" code.
> 
> Note that the change that I made to FFMPEG's "interf_enc.c" means 
> that - by default - it works the same way as it did before (as you 
> noted).  It's only when the calling code sets
> 	EncoderIncludeHeaderByte = 0;
> that it behaves differently.
> 
> I hope that clears things up.

ok, that definitely cleared thinks up :)
Anyway, its still not working...I changed the ffmpeg code and included
fLastFrameHeader = toc_byte[ourAMRMode];
for every frame.

Is the frame header restored after streaming over RTP? If not, I suppose
ffmpeg expects the header in every frame and therefore the decoding is
not working...if that's the case, do you have an example code for this,
as well?


Martin


More information about the live-devel mailing list