Hi all,
i have a webcam set up, it tranfers a picture every minute to a ftp server.
The connection is made via UMTS, sometimes file transport is corrupt and creates a jpg as 0byte file in the directory.
In the night, when transfers are stopped the server generates .flv files of all the .jpg s of that day. Done via cron and using ffmpeg.
However if there is only 1 .jpg file in the directory the creation of the movie fails.
So what i would like to do is have some lines in my cron that checks the .jpg's in the directory and deletes the 0byte .jpg files before they are tried for processing by ffmpeg.
Does any one have a solution for this? Ive searched around but cannot find any usefull script-lines for this. Maybe i use the wrong words in the search engines?
i have a webcam set up, it tranfers a picture every minute to a ftp server.
The connection is made via UMTS, sometimes file transport is corrupt and creates a jpg as 0byte file in the directory.
In the night, when transfers are stopped the server generates .flv files of all the .jpg s of that day. Done via cron and using ffmpeg.
However if there is only 1 .jpg file in the directory the creation of the movie fails.
So what i would like to do is have some lines in my cron that checks the .jpg's in the directory and deletes the 0byte .jpg files before they are tried for processing by ffmpeg.
Does any one have a solution for this? Ive searched around but cannot find any usefull script-lines for this. Maybe i use the wrong words in the search engines?