Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#5242 closed defect (wontfix)

ffmpeg always put to log command line strings

Reported by: Alexufo Owned by:
Priority: normal Component: ffmpeg
Version: unspecified Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Try execute ffmpeg from php with any level code number.

shell_exec("FFREPORT=file=ff%t.log:level=-8 ffmpeg -y -i '/home/test0.mp3'   -acodec copy '/home/test1.mp3' &")

You will always get log file with

Command line:
ffmpeg -y -i '/home/test0.mp3'   -acodec copy '/home/test1.mp3

But I select silent mode.
report file
https://dl.dropboxusercontent.com/u/3013858/ffmpeg-20160218-033818.log

Change History (5)

comment:1 by Alexufo, 8 years ago

idx = locate_option(argc, argv, options, "report");
    if ((env = getenv("FFREPORT")) || idx) {
        init_report(env);
      
        if (report_file) {
            int i;
            fprintf(report_file, "Command line:\n");
            for (i = 0; i < argc; i++) {
                dump_argument(argv[i]);
                fputc(i < argc - 1 ? ' ' : '\n', report_file);
            }
            fflush(report_file);
        }
    }

comment:2 by Cigaes, 8 years ago

Resolution: wontfix
Status: newclosed

If you want an empty file, use touch, not ffmpeg. A report without command line is useless.

in reply to:  2 comment:3 by Alexufo, 8 years ago

Replying to Cigaes:

If you want an empty file, use touch, not ffmpeg. A report without command line is useless.

Sorry. You not understand me. Of couse nobody want an empty file report. But who want file report if he specially change log:level=-8.
I am using ffmpeg of regular mp3 conversion and i want see if there are any error exist in past. Today after 1000 file convention i see 1000 reports and how I cant find report with error? I dont want looking in many files with command line string for error information. I just want get file if log:level=16.
This is bad using report for this?

comment:4 by Hendrik, 8 years ago

If you use FFREPORT it will always contain the command line, no way around that.
You could just redirect the output of ffmpeg itself into a log file of your choice, that way you only get any potential error output

ie.
ffmpeg -loglevel error -y -i ... 2> ff.log

comment:5 by Cigaes, 8 years ago

To check for errors, use the return code of the process. Parsing console output is not reliable.

Note: See TracTickets for help on using tickets.