I'm decoding video using FFmpeg's C++ library like this:
AVPacket* avPacket = av_packet_alloc();
if (!avPacket) std::cout << "av packet error" << std::endl;
int result = avcodec_send_packet(avCodecContext, avPacket);
if (!result) {
for ( ; !result ; ) {
result = avcodec_receive_frame(avCodecContext, avFrame);
if (!result) {
...
It works, but sometimes FFmpeg encounters problematic frames and emits the following:
[h264 @ 0x7fd3bc2c4b00] no frame!
[h264 @ 0x7fd3bc2c4b00] no frame!
[h264 @ 0x7fd3bc2c4b00] no frame!
Is it possible to turn off these messages? I don't see any obvious way to do it.
In my code, I use av_log_set_callback()
to redirect output messages to my own log file, so I can filter out unwanted messages before writing them to the log.
I believe what you need is av_log_get_level
and av_log_set_level
.
Please check these out: https://www.ffmpeg.org/doxygen/trunk/group__lavu__log.html#gae8ada5cc5722548d8698650b05207904
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With