[FFmpeg-devel] Files crashing FFmpeg

Måns Rullgård mans
Wed Nov 26 17:54:14 CET 2008

Martin Lindhe wrote:
> Benjamin Larsson wrote:
>> It's over 5000 files and maybe there are more things to look at then
>> just if it crashes FFmpeg.
> Something along the lines of this could be a starting point
> #!/bin/sh
> FILE=ffmpeg_crashfiles.txt
> TMP_SUFF=out.avi

It is wasteful to re-encode the files and to save the result.
Use -f null to discard the output instead.

> if [ ! -e $FILE ]; then
>     wget http://tranquillity.ath.cx/$FILE
> fi
> while read LINE
> do
>     ffmpeg -i $LINE $LINE-$TMP_OUT

This needs to have stdin redirected </dev/null or else the while loop
will break.

> done < $FILE

You'll also need to quote the filenames throughout.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list