New submission from Nabil Stendardo <nabil.stenda...@bluewin.ch>:

This seems to be a long-standing issue for a long time, given that the "banner"
gets printed before the argument list gets parsed, and so cannot get removed
with a command-line argument. My solution is to use an environment variable
(which I named FF_NO_BANNER, feel free to change it) when it is equal to the
string "true" to remove the banner. Hope that's useful.

----------
files: ffmpeg-no-banner-based-on-environment-variable-FF_NO_BANNER_if_true.patch
messages: 12475
priority: normal
status: new
substatus: new
title: Patch: Remove banner based on environment variable FF_NO_BANNER = true
type: patch

________________________________________________
FFmpeg issue tracker <iss...@roundup.ffmpeg.org>
<https://roundup.ffmpeg.org/issue2344>
________________________________________________
Index: cmdutils.c
===================================================================
--- cmdutils.c	(revision 25689)
+++ cmdutils.c	(working copy)
@@ -396,6 +396,11 @@
 
 void show_banner(void)
 {
+    char* no_banner_env_variable = getenv("FF_NO_BANNER");
+    if (no_banner_env_variable != NULL && strcmp(no_banner_env_variable,"true") == 0)
+    {
+        return;
+    }
     fprintf(stderr, "%s version " FFMPEG_VERSION ", Copyright (c) %d-%d the FFmpeg developers\n",
             program_name, program_birth_year, this_year);
     fprintf(stderr, "  built on %s %s with %s %s\n",

Reply via email to