#10142(avfilter:new): scdet filter not logging some frames score
#10142: scdet filter not logging some frames score ----------------------------------+---------------------------------- Reporter: colemarc | Type: defect Status: new | Priority: minor Component: avfilter | Version: 5.1.2 Keywords: scdet | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+---------------------------------- `ffmpeg version 5.1.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers` 1000.mkv has exactly 1000 frames. scdet filter logs scores for only 866 frames. {{{ $ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep iskey | wc -l 1000 $ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep scdet | wc -l 866 }}} However the scdet filter forwards all 1000 frames and sets frame metadata for each of them. {{{ $ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep 'Parsed_metadata_1.*lavfi.scd.score' | wc -l 1000 }}} All the frames missed in the scdet log have lavfi.scd.score=0.000, but a few frames with lavfi.scd.score=0.000 get logged. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10142> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10142: scdet filter not logging some frames score ----------------------------------+------------------------------------ Reporter: colemarc | Owner: (none) Type: defect | Status: open Priority: minor | Component: avfilter Version: 5.1.2 | Resolution: Keywords: scdet | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+------------------------------------ Changes (by colemarc): * status: new => open Old description:
`ffmpeg version 5.1.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers`
1000.mkv has exactly 1000 frames. scdet filter logs scores for only 866 frames.
{{{ $ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep iskey | wc -l 1000
$ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep scdet | wc -l 866 }}}
However the scdet filter forwards all 1000 frames and sets frame metadata for each of them.
{{{ $ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep 'Parsed_metadata_1.*lavfi.scd.score' | wc -l 1000 }}}
All the frames missed in the scdet log have lavfi.scd.score=0.000, but a few frames with lavfi.scd.score=0.000 get logged.
New description: `ffmpeg version 5.1.1-static https://johnvansickle.com/ffmpeg/ Copyright (c) 2000-2022 the FFmpeg developers` 1000.mkv has exactly 1000 frames. scdet filter logs scores for only 866 frames. {{{ $ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep iskey | wc -l 1000 $ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep scdet | wc -l 866 }}} However the scdet filter forwards all 1000 frames and sets frame metadata for each of them. {{{ $ ffmpeg -nostdin -nostats -i 1000.mkv -map 0:v -filter:v "scdet=threshold=0:sc_pass=0,metadata=mode=print:key=lavfi.scd.score,showinfo=checksum=0" -f null - 2>&1 | grep 'Parsed_metadata_1.*lavfi.scd.score' | wc -l 1000 }}} All the frames missed in the scdet log have lavfi.scd.score=0.000, but a few frames with lavfi.scd.score=0.000 get logged. [https://drive.google.com/file/d/1vdz_aBprlUCh5eQ__URkzbVBIIEiawMM/view?usp=s... 1000.mkv] -- -- Ticket URL: <https://trac.ffmpeg.org/ticket/10142#comment:1> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10142: scdet filter not logging some frames score ----------------------------------+------------------------------------ Reporter: colemarc | Owner: (none) Type: defect | Status: open Priority: minor | Component: avfilter Version: 5.1.2 | Resolution: Keywords: scdet | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+------------------------------------ Comment (by Elon Musk): The filter outputs score twice in your case, one with metadata filter, and another via info log of filter if score is > of threshold. So score is 0 in those cases that prints item only once. So I bet that input have not 1000 frames. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10142#comment:2> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10142: scdet filter not logging some frames score ----------------------------------+------------------------------------ Reporter: colemarc | Owner: (none) Type: defect | Status: open Priority: minor | Component: avfilter Version: 5.1.2 | Resolution: Keywords: scdet | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+------------------------------------ Comment (by colemarc): Sorry but the video does indeed have 1000 frames, and scdet logs only 866 of them. I have attached the video file in the original post. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10142#comment:3> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10142: scdet filter not logging some frames score ----------------------------------+------------------------------------ Reporter: colemarc | Owner: (none) Type: defect | Status: open Priority: minor | Component: avfilter Version: 5.1.2 | Resolution: Keywords: scdet | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+------------------------------------ Comment (by Elon Musk): This have been fixed in master version. Could you confirm? -- Ticket URL: <https://trac.ffmpeg.org/ticket/10142#comment:4> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10142: scdet filter not logging some frames score ----------------------------------+------------------------------------ Reporter: colemarc | Owner: (none) Type: defect | Status: open Priority: minor | Component: avfilter Version: 5.1.2 | Resolution: Keywords: scdet | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+------------------------------------ Comment (by colemarc): Replying to [comment:4 Elon Musk]:
This have been fixed in master version.
Could you confirm?
I can confirm that my particular issue is fixed, but I believe that commit 07485a697552641609df73fd411de1ea964f1ef2 introduced a discrepancy, because now the filter logs when score is '''greater than or equal''' to threshold (see line 166), but (if sc_pass==1) it forwards the frame only if the score is '''strictly greater''' than threshold (see line 173). This behaviour is probably unexpected since it does not conform to documentation. I suggest correcting line 173 as well. https://git.ffmpeg.org/gitweb/ffmpeg.git/blob/07485a697552641609df73fd411de1... https://ffmpeg.org/ffmpeg-filters.html#scdet-1 -- Ticket URL: <https://trac.ffmpeg.org/ticket/10142#comment:5> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
#10142: scdet filter not logging some frames score ----------------------------------+------------------------------------ Reporter: colemarc | Owner: (none) Type: defect | Status: closed Priority: minor | Component: avfilter Version: 5.1.2 | Resolution: fixed Keywords: scdet | Blocked By: Blocking: | Reproduced by developer: 0 Analyzed by developer: 0 | ----------------------------------+------------------------------------ Changes (by Elon Musk): * status: open => closed * resolution: => fixed Comment: Fixed that too. -- Ticket URL: <https://trac.ffmpeg.org/ticket/10142#comment:6> FFmpeg <https://ffmpeg.org> FFmpeg issue tracker
participants (1)
-
FFmpeg