[Ffmpeg-devel] MP3 decoding from RTP stream. Getting "invalid new backstep"

Michael Niedermayer michaelni
Tue Oct 31 21:06:46 CET 2006


On Tue, Oct 31, 2006 at 09:52:51AM -0000, M?ns Rullg?rd wrote:
> Martin Thielen said:
> >>>Hi,
> >>>
> >>>I'm using ffmpeg to encode MP3 data transmit it over RTP and decode it.
> >>>If I start the RTP sender before the receiver I get warnings on the
> >>>decoder side from the ffmpeg library (only at the very beginning):
> >>>
> >>>backstep:452, lastbuf:0
> >>>invalid new backstep 381
> >>>overread, skip -5 enddists: -4 -4
> >>>overread, skip -9 enddists: -1 -1
> >>>invalid new backstep 382
> >>>
> >>>The sound is distorted as well (just for 1 second or so). Is it somehow
> >>>possible to tell the AVParser or the decoder to discard the frames that
> >>>leads to the distortion?
> >>
> >>
> >> yes if you implement it and send a patch, and yes i fully agree that the
> >> mp3 decoder should discard such packets instead of annoying the user
> >> with the noise
> >> just look at the code which outputs the error messages and silence the
> >> output somehowm shouldnt be too hard
> >>
> >> [...]
> >
> > Hi,
> >
> > I'm trying to silence the distorted output now. What would you consider
> Didn't Michael already do something?

yes and no, my change was just fixing the random trash for some mencoder
generated files which had random trash at the start of the mp3 stream
it was not a general error concealment thing ...

> > the best way:
> > 1) Return a value that indicates a problem
> > 2) Set a flag (which one?) in AVCodecContext that indicates a problem
> > 3) Changing the buffer values to 0? Is 0 the right value for silence?
> Zero is not a good value as it will cause pops or clicks if the previous
> sample has a large value.

hmm zeroing a block before the MDCT shouldnt introduce any big
discontinuities i think though iam not that good at MDCT related stuff ...
one alternative might be to simply use the coeffs fromm the previous
block, if that fails too google/citeseer would be the right place to
look for audio error concealment


Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In the past you could go to a library and read, borrow or copy any book
Today you'd get arrested for mere telling someone where the library is

More information about the ffmpeg-devel mailing list