开发者

FFmpeg: How to control console output while reading from RTSP?

开发者 https://www.devze.com 2023-01-26 18:33 出处:网络
So I created simple Consol app: FFmpeg RTSP Video stream reader (using only general FFmpeg C API) But while ffmpeg reads from RTSP it shows lots of info. I did not asked for if... At least not all of

So I created simple Consol app: FFmpeg RTSP Video stream reader (using only general FFmpeg C API) But while ffmpeg reads from RTSP it shows lots of info. I did not asked for if... At least not all of it... So how can I filter what ffmpeg is outputing? I mean in all he talls user-developer there is only one important line something like: missing picture in acsess unit so how t开发者_如何学JAVAo put some filter mechanism for ffmpeg not to output all it wants and for me developer to catch the moment when message I want appeares? (In my project I write in C++ under visual studio using Boost libs)


Use av_log_set_callback, to set your function as callback:

static void avlog_cb(void *, int level, const char * szFmt, va_list varg) {
    //do nothing...
}

av_log_set_callback(avlog_cb);

or, you may also use

av_log_set_level(AV_LOG_ERROR);

to print error messages only.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号