Recording thumbnails - resolved! :-D (1 Viewer)

JiRo

MP Donator
  • Premium Supporter
  • May 1, 2009
    184
    44
    Prague
    Home Country
    Czech Republic Czech Republic
    Hi community,

    resolved is too strong a word, it is better to say it works, but ...
    I hope that further development found a standard solution of this problem for single and multiseat setups.

    Yes, I know recorded thumbnails is evergreen. I try to solve how to fill empty thumbnail frames in recording screen (TV plugin) and three thumbnail frames on BasicHome screen (Fanart plugin) with recording pictures.

    I use Black Glass skin and all of my findings based on analysis of this skin. Please note that with different skins may not be so!

    1. Place and name of thumbnail files

    TV Plugin expects recorded thumbnails in directory <MediaPortal data directory>\Thumbs\TV\Recorded. Name of picture file is <Name of recorded file>.jpg

    Fanart plugin expects recorded thumbnails in same directory <MediaPortal data directory>\Thumbs\TV\Recorded. Name of picture file is <Name of recorded file>L.jpg

    2. How get thumbnails?

    Files with recording are at TV Server disk obviously. If you have multiseat setup, you must share recording directory. Thumbnails we need at the client machine. I have created at client PC network disk R: which is mapped to the shared Server recording directory.

    For thumbnail generating i use standard MediaPortal application, mtn.exe task from <MediaPortal program directory>\MovieThumbnailer. I use batch file, where are two commands:

    1. Start of thumbnail generation for TV plugin
    2. Start of thumbnail generation for Fanart plugin

    Content of batch file:

    @echo off
    "C:\Program Files\Team MediaPortal\MediaPortal\MovieThumbnailer\mtn.exe" R:\ -c 1 -r 1 -D 8 -B 1000 -o L.jpg -i -P -W -t -O "C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\tv\Recorded"
    "C:\Program Files\Team MediaPortal\MediaPortal\MovieThumbnailer\mtn.exe" R:\ -c 1 -r 1 -D 8 -B 1000 -o .jpg -i -P -W -t -O "C:\ProgramData\Team MediaPortal\MediaPortal\thumbs\tv\Recorded"

    And finally, batch file is started with Task Sheduler each hour. Starting period is individual. Two time started mtn.exe run few second, usually 2-5, depend on number of new recordings. Existing old recordings thumbnails are ommited. Mnt.exe generates only new!

    3. And old recording thumbnails?

    It is individual. Personaly I'm using forefiles application and delete periodically recordings which are older than 30 days. I use MCEBuddy and recordings which remain in recording directory longer than 14 days convert automaticly to avi format and copy to work directory to editing with AviDemux application (cut start and end, advertisings, etc.). This means that recordings older than 14 days would practically not exist.

    That's it. Harshly simple, although not very clean. But it works for several weeks. Development time 10 mins, implementation phase 5 min, cost 0! :D

    JiRo.

    Here is BasicHome (Black Glass) with three thumbnails of last three TV recordings:
    jiro-albums-black-glass-mod-picture662-tv-selected-3-last-recorded-tv-shows-showed.png
     

    TiboTv

    Portal Pro
    June 22, 2009
    244
    39
    Home Country
    Belgium Belgium
    Hi,

    Your workaround seems to be a good idea. but...

    I can't find any thumbnail into the right folder. I'm using MP 1.1.3 on multiseat (1 server, 3 clients). All thumbnails and database (TV, MovingPictures, MPTVSeries, ...) are grouped on one share (on server hd).

    I'm pretty sure that I've already seen a "generate thumbnails" somewhere (in MP Client Config or MP Server Config) but I can't find it now!

    Could you help me?

    Thank you. :D
     

    TiboTv

    Portal Pro
    June 22, 2009
    244
    39
    Home Country
    Belgium Belgium
    I think I've found the good work around. I'm doing some tests and then I'm gonna return my solution. :D
     

    TiboTv

    Portal Pro
    June 22, 2009
    244
    39
    Home Country
    Belgium Belgium
    Hi,

    I've made some tests with mtn.exe and also with auto-movie thumbnailer (also a batch tool). Result are really different :

    - with mtn.exe delivered by MP : I can only obtain +- 30% of succeed thumbs generation.
    - with mtn.exe form original website/ : I can obtain +- 60% of succeed thumbs generation with the same set of parameters
    - with auto-movie thumbnailer : I can obtain +- 95% of succeed thumbs generation BUT there's a logo AMT on each pictures! Not really pretty in MP GUI

    All of my recordings are on SD format from the same transponder, so I don't really understand why it works only for a part of the recordings.

    My MP installation is on multiseat setup. So I think it was more logical to move all mtn files on my server (.dll's and .exe) because the thumbnail generation is (for me) a TVServer job!
    My thumbnails, databases, ... are share between all my clients and they are on TVServer harddrive. So it's easy to make the .bat file to launch mtn.exe because all resources are on the same computer.

    Here is my batch file (really similar than the JiRo's one but with different path and with parameter -B a bit higher because I start my recordings 15min before the EPG starttime)

    Code:
    @echo on
    "D:\MPSharings\TestRecupThumbnails\MovieThumbnailer\mtn 200808a\mtn-200808a-win32\mtn.exe" D:\TVRecordings -c 1 -r 1 -D 8 -B 1500 -o L.jpg -i -P -W -t -O "D:\MPSharings\Thumbs\tv\Recorded"
    "D:\MPSharings\TestRecupThumbnails\MovieThumbnailer\mtn 200808a\mtn-200808a-win32\mtn.exe" D:\TVRecordings -c 1 -r 1 -D 8 -B 1500 -o .jpg -i -P -W -t -O "D:\MPSharings\Thumbs\tv\Recorded"

    The batch file is launched by TaskScheduler each hour.

    I think it could be interesting to investigate why mtn.exe don't succeed to reach 100% of thumbnails generation...
     

    JiRo

    MP Donator
  • Premium Supporter
  • May 1, 2009
    184
    44
    Prague
    Home Country
    Czech Republic Czech Republic
    I think it could be interesting to investigate why mtn.exe don't succeed to reach 100% of thumbnails generation...

    Hi TiboTv,
    good investigative work. I did the same as you. But in my generation was a failures always less than 10% (typicaly 6-8%). So I let it be. I tried to find out why generations is not always 100% but I did not find anything.

    It is interesting that there are two types of failure:
    1. MTN creates a file, but it is empty (0 kilobytes)
    2. MTN does not create a file at all
    How type of failure do you have?

    Now have 42 recordings currently. MTN did not create the two correct files. First is empty second is not created. I tried delet all files and started generation manually again. The result was still the same. I will continue to investigate ...

    JiRo.
     

    TiboTv

    Portal Pro
    June 22, 2009
    244
    39
    Home Country
    Belgium Belgium
    JiRo,

    I've same behavior as you when it doesn't succeed : no file or empty file (0kb)
    And sometimes mtn.exe takes a long time on one file (2 or 3 min) before the next one.
    I've also try to delete all the results and restart mtn but the final % of succeed file is the same (and it's always the same bad files)

    At this moment I still not understand why...

    I've found a French guy (thumbnailme) who has developed a complete GUI for mtn but he doesn't rework the mtn core because he can't have answer from original mtn developer!

    Unfortunately it seems that mtn developement is stopped and soundforge sources aren't complete :(

    It could be really interesting to have complete C# files to place stop point into the program and add debug message to understand why some files sucks!
     

    glenn 1990

    Portal Pro
    July 1, 2010
    247
    36
    Home Country
    Belgium Belgium
    I also have the 0 kB thumbs (for hd channels).
    I searched for other thumbnailing programs, found some but none was working as it should.

    But, windows contains something to create thumbs, open your recording folder, set the layout on icons,.. and you'll see thumbs for all your recordings. It should be possible to get these thumbs in mediaportal ( code changes needed ) , because this is the way MP2 does it.
     

    JiRo

    MP Donator
  • Premium Supporter
  • May 1, 2009
    184
    44
    Prague
    Home Country
    Czech Republic Czech Republic
    But, windows contains something to create thumbs, open your recording folder, set the layout on icons,.. and you'll see thumbs for all your recordings. It should be possible to get these thumbs in mediaportal ( code changes needed ) , because this is the way MP2 does it.

    You are right. I also read about it in the section MP2. But use the thumbnail in Windows MP1 would require more effort then use MTN. It would mean to write an application that could read the thumbnail cache (or I'm wrong?). And I'm not a programmer...

    The question is also what the quality of thumbnail can be obtained, probably definitely not for the larger size images.

    Anyway, thanks for the suggestion.

    JiRo.

    P.S.
    Today I did small test. Change -B parameter in MTN command line. And files where the length 0kB, were generated correctly. But 0kB length again occurred in another files. I think that the length 0kB appear when MTN encounters on an error in the stream.
     

    TiboTv

    Portal Pro
    June 22, 2009
    244
    39
    Home Country
    Belgium Belgium
    Today I did small test. Change -B parameter in MTN command line. And files where the length 0kB, were generated correctly. But 0kB length again occurred in another files. I think that the length 0kB appear when MTN encounters on an error in the stream.

    JiRo,

    -B parameter set the start point (in secondes) of the first frame search. Normally, if duration file's is longer than the start point it must work! In my case, all recordings are longer. And 0kb files aren't specially short (in duration).

    I'm gonna make some tests this evening with the -B parameter.
     

    pilehave

    Community Skin Designer
  • Premium Supporter
  • April 2, 2008
    2,566
    521
    Hornslet
    Home Country
    Denmark Denmark
    On 1. of january all of our current MPEG2 broadcasts on DVB-T here i Denmark are changed to MPEG4. Currently mtn.exe used by MediaPortal doesn't create thumbnails for our MPEG4, only MPEG2. So, this means that in less than 4 months my recordings are without thumbnails.

    I tried playing around with the standalone mtn.exe but I would really prefer a new thumbnailer. Currently mtn is not developed any longer and is based on and old ffmpeg library.

    Anyone up for the task? Please?

    :)
     

    Users who are viewing this thread

    Top Bottom