diff --git a/docs/libs/ffmpeg.md b/docs/libs/ffmpeg.md index 2eaa0da14..69faf08ee 100644 --- a/docs/libs/ffmpeg.md +++ b/docs/libs/ffmpeg.md @@ -22,7 +22,14 @@ Enable `LV_USE_FFMPEG` in `lv_conf.h`. See the examples below. Note that, the FFmpeg extension doesn't use LVGL's file system. -You can simply pass the path to the font as usual on your operating system or platform. +You can simply pass the path to the image or video as usual on your operating system or platform. + +## Example +```eval_rst + +.. include:: ../../examples/libs/ffmpeg/index.rst + +``` ## API diff --git a/examples/libs/ffmpeg/index.rst b/examples/libs/ffmpeg/index.rst new file mode 100644 index 000000000..13108f9e2 --- /dev/null +++ b/examples/libs/ffmpeg/index.rst @@ -0,0 +1,12 @@ +Decode image +""""""""""""""""""""""""""""""""""""" + +.. lv_example:: libs/ffmpeg/lv_example_ffmpeg_1 + :language: c + +Decode video +""""""""""""""""""""""""""""""""""" + +.. lv_example:: libs/ffmpeg/lv_example_ffmpeg_2 + :language: c + diff --git a/src/extra/libs/ffmpeg/lv_ffmpeg.c b/src/extra/libs/ffmpeg/lv_ffmpeg.c index a72a89188..efaa6925e 100644 --- a/src/extra/libs/ffmpeg/lv_ffmpeg.c +++ b/src/extra/libs/ffmpeg/lv_ffmpeg.c @@ -117,6 +117,10 @@ void lv_ffmpeg_init(void) lv_img_decoder_set_info_cb(dec, decoder_info); lv_img_decoder_set_open_cb(dec, decoder_open); lv_img_decoder_set_close_cb(dec, decoder_close); + +#if LV_FFMPEG_AV_DUMP_FORMAT == 0 + av_log_set_level(AV_LOG_QUIET); +#endif } int lv_ffmpeg_get_frame_num(const char * path)