diff --git a/modules/videos/common.py b/modules/videos/common.py index 723ef9cb..2b726e84 100644 --- a/modules/videos/common.py +++ b/modules/videos/common.py @@ -153,9 +153,12 @@ def tail_decode_command(video_path: Path, seconds: int = None) -> Tuple[str | Pa # The null muxer complains about duplicate timestamps after the frames have decoded; it is not damage. +# The h264 decoder's "mmco: unref short failure" is a reference-marking note about the frames before the +# seek point; the frames decode and ffmpeg exits 0. Judging it as damage re-downloads a sound video forever. # A repeat summary only counts the previous message, whose first copy is still judged. TAIL_DECODE_IGNORED_ERRORS = re.compile( r'^\[null @ \w+] Application provided invalid, non monotonically increasing dts' + r'|^\[h264 @ \w+] mmco: unref short failure\s*$' r'|^\s*Last message repeated \d+ times\s*$') diff --git a/modules/videos/test/test_common.py b/modules/videos/test/test_common.py index 596fa10c..c5ca0f28 100644 --- a/modules/videos/test/test_common.py +++ b/modules/videos/test/test_common.py @@ -674,6 +674,7 @@ def test_ffmpeg_video_complete_real_files(test_directory, video_file): NULL_MUXER_DTS = b'[null @ 0x5555faf7fa70] Application provided invalid, non monotonically increasing dts to muxer' \ b' in stream 0: 460 >= 460\n' +H264_MMCO = b'[h264 @ 0x555627ef0f70] mmco: unref short failure\n' @pytest.mark.parametrize('return_code,stderr,expected_ok,expected_errors', [ @@ -687,6 +688,10 @@ NULL_MUXER_DTS = b'[null @ 0x5555faf7fa70] Application provided invalid, non mon '[h264 @ 0x1] Invalid NAL unit size'), (0, NULL_MUXER_DTS + b'[h264 @ 0x1] Invalid NAL unit size\n', False, '[h264 @ 0x1] Invalid NAL unit size'), (0, b'[h264 @ 0x1] error while decoding MB 3 4\n', False, '[h264 @ 0x1] error while decoding MB 3 4'), + # The h264 decoder notes a reference-marking quirk at the seek point; the frames decoded and ffmpeg exited 0. + (0, H264_MMCO, True, ''), + (0, H264_MMCO + b' Last message repeated 1 times\n', True, ''), + (0, H264_MMCO + b'[h264 @ 0x1] Invalid NAL unit size\n', False, '[h264 @ 0x1] Invalid NAL unit size'), (1, NULL_MUXER_DTS, False, ''), ]) def test_tail_decode_verdict(return_code, stderr, expected_ok, expected_errors):