Yahweasel / libav.js

This is a compilation of the libraries associated with handling audio and video in ffmpeg—libavformat, libavcodec, libavfilter, libavutil, libswresample, and libswscale—for emscripten, and thus the web.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Is there a way to silence libav (set loglevel?)

reinhrst opened this issue · comments

When running ffmpeg(), one can set log level (and avoid lots of messages in the console), by adding something like ["-hide_banner", "-loglevel", "error"].

I can't seem to find a similar setting when one uses the API to open a file (ff_init_demuxer_file()). Am I just overlooking something?

I haven't yet exposed the appropriate functions, but only because nobody's asked for it until now. The appropriate function is av_log_set_level (and av_log_get_level to check the current value). It's trivial to add them; expect them upstream momentarily.

Very much appreciated, works like a charm

I'm sending a PR to add the constants to types.d.ts