ffmpeg: Warn if output file is empty
authorMichael Niedermayer <michaelni@gmx.at>
Fri, 25 Nov 2011 15:17:06 +0000 (16:17 +0100)
committerMichael Niedermayer <michaelni@gmx.at>
Fri, 25 Nov 2011 15:17:06 +0000 (16:17 +0100)
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 44139f8..8db18dc 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -1526,6 +1526,9 @@ static void print_report(OutputFile *output_files,
                extra_size/1024.0,
                100.0*(total_size - raw)/raw
         );
+        if(video_size + audio_size + extra_size == 0){
+            av_log(NULL, AV_LOG_WARNING, "Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)\n");
+        }
     }
 }