This seems to be neccessary after recent changes to new APIs.
Details
I now get thumbnails for MKVs and what not.
Supposedly it is auto-detected but documentation says
either avcodec_register() or avcodec_register_all() must be called before any other libavcodec functions.
av_register_all() internally calls avcodec_register_all(). It also makes sure it is only initialized once, not everytime this is called.
Perhaps someone more knowledgable in ffmpeg can chime in?
Diff Detail
- Repository
- R343 FFmpeg Thumbnailers
- Lint
Lint Skipped - Unit
Unit Tests Skipped
On the other hand, av_register_all is deprecated since FFmpeg 4.0.
https://github.com/FFmpeg/FFmpeg/blob/70d25268c21cbee5f08304da95be1f647c630c15/doc/APIchanges#L86
As a side note for a discussion happening on IRC, what I think should be done for MKV is to first try mkvinfo (check if it's there) + mkvextract attachments foo.mkv poster.jpg. Well ripped (or fixed with a kodi script) have the thumbnail and artwork built in. The test00.cpp in libmatroska seem to show how to do it with their API. Maybe in this case a shell script would be preferred.