[FFmpeg-trac] #2343(undetermined:new): Stream is blocked by 20 seconds or more when reading an mjpeg stream at low resolutions

FFmpeg trac at avcodec.org
Sun Mar 10 08:23:38 CET 2013


#2343: Stream is blocked by 20 seconds or more when reading an mjpeg stream at low
resolutions
--------------------------------------+----------------------------------
             Reporter:  virtuald      |                     Type:  defect
               Status:  new           |                 Priority:  normal
            Component:  undetermined  |                  Version:  1.1.3
             Keywords:                |               Blocked By:
             Blocking:                |  Reproduced by developer:  0
Analyzed by developer:  0             |
--------------------------------------+----------------------------------
 When opening a network-based mjpeg stream from an AXIS M1011 camera, the
 stream doesn't actually get opened until 20 or 30 seconds later, and the
 program blocks waiting for ffmpeg to evaluate the stream parameters (as it
 freezes in avformat_find_stream_info). I find that I don't notice it with
 640x480 30fps streams, but at 320x260 5fps the delay is huge.

 How to reproduce:
 {{{
 % ffmpeg -i http://192.168.0.10/mjpg/video.mjpg
 }}}

 The problem shows up on version 1.1.3 on Windows (32-bit) and Linux
 (64-bit).

 It also shows up on the version installed on my Ubuntu box by default,
 0.8.5-6:0.8.5-0ubuntu0.12.10.1.

 Note that in the logfile I attached, it hangs right before the line
 "[mjpeg @ 0x1016500] max_analyze_duration 5000000 reached at 5000000" for
 about 25 seconds or so. And yes, it ends in an error saying that there is
 no output file, but an output file isn't necessary to illustrate the
 issue. The point is that it hangs. :)

 I originally found this issue when using OpenCV, but the ffmpeg executable
 has the same problem. I was able to remove the delay in OpenCV by setting
 max_analyze_duration to 50000 on the context. However, it seems like the
 default setting should just work.

 Reference: http://code.opencv.org/issues/2877

-- 
Ticket URL: <https://ffmpeg.org/trac/ffmpeg/ticket/2343>
FFmpeg <http://ffmpeg.org>
FFmpeg issue tracker


More information about the FFmpeg-trac mailing list