2

I'm debugging ffmpeg with -loglevel debug, and I want the debug messages (which are basically just printing to terminal the value of different variables) but in front of each line is the file offset in blue text, and I don't want to see that, because it's useless to me.

How can I do this?

Here's an example screenshot: enter image description here

I want the blue text [dca @ 0x7fe86c80f000] to be removed, but the green text to stay

I tried -nostats and -hide_banner together and apart, and that didn't work either.

  • 2
    In an *nix environment it would be easiest to pipe it's output through sed or cut. What OS are you working on? – Nifle Dec 10 '14 at 21:21
  • I'm using OS X, the reason I'm printing the debug info using av_log is so it'll end up in a .log file, that I can review later to make sure everything is being read properly. – MarcusJ Dec 10 '14 at 21:30
6

As Nifle commented, you can use sed like this. Without sed, if your output is:

$ ffmpeg -i input.avi -b:v 64k -bufsize 64k output.avi -loglevel debug

here is a line without any brackets and stuff, it should display too
[dca @ 0x7fe86c80f000] leave this stuff here
[dca @ 0x7fe86c80f000] and this
[dca @ 0x7fe86c80f000] this stuff too
another line that should just be printed plainly.

Then you can add

| sed 's/\[.*\] *\t*//'

to the end, like this: (ran on my linux, osX sed may be ever-so-slightly different)

$ ffmpeg -i input.avi -b:v 64k -bufsize 64k output.avi -loglevel debug | sed 's/\[.*\] *\t*//'
here is a line without any brackets and stuff, it should display too
leave this stuff here
and this
this stuff too
another line that should just be printed plainly.

Look good?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.