Handle mkv cover art for thumbnails
Brought to you by:
jmaggard
This patch handles mkv cover art attachments for thumbnails. The code only checks for jpeg attachments named cover.jpg and small_cover.jpg since png is not supported by minidlna.
Will work with the sample found at Matroska Cover Art Guidelines @
http://www.matroska.org/technical/cover_art/index.html
This also fixes an issue when thumbnail streams are not detected because the video stream has already been found (similar to patch #140).
Needs further testing.
patch -p1 < mkv-coverart.patch
This is an updated patch that will properly work with newer versions of ffmpeg and will still follow Matroska guidelines.
Tested this on my dev system and on my router with OpenWrt Chaos Calmer 15.05-rc1.
Edit: this patch doesn't skip resizing.
Last edit: Shrimpkin 2015-06-10
root@NAS:/opt/minidlna-1.1.5# wget https://sourceforge.net/p/minidlna/patches/_discuss/thread/e7ef1a11/6392/attachment/mkv_coverart_20150609.patch
--2015-11-11 19:59:10-- https://sourceforge.net/p/minidlna/patches/_discuss/thread/e7ef1a11/6392/attachment/mkv_coverart_20150609.patch
save: ««mkv_coverart_20150609.patch»».
100%[===================================================================================================================>] 2 753 --.-K/s за 0s
2015-11-11 19:59:14 (156 MB/s) - «mkv_coverart_20150609.patch» saved [2753/2753]
root@NAS:/opt/minidlna-1.1.5# patch -p1 < mkv_coverart_20150609.patch
patching file libav.h
patching file metadata.c
Hunk #2 FAILED at 695.
1 out of 2 hunks FAILED -- saving rejects to file metadata.c.rej
Why?
The patch was for v1.1.4 and another fix made the patch fail. Not really needed unless you are using certain version of ffmpeg or when you have multiple image attachments and want only the cover.jpg, small_cover.jpg to be used.
Patch for v1.1.5.
This patch adds album_art_names support for mkv embedded cover art.
First, checks for cover.jpg, cover_small.jpg, ${movie_name}.jpg. Then, checks the list of album_art_names in minidlna.conf. The first match found is used.
Note: Attachment support for some versions of ffmpeg was dropped.