Browse code

ffmpeg: do not print misleading recommanditions on 1pass vpx encoding

Fixes part of Ticket4295

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>

Michael Niedermayer authored on 2015/05/27 06:42:44
Showing 1 changed files
... ...
@@ -1342,6 +1342,7 @@ static void print_final_stats(int64_t total_size)
1342 1342
     uint64_t data_size = 0;
1343 1343
     float percent = -1.0;
1344 1344
     int i, j;
1345
+    int pass1_used = 1;
1345 1346
 
1346 1347
     for (i = 0; i < nb_output_streams; i++) {
1347 1348
         OutputStream *ost = output_streams[i];
... ...
@@ -1353,6 +1354,9 @@ static void print_final_stats(int64_t total_size)
1353 1353
         }
1354 1354
         extra_size += ost->enc_ctx->extradata_size;
1355 1355
         data_size  += ost->data_size;
1356
+        if (   (ost->enc_ctx->flags & (CODEC_FLAG_PASS1 | CODEC_FLAG_PASS2))
1357
+            != CODEC_FLAG_PASS1)
1358
+            pass1_used = 0;
1356 1359
     }
1357 1360
 
1358 1361
     if (data_size && total_size>0 && total_size >= data_size)
... ...
@@ -1439,7 +1443,12 @@ static void print_final_stats(int64_t total_size)
1439 1439
                total_packets, total_size);
1440 1440
     }
1441 1441
     if(video_size + data_size + audio_size + subtitle_size + extra_size == 0){
1442
-        av_log(NULL, AV_LOG_WARNING, "Output file is empty, nothing was encoded (check -ss / -t / -frames parameters if used)\n");
1442
+        av_log(NULL, AV_LOG_WARNING, "Output file is empty, nothing was encoded ");
1443
+        if (pass1_used) {
1444
+            av_log(NULL, AV_LOG_WARNING, "\n");
1445
+        } else {
1446
+            av_log(NULL, AV_LOG_WARNING, "(check -ss / -t / -frames parameters if used)\n");
1447
+        }
1443 1448
     }
1444 1449
 }
1445 1450