Transcoded thumbnail cache support

  • iwonbigbro

    iwonbigbro - 2010-03-30

    I just upgraded to a later version of mediatomb that now has ffmpegthumbnailer support.  However, I don't want to use this for a few good reasons, so have opted to stick with my original transcoder definition.  But, the transcoding of thumbnails using my script no longer works, and the log file is pretty vague about what is wrong:

    2010-03-29 20:32:01    INFO: Arguments: -o %out %in
    2010-03-29 20:32:03    INFO: Arguments: -o %out %in
    2010-03-29 20:32:05    INFO: Arguments: -o %out %in
    2010-03-29 20:32:09    INFO: Arguments: -o %out %in
    2010-03-29 20:32:13    INFO: Arguments: -o %out %in
    2010-03-29 20:32:17    INFO: Arguments: -o %out %in

    Nice and useful.  I am guessing some modification made during the implementation of ffmpegthumbnailer support, is preventing my custom transcoder from working.

    Now the reasons why ffmpegthumbnailer is not an acceptable solution for me, is because I am running the mediatomb on a hacked LinkStation box.  The CPU is a low power 266 MHz ARM chip, not capable of producing vast quantities of thumbnails on demand like your average box.  Topped with the minimal 128 MB of RAM, that makes matters worse.  The solution was to implement a transcoder that would produce a thumbnail once on the fly, but cache the thumbnail along side the movie file for it to be recalled on subsequent requests for that file.  Since the images are small (128x128) and low quality, the overhead of just serving up existing cached thumbnails is minimal compared to having to regenerate them using ffmpegthumbnailer each time.

    The best solution is that mediatomb cache thumbnails itself in the database, so they can be recalled without having to interrogate the ffmpegthumbnailer.  This would make mediatomb much more lightweight and would encourage me to turn on the ffmpeg support myself.  However, at the moment it would just kill my little NAS drive if I were to enable it.

  • iwonbigbro

    iwonbigbro - 2010-03-30

    Looking at the debug output, can anybody enlighten me on what the following option is for?:

    /server/storage/attribute::caching using default value: yes
  • Jin

    Jin - 2010-03-30

    The printout is indeed not very helpful, however you can enable debug output using the -D option, this will show you much more. Otherwise transcoding should work similar as in 0.11, maybe post your profile?

    I did think about thumbnail caching, but there were too many open questions. Where to put them? Simply saving them in the same directory as the video would not be very nice, especially since they would get picked up by the scan and put into the Photos directory.

    Having a separate directory would require some housekeeping, i.e. making sure that the thumbnail cache is up to date with the actual data, and so on. No quick hack. We plan to add it, but we have to think it through first.

    All config.xml options are described in the documentation. The caching option will improve performance of data import on desktop systems, but will probably stress the NAS'es too much and even perform worse there when enabled. This option has nothing to do with thumbnails.

  • iwonbigbro

    iwonbigbro - 2010-03-30

    Are there any command line tools for testing UPnP servers?  Looking for something that doesn't require X support that I can use to encourage mediatomb to attempt to stream thumbnails for a given node.

  • Jin

    Jin - 2010-03-30

    Why does X support matter? You can test it remotely.

    Try the Cidero control point (see FAQ), it will nicely print you the URLs to the video and to the thumbnail. You could then try to wget the thumbnail link to simulate what your player does, this will trigger your script. You can run Cidero on your desktop or notebook or whatever, it will find MediaTomb that is running on your NAS.

  • iwonbigbro

    iwonbigbro - 2010-03-30

    That's great!

    X support matters since I don't have the necessary libraries in order to enable Xforwarding from the NAS, and my remote machine does not have access to the UPnP service on the internal network.  I effectively have to test it on-box, since the PS3 is at home ;-)  I originally looked at using gupnp-tools, but they require gnome libraries.

  • Jin

    Jin - 2010-03-31

    There are some scripts that forward or proxy UPnP traffic across networks… but otherwise by "remotely" I meant - test it from any other machine on your LAN by running the Cidero application. Of course if you are  away from your LAN - it's more complicated… maybe you have another PC on your home network which you can access?

    I know there are some scripts/tools around that proxy/bridge UPnP across the internet, but I can not point you to anything particular, you'd have to google.


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks