[FFmpeg-devel] ffmpeg logging on stderr

tech gro tekgro
Thu Mar 10 22:03:36 CET 2011


On Thu, Mar 10, 2011 at 11:44 AM, Wim Lewis <wiml at hhhh.org> wrote:

> On 3/10/11 6:36 AM, Michael Niedermayer wrote:
> > what is the problem with
> > -q 2>/dev/null
> >
> > or what problem are you trying to solve?
>
> I thought <tekgro> was trying to parse the actual error output, but was
> having difficulty because it was interspersed with non-error text?
>
> Another possible solution to the version-header problem is to make sure
> that it always *ends* with a specific pattern or piece of text (and
> document what to look for), so that programs which are trying to parse
> ffmpeg output know how much to skip. It could be something as flexible
> as "the first non-indented line after the libfoo lines is the last line
> of the header".
>
>
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at mplayerhq.hu
> https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-devel
>


No, I'm not trying to parse the logs. I'm actually running ffmpeg from
within java, and I only need information about whether there was an error in
encoding or not, which i would ideally log in my error.log.

However, right now, there doesn't seem to be any way for it to be done. So
if i were to translate a 10MB video using ffmpeg, I'm getting 1K of
unnecessary logs, which is gonna be a problem for the video translation
service that I'm trying to setup.

There definitely should be some way to run ffmpeg in silent mode, where it
would write to the logs only if there is an error. I agree that there are
different libraries and different logging formats that are being used, but I
as a user should be completely able to control what I want to and don't want
to log.

Just to reiterate, my problem is twofold.

1. I want to stop dumping frame/bitrate info that gets spewed out. (Stefano
gave me the solution for that, however)
2. I want to be able to selectively log the details, different levels could
be used to log different details ala log4j. eg. when I'm running in dev
environment, I could keep all the info on, prod, turn it only to error
logging.

I hope that makes sense.



More information about the ffmpeg-devel mailing list