Ask Your Question
0

Suppress, hide or disable the error/warning messages

asked 2018-09-29 00:00:09 -0600

Amphagory gravatar image

I was wondering if there was a way to suppress, hide or disable the error or warning messages outputted to the screen?

I think they come from FFMpeg and they either show up as follows:

CASE 1:

[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.
[mpeg2video @ 0x3430c00] Invalid frame dimensions 0x0.

or

CASE 2: ... [h264 @ 0x29e5a40] co located POCs unavailable
[h264 @ 0x2a6c3c0] co located POCs unavailable
[h264 @ 0x29d7b80] reference picture missing during reorder
[h264 @ 0x29d7b80] Missing reference picture, default is 65656
[h264 @ 0x298da80] mmco: unref short failure
[h264 @ 0x298da80] number of reference frames (0+6) exceeds max (5; probably corrupt input), discarding one
[h264 @ 0x29dc700] reference picture missing during reorder
[h264 @ 0x29dc700] Missing reference picture, default is 65672
[h264 @ 0x2a27180] mmco: unref short failure
[h264 @ 0x2af7680] co located POCs unavailable
[h264 @ 0x29e5a40] mmco: unref short failure
[h264 @ 0x29e5a40] number of reference frames (0+6) exceeds max (5; probably corrupt input), discarding one
[h264 @ 0x2af9040] mmco: unref short failure

To my understanding CASE 1, is a known issue, as it is looking for a PES header. There are only a few of these messages until it finds the header.

I do not understand CASE 2, I do not know what is happening, but it seems to read the image @ frame. There are many many of these messages which outputs to the console window and adds minutes to the processing time.

edit retag flag offensive close merge delete

Comments

I think they come from FFMpeg

exactly. that's why you can't do much about it (apart from building your own ffmpeg, and hacking into that)

ofc. you can redirect stderr, like myprog 2>/dev/null , but that's not really, what you asked, right ?

berak gravatar imageberak ( 2018-09-29 00:46:10 -0600 )edit

Hmm, not sure I want to hack into FFMpeg... Maybe I'll looking into redirecting the messages to null. I'm fairly sure it is raised when I call cap.read(),.. What do you think is the best way to process if I go with redirecting the messages to null?

Amphagory gravatar imageAmphagory ( 2018-09-29 16:05:18 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2018-10-10 01:26:08 -0600

berak gravatar image

citing skvark, straight from here

Yes, the messages come from FFmpeg. You could try setting the FFREPORT environment variable before running your script. I have no idea if this works but you can try:

export FFREPORT=level=quiet

Source: https://ffmpeg.org/ffmpeg.html#Generi...)

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2018-09-29 00:00:09 -0600

Seen: 8,146 times

Last updated: Oct 10 '18