Thanks both! I really appreciate your inputs
I did write something in the past using information on the link provided above. I basically scanned directory recursively and parse .avi with ffmpeg for errors.
The relevant part can be found here below:
Code:
find -mindepth 2 -maxdepth 4 -type d -printf '%T@ %p\n' | sort -r | cut -b 25- |
while read f; do
rootdir=`echo $f | cut -b 4`
cd "$basedir/$f"
Video=`ls -1 *.avi 2>/dev/null | head -1`
Videoext=`echo $Video|awk -F . '{print $NF}'`
if [[ $Videoext == "avi" ]]; then
if [ ! -f error.log ]; then
/usr/bin/ffmpeg -v 1 -i *.avi -f null - 2>error.log
errors=`more error.log | egrep -i 'error|invalid' | wc -l`
if [[ $errors -gt "1" ]]; then
echo -e "$f might have AVI encoding problems \r"
else
echo -e "$f is well encoded \r"
fi
else
echo -e "$f has already been processed \r"
fi
else
echo -e "$f is not AVI \r"
fi
The output log can be found in attachment. The point where I am at the moment is that I look for "error or invalid" but that's really my best guess on what it might go wrong on a file. I would need help identifying all the possible things that might go wrong with a video file and how ffmpeg would report on those.
About
file and
mkvmerge, can you please elaborate? I guess mkv merge can help with mkv files only (which is a fair enough to me)
Thanks again for your help/input
:-)