[FFmpeg-devel] [PATCH] Add option to log timing

Soft Works softworkz at hotmail.com
Wed Sep 4 23:01:12 EEST 2019



> Michael Niedermayer wrote:
> >
> > > Why this restriction? I think all log lines should be start with
> > > time/date if corresponding flag is present. This makes the log to be
> > > easy to parse by scripts.
> >
> > Initially I didn’t have this restriction, but it doesn’t work well together with some multi-line logging.
> > See below for an example.
> >
> > To get this nice, it would require a larger amount of changes, and probably result in something that nobody wants to merge in.
> >
> > Anyway, there’s a flag controlling this behavior and if you really want, you can set it.
> > Then you’ll see something like this:
>
> how hard would it be to fix this ?
>
> because nothing stops a codec from doing whatever the code outside transcode
> did here causing this ...

Hi Michael,

it follows the same logic as the class prefixes do (those in square braces),
that's why the codec outputs are normally not doing those things that happen during startup.

If there is a normal line break in a codec output, that's ok and won't lead to the
nasty outputs I've shown. It will just don't have a timing in the second line, which is
just right imo, because then it's not a new log event but just continued output of
the previous line. A parser needs to check for this and will add the line content to the
previous log entry instead of parsing it as a new one.

softworkz


More information about the ffmpeg-devel mailing list