[Libav-user] get mpeg4 streams with rtsp protocol
lclemens at gmail.com
Fri Jul 22 01:56:32 CEST 2011
Good news! I found the section of code that was causing these errors.
I'm still an ffmpeg noob, so I'm not sure how to go about patching it.
BTW, I found three FFMPEG bugs related to this issue: #258, #257, and #285.
In libavformat/udp.c, a guy named Michael Niedermayer applied a patch
that basically added a circular buffer and an additional thread for
receiving data IF pthreads are enabled. I haven't pinpointed the exact
bug in the circular buffer logic, but I have been able to determine
that undefining HAVE_PTHREADS for the section of code in udp.c reverts
back to the original code (before he added the circular buffer stuff).
The original code works great with RTSP streams and avoids all the
missing packet and corrupt macroblock messages.
I'm debating if I should comment out the circular block and thread
code, or try to fix it. I'm not exactly sure why the circular block +
thread code was even added to begin with. What should I do???
On Thu, Jun 16, 2011 at 9:09 AM, Luke Clemens <lclemens at gmail.com> wrote:
> The thing is, I'm using these axis cameras on a gigabit network, which
> is very solid. Network testing utilities have confirmed hundreds of
> mbits/sec without any packet loss or reordering. A 320x240 stream is
> less than a megabit.
> I coud see how a missing payload could cause all sorts of problems.
> I'll step through the source code for the rtp parser and see if I can
> detect if/when they're missing. I do wonder though because the
> Panasonics has similar issues across all their models too, so is it
> coincidence that both manufacturers are forgetting payloads? Thanks
> for the info though - at least now I have somewhere to begin!
> The other thing I'm going to check is to make sure the rtp parser
> correctly handles padding at the end. Just looking at the video from
> both the Axis and Panasonic cameras, most of the artifacts are in the
> bottom half of the image.
> BTW - I verified that the errors occur in ubuntu as well.
> And another sidenote - If anyone else sees these posts and wants to
> look into it, the RTSP cameras I have tried so far are:
> Panasonic BL-C210A
> Axis 233D (rtsp://188.8.131.52/mpeg4/media.amp)
> Axis 215
> Axis P1311
More information about the Libav-user