#92 Movie thumbnail support


Adding thumbnail generation to movies. Can be disabled at compile or runtime.


Patches: #92


1 2 > >> (Page 1 of 2)
  • caribouk

    caribouk - 2013-01-12

    @Eduardo, I have had to set the seek_percentage to 25% as my recorded TV shows are around have a safety buffer of 3 mins, so for half hour shows the thumbnail generated (at 10% by default) is often the previous program or the adverts before the main show.. could the patch be amended to set this to 25%?

    Also, I have a personal preference for overlay film strips and was wondering whether you would consider adding an overlay_film_strip a parameter to enable this..


  • Eduardo Rocha

    Eduardo Rocha - 2013-01-20
    • summary: Thumbnail support --> Movie thumbnail support
  • Eduardo Rocha

    Eduardo Rocha - 2013-01-20

    caribouk, please help me test the version 3 of the patch that includes the film strip and some inotify optimization on folder rename. I´ve also uploaded a patch for the current CVS version.

  • TeHashX

    TeHashX - 2013-01-25

    1.0.25v3.patch works fine for me, film strip included.

  • caribouk

    caribouk - 2013-01-26

    Hi Eduardo
    I have tested the v3 patch, with and without filmstrip overlays and it works beautifully.

    inotify also works and thumnbails are automatically generated. The folder structure on the TV does not get reloaded until I exit back to the allshare menu and select minidlna again.. but I guess that's down to some sort of caching.

    Thanks for the patch...

    P.S. Are you working on any further samsung related patches?

  • caribouk

    caribouk - 2013-01-26

    Oh and the 20% seek produces much better thumbnails for me !

  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here

    Anonymous - 2013-04-06

    I'm trying to apply this patch to entware minidlna and is compiling fine without errors but wil not generate thumbnails, I get this errors in log:

    admin@RT-AC66U:/tmp/home/root# minidlna -f /opt/etc/minidlna.conf -d
    parsing error file /opt/etc/minidlna.conf line 71 : enable_thumbnail=yes
    parsing error file /opt/etc/minidlna.conf line 74 : thumbnail_width=160
    parsing error file /opt/etc/minidlna.conf line 77 : thumbnail_quality=8
    parsing error file /opt/etc/minidlna.conf line 80 : enable_thumbnail_filmstrip=yes
    [2013/04/06 18:18:01] minidlna.c:913: warn: Starting MiniDLNA version 1.0.25 [SQLite].

    Thumbnail generation are enabled at compile time, any advice please?

  • TeHashX

    TeHashX - 2013-04-09

    Hi, after applying thumbnail_minidlna-1.1.0.patch I get the following errors:
    parsing error file /etc/minidlna.conf line 70 : enable_thumbnail=yes
    parsing error file /etc/minidlna.conf line 73 : thumbnail_width=160
    parsing error file /etc/minidlna.conf line 76 : thumbnail_quality=8
    parsing error file /etc/minidlna.conf line 79 : enable_thumbnail_filmstrip=yes
    Please fix

  • Eduardo Rocha

    Eduardo Rocha - 2013-04-10

    If you are using the 1.1.0 patch, you should use --enable-thumbnail option at ./configure and check if you have libffmpegthumbnailer developement files in your system (see the configure output).

  • TeHashX

    TeHashX - 2013-04-10

    I have this line in ./configure: --enable-thumbnail
    Should I change something else?

  • Eduardo Rocha

    Eduardo Rocha - 2013-04-11

    This line says to the configure that you want to use the thumbnail generation. The configure program will then check if you have libffmpegthumbnailer isntalled on the system along with its .h file. Check the configure output. The message "Unable to find libffmpegthumbnailer" means that you do not have all the libffmpegthumbnailer files on your system.

  • TeHashX

    TeHashX - 2013-04-11

    Thx for fast reply
    I have libffmpegthumbnailer-dev , ffmpeg and ffmpegthumbnailer installed but ./configure output is always:
    checking whether to enable video thumbnail generation using libffmpegthumbnailer... no
    Here is all output http://pastebin.com/e6C8kj9c
    With 1.0.25 is so simple...

  • Eduardo Rocha

    Eduardo Rocha - 2013-04-15

    This output does not help much. Please send me the config.log content.

  • TeHashX

    TeHashX - 2013-04-19

    Has anyone applied the 1.1.0 patch and get thumbnails working? because I installed ubuntu 12.10 x32 from scratch and still the same error.

  • Eduardo Rocha

    Eduardo Rocha - 2013-05-03

    Sorry about the delay. I haven´t had much time to work on this. I´ve just uploaded a new version using pkg-config. See if it works. If not, run the command "pkg-config --list-all" to check if you have libffmpegthumbnailer installed.

  • TeHashX

    TeHashX - 2013-05-03

    Thanks for your help, still the same error:

    thx@ubuntu:~/Downloads/minidlna$ minidlnad -f /home/thx/Downloads/minidlna/minidlna.conf -d
    parsing error file /home/thx/Downloads/minidlna/minidlna.conf line 74 : enable_thumbnail=yes
    parsing error file /home/thx/Downloads/minidlna/minidlna.conf line 77 : thumbnail_width=160
    parsing error file /home/thx/Downloads/minidlna/minidlna.conf line 80 : thumbnail_quality=8
    parsing error file /home/thx/Downloads/minidlna/minidlna.conf line 83 : enable_thumbnail_filmstrip=yes

    and ffmpegthumbnailer is installed:

    thx@ubuntu:~/Downloads/minidlna$ pkg-config --list-all
    pm-utils pm-utils - Power management scripts for suspend and hibernate
    libswscale libswscale - Libav image rescaling library
    libavcodec libavcodec - Libav codec library
    ncurses ncurses - ncurses 5.9 library
    udisks udisks - udisks storage daemon
    libexif libexif - Library for easy access to EXIF data
    libavutil libavutil - Libav utility library
    yelp-xsl yelp-xsl - Yelp XSLT Stylesheets
    menu menu - ncurses 5.9 add-on library
    nautilus-sendto nautilus-sendto - Extend nautilus-sendto through plugins
    vorbisfile vorbisfile - vorbisfile is a library that provides a convenient high-level API for decoding and basic manipulation of all Vorbis I audio streams
    vorbis vorbis - vorbis is the primary Ogg Vorbis library
    ncurses++ ncurses++ - ncurses 5.9 add-on library
    vorbisenc vorbisenc - vorbisenc is a library that provides a convenient API for setting up an encoding environment using libvorbis
    bash-completion bash-completion - programmable completion for the bash shell
    tic tic - ncurses 5.9 add-on library
    fontutil FontUtil - Font utilities dirs
    ibus-table IBus-Table - Table Based Input Method Framework for Intelligent Input Bus for Linux / Unix OS
    usbutils usbutils - USB device database
    mobile-broadband-provider-info mobile-broadband-provider-info - Mobile Broadband Service Provider Information Database
    iso-codes iso-codes - ISO country, language, script and currency codes and translations
    id3tag id3tag - ID3 tag reading library
    libavformat libavformat - Libav container format library
    xorg-wacom xorg-wacom - X.Org Wacom Tablet driver.
    tinfo tinfo - ncurses 5.9 terminal interface library
    openssl OpenSSL - Secure Sockets Layer and cryptography libraries and tools
    panel panel - ncurses 5.9 add-on library
    udev udev - udev
    sqlite3 SQLite - SQL database engine
    libcrypto OpenSSL-libcrypto - OpenSSL cryptography library
    notify-python notify-python - Python bindings for libnotify
    expat expat - expat XML parser
    libssl OpenSSL - Secure Sockets Layer and cryptography libraries
    libffmpegthumbnailer libffmpegthumbnailer - Generates thumbnails for movie files
    shared-mime-info shared-mime-info - Freedesktop common MIME database
    xbitmaps X bitmaps - Bitmaps that are shared between X applications
    ogg ogg - ogg is a library for manipulating ogg bitstreams
    gnome-icon-theme gnome-icon-theme - A collection of icons used as the basis for GNOME themes
    form form - ncurses 5.9 add-on library
    zlib zlib - zlib compression library
    libquvi-scripts libquvi-scripts - Scripts for libquvi
    flac FLAC - Free Lossless Audio Codec Library
    xkeyboard-config XKeyboardConfig - X Keyboard configuration data
    dbus-python dbus-python - Python bindings for D-Bus

  • TeHashX

    TeHashX - 2013-05-13

    Another thing, when I run ./configure it's not checking for:
    checking whether to enable video thumbnail generation using libffmpegthumbnailer... no
    like in 1.0.25, maybe this could be the issue

  • TeHashX

    TeHashX - 2013-05-17

    I finally managed to make it work, all I have to do was to add --enable-thumbnail after ./configure

    ./configure --enable-thumbnail

  • Comment has been marked as spam. 

    You can see all pending comments posted by this user  here

    Anonymous - 2013-05-18

    great patch, seems to work nice here for now. thank you
    Don't understand why this nice feature is not included...

  • richud

    richud - 2013-11-02

    @eduardo, great patch, few problems though!

    It is segfaulting for me with certain files, e.g. 'big_buck_bunny_480p_h264.mov', from http://mirror.bigbuckbunny.de/peach/bigbuckbunny_movies/big_buck_bunny_480p_h264.mov


    I assume this is a fault with ffmpegthumbnailer - is there anything you can do regarding passing options to it?

    Also it tries the scan the file as soon as inotify sees it created, rather than when it is all copied (Can you use inotify IN_CLOSE_WRITE to trigger instead?)

    2) If a file is renamed and then scanned it seems to segfault too, this file here (good source of test files) http://www.auby.no/files/video_tests/h264_1080p_hp_4.1_10mbps_dts_unstyled_subs_monsters.mkv


    3)update while this patch is a great idea there are many files that ffmpegthumbnailer (or avcodec) fails on breaking the scanning (kills minidlnad thread), changing the thumb size by a few pixels can be enough to make certain files work or fail.

    4)appears to be bug in patch, think this is the mistake & correction.

    • if (runtime_vars.thumb_width > 30)
    • runtime_vars.thumb_quality = 30;

    • if (runtime_vars.thumb_quality > 10)

    • runtime_vars.thumb_quality = 10;
    Last edit: richud 2013-11-10
    • Eduardo Rocha

      Eduardo Rocha - 2013-11-11

      @chud, I was unable to download the file. The link you've sent redirects to a page.

      Please make sure you are using the latest version of ffmpedthumnailer and avcodec.

      Minidlna already uses IN_CLOSE_WRITE event to call the thumbnail generation. If you are copying more than one file, the generation of the first will ovelap the second copy operation.

      I'll upload a new patch for the latest commit in git fixing the bug (4).

      • TeHashX

        TeHashX - 2013-11-20

        Can you please provide the patch for v1.1.1?

        • Eduardo Rocha

          Eduardo Rocha - 2013-11-26

          here it goes the patch for the git head that should work on v1.1.1.

          • HPP8140

            HPP8140 - 2014-03-07

            Hi, I'm getting some errors patching the following files with '


            If someone would be so kind to send to me.


  • richud

    richud - 2013-11-12

    just tried - all links work?

    I was building with FFmpeg 2.0.2 "Nameless", libavcodec 55. 18.102, and latest ffmpegthumbnailer, (ffmpeg 2.1 doesn't work with minidlna), (I have tried several older releases of everything too.) To be honest I have given up now . [I develop a 3rd party router firmware and was hoping to incorporate your patch]

    I ended up using this torrent as my test 'Solaris [1972] 1080p Rus + Eng subs'

    It is a BR rip with ~14 mkv's in the Extra's folder. The default thumb size of 160 would always crash it processing 'solaris_00317.mkv', setting thumb to 200 would work fine on all, setting it to something else (cant remember what, maybe 120) would make it fail on a different mkv.

    Basically video_thumbnailer_generate_thumbnail_to_file() kills the minidlna thread dead if it tries something it dislikes. (i.e. presume fault with ffmpegthumbnailer/avcodec, I guess there isn't much you could do)

    Anyway cheers for your hard work!

  • Eduardo Rocha

    Eduardo Rocha - 2013-11-13


    I've tested with the solaris_00317.mkv with 160 and it worked fine here. In fact, I'm using this patch for more than 10 months now and I've never got a SEGFAULT. I'm using it on a raspberrypi with debian.

    Anyhow, I'll work on removing the ffmpegthumbnailer as soon as I've got some free time.

  • richud

    richud - 2013-11-14

    @eduardo, hmm thats interesting - any thoughts as to why the thumb size could have any effect? (I tried altering quality but made no difference). This is on MIPS incidently, ffmpeg had no special asm in it either. Anyway if you can remove need for ffmpegthumbnailer that hopefully will sort it so I wont worry about it now :)
    Also if you are interested it struggled on avi's (specifically Greys Anatomy S08 xvid is all I tried), it appeared to try and seek and fail then say was using the first frame (black). (or words to that effect it was a week or so ago and I cannot remember what it was exactly) It would be about an order of magnitude slower on these avi's as mkv's presubably as it tried to seek through whole file? Just out of interest is this normal or not?
    Thanks again, R

  • joao feijo

    joao feijo - 2013-11-28

    @eduardo rocha do you know the patch to correct folder structure. I am using it and it´s awesome for samsung tvs. I already use yours samsungES.patch and i will try this one tonight.
    Regards from Brasil

  • TeHashX

    TeHashX - 2014-02-05

    I've seen you added a lot of updates to git repository, can you please add this thumbnail patch too? Users have to enable manually thumbnails creation at compile time if needed.
    Thanks for your work

  • TeHashX

    TeHashX - 2014-03-07

    I'm trying to apply thumbnails patch to v1.1.2 but when I run make, I get this error:

    CC minidlna.o
    In file included from minidlna.c:85:
    options.h:67: error: expected ',' or '}' before 'FORCE_SORT_CRITERIA'
    minidlna.c: In function 'init':
    minidlna.c:711: error: 'FORCE_SORT_CRITERIA' undeclared (first use in this function)
    minidlna.c:711: error: (Each undeclared identifier is reported only once
    minidlna.c:711: error: for each function it appears in.)
    minidlna.c:714: error: 'MAX_CONNECTIONS' undeclared (first use in this function)
    make[2]: [minidlna.o] Error 1
    make[2]: Leaving directory /var/tmp/b' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/var/tmp/b'
    [all] Error 2

  • Eduardo Rocha

    Eduardo Rocha - 2014-03-07

    here it goes the patch based on yesterday git tree. Should work with 1.1.2.

    • TeHashX

      TeHashX - 2014-03-08

      Thanks for the patch, I compiled and working fine on debian asuswrt mipsel routers http://forums.smallnetbuilder.com/showthread.php?t=14573, the only warning I get when I run make is:
      CC upnpsoap.o
      upnpsoap.c: In function 'parse_sort_criteria':
      upnpsoap.c:514: warning: 'saveptr' may be used uninitialized in this function
      CC upnpreplyparse.o

      Last edit: TeHashX 2014-03-08
  • kdeenkhoorn

    kdeenkhoorn - 2014-04-26

    Hi All,
    The patch for version 1.1.2 as downloaded tonight does not work for ubuntu 12.04.
    After applying the patch ./configure --enable-thumbnail warns about a non existing option --enable-thumbnail. Also the ffmpeg thumbnail libraries ar'nt checked although they are installed on the system.
    After starting this new build minidlna binary complains about the thumbnail options in the config file and no thumbs are created.
    Currently i'm using 1.0.25 with an earlier version of this patch without a problem. Hopefully it will be fixed because the extra sub directory option in 1.1.2 is my wish for a long time.

    Last edit: kdeenkhoorn 2014-04-26
  • kdeenkhoorn

    kdeenkhoorn - 2014-04-28

    Found it: i was missing the autoconf package and after installation that part was fixed.
    I dit ./configure --enable-thumbs --enable-static

    The static part failed during the make phase because of a missing -lgcc_s this was fixed editing:


    if test "$enableval" = "yes"; then


    if test "$enableval" = "yes"; then
    STATIC_LDFLAGS="-Wl -Bstatic"

    Now i have a working minidlna daemon 1.1.2 for my Samsung UE32C6800.

  • Раджа

    Раджа - 2014-06-15

    Can you update your patch for 1.1.3?

    Attached file is my version of the patch.

    Last edit: Раджа 2014-06-15
  • Eduardo Rocha

    Eduardo Rocha - 2014-09-04

    Hi folks, here it goes the patch for minidlna 1.1.4. This is the last time I'll post it here since it will probably never get into the main branch. Feel free to keep it updated. Cheers!

    Last edit: Eduardo Rocha 2014-09-04
    • TeHashX

      TeHashX - 2014-09-04

      Thanx for the patch, I wonder why is not included?

  • Eduardo Rocha

    Eduardo Rocha - 2014-09-04

    Patches regarding video thumbnail has been around for more than 2 years now. Over that time, ARM CPU got much faster. Yes, it will make the scan process take a while longer but full scan happens once in a while if you have inotify enabled.
    Anyhow, I've created a github repository to create features that will make my user experience better. Feel free to cherry pick them.

  • TeHashX

    TeHashX - 2015-02-26

    Sorry, I was asking Eduardo Rocha git address because he said here https://sourceforge.net/p/minidlna/patches/92/?limit=25&page=1#de59
    "I've created a github repository to create features that will make my user experience better. Feel free to cherry pick them."

1 2 > >> (Page 1 of 2)

Log in to post a comment.