Skip to content

bug #3631 fixed#3225

Merged
opencv-pushbot merged 1 commit intoopencv:2.4from
jormansa:bug_#3631
Sep 17, 2014
Merged

bug #3631 fixed#3225
opencv-pushbot merged 1 commit intoopencv:2.4from
jormansa:bug_#3631

Conversation

@jormansa
Copy link
Copy Markdown

Bug #3631. The constant max_number_of_attempts is too high and causes an unnecessary delay (around 4 seconds) after the last frame read from the video. Fixed to a smaller value.

@vpisarev
Copy link
Copy Markdown
Contributor

let's put it in 👍

@opencv-pushbot opencv-pushbot merged commit 1d2d579 into opencv:2.4 Sep 17, 2014
vpisarev added a commit that referenced this pull request Sep 17, 2014
@jormansa
Copy link
Copy Markdown
Author

great ! Thanks

@jormansa jormansa deleted the bug_#3631 branch September 17, 2014 12:58
asmorkalov pushed a commit that referenced this pull request May 16, 2023
videoio/FFmpeg: increased packet read attempt limit, allow configuring it

resolves #9455
related #3225

* Use different counters for wrong packets recieved by demuxer and errors from decoder
* Allow modifying these counters via environment variables `OPENCV_FFMPEG_READ_ATTEMPTS`/`OPENCV_FFMPEG_DECODE_ATTEMPTS`
* Added logging when reading breaks at one of error limits

Notes:
* I've been able to reproduce original issue with a video file with 14 total streams (video + audio + subtitles), at some point in the video only packets from the last stream are being sent by the demuxer, thus exceeding our limit. For my specific video total number of packets from wrong stream was about 2700. I've chosen 4096 as default value.
* Default limit of decoding attempts is quite low, because I'm not sure in which cases it can be exceeded (network stream?). I tried to read 8k video from the disk, but it did not cause break at decode point.
thewoz pushed a commit to thewoz/opencv that referenced this pull request Jan 4, 2024
videoio/FFmpeg: increased packet read attempt limit, allow configuring it

resolves opencv#9455
related opencv#3225

* Use different counters for wrong packets recieved by demuxer and errors from decoder
* Allow modifying these counters via environment variables `OPENCV_FFMPEG_READ_ATTEMPTS`/`OPENCV_FFMPEG_DECODE_ATTEMPTS`
* Added logging when reading breaks at one of error limits

Notes:
* I've been able to reproduce original issue with a video file with 14 total streams (video + audio + subtitles), at some point in the video only packets from the last stream are being sent by the demuxer, thus exceeding our limit. For my specific video total number of packets from wrong stream was about 2700. I've chosen 4096 as default value.
* Default limit of decoding attempts is quite low, because I'm not sure in which cases it can be exceeded (network stream?). I tried to read 8k video from the disk, but it did not cause break at decode point.
thewoz pushed a commit to thewoz/opencv that referenced this pull request May 29, 2024
videoio/FFmpeg: increased packet read attempt limit, allow configuring it

resolves opencv#9455
related opencv#3225

* Use different counters for wrong packets recieved by demuxer and errors from decoder
* Allow modifying these counters via environment variables `OPENCV_FFMPEG_READ_ATTEMPTS`/`OPENCV_FFMPEG_DECODE_ATTEMPTS`
* Added logging when reading breaks at one of error limits

Notes:
* I've been able to reproduce original issue with a video file with 14 total streams (video + audio + subtitles), at some point in the video only packets from the last stream are being sent by the demuxer, thus exceeding our limit. For my specific video total number of packets from wrong stream was about 2700. I've chosen 4096 as default value.
* Default limit of decoding attempts is quite low, because I'm not sure in which cases it can be exceeded (network stream?). I tried to read 8k video from the disk, but it did not cause break at decode point.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

port/backport done Label for maintainers. Authors of PR can ignore this

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants