Am 30.05.25 um 14:20 schrieb Grilled Tanuki:
Hi all,

I am writing some software to parse through a repository of videos to
detect encoding errors that would result in a visual or audible glitch. I'm
not concerned about minor issues that a decoder can handle gracefully. I
have been using the following command.

FFMPEG_PATH -xerror -err_detect ERROR_DETECT -loglevel error -hwaccel cuda
-hwaccel_output_format cuda -i FILE_PATH -f null -

The documentation for err_detect lists the following options.

crccheck - verify embedded CRCs
bitstream - detect bitstream specification deviations
buffer - detect improper bitstream length
explode - abort decoding on minor error detection
ignore_err - ignore decoding errors, and continue decoding.
careful - consider things that violate the spec and have not been seen in
the wild as errors
compliant - consider all spec non compliances as errors
aggressive - consider things that a sane encoder should not do as an error

I have been using explode, however this fails on inconsequential errors
where the video still plays through fine. I want to switch to an option
that should only flag noticeable glitches, but the documentation on the
options is brief and vague to me. Does anyone have any insight on what
these options do and could give me a more detailed description?

Thanks
_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

I use another way to find corrupted frames, the decoding analysis of libx264 :

#!/bin/bash

while IFS= read -r -d $'\0' video
do
    filename=$(basename -- "$video")
    filename="${filename%.*}"

    ffmpeg -y -i "$video" -vcodec libx264 -crf 51 -preset ultrafast -acodec copy -f mp4 -movflags frag_keyframe+empty_moov+delay_moov pipe:1 >/dev/null 2>"${filename}.txt" </dev/null
    TxtFileName="${filename}.txt"
    mystring=${TxtFileName}
    echo $mystring
    grep -i -n 'error\|duplicate\|failure\|missing\|POCs\|corrupt' "${TxtFileName}"
    echo "Ready"

done < <(find -iregex ".*\.\(mp4\|mkv\|m2ts\|mpg\|ts\)" -print0)
echo "Ready"
read pause

Refer to the "grep" line, only the failure indication, leads sometimes to not visible "errors".

The script will generate a txt-file, same name as the videio, with the respective error indication and the timestamp.

Best regards

Richard

_______________________________________________
ffmpeg-user mailing list
ffmpeg-user@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-user

To unsubscribe, visit link above, or email
ffmpeg-user-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to