Opened 3 years ago

Closed 3 years ago

Last modified 3 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 Changed 3 years ago by Alexufo

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 follow-up: Changed 3 years ago by Cigaes

  • Resolution set to wontfix
  • Status changed from new to closed

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

comment:3 in reply to: ↑ 2 Changed 3 years ago by Alexufo

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 Changed 3 years ago by heleppkes

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 Changed 3 years ago by Cigaes

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.