home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Replacement MTN (Thumbnailer) for H264 content
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Jay_UK" data-source="post: 928682" data-attributes="member: 98509"><p>All,</p><p> </p><p>Please find attached a "replacement" for the MTN.exe thumbnailer used by Mediaportal.</p><p> </p><p>Due to MTN being a dead project with no updates in over a year, no response from the author and not being able to thumbnail all types of media, I decided to have a look at a "fix".</p><p> </p><p>Ideally MediaPortal should be updated to stop using MTN and switch to something else (internal Windows thumbnailing, FFmpeg, etc - Pilehive did post some code previously), but my coding abilities are limited, so I wrote a new MTN.exe which is simply a wrapper to FFMpeg.</p><p> </p><p>It takes the commandline options (most of them) that MTN was sent and runs them through FFMpeg.</p><p> </p><p>To install simply copy the two files from the ZIP file (MTN.EXE and FFMpeg.exe) and place them into the Mediaportal/MovieThumbNailer directory (overwriting the MTN that is there) - thats it <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite8" alt=":D" title="Big Grin :D" loading="lazy" data-shortname=":D" /></p><p> </p><p>If you want a more feature rich replacement for MTN (which will grab images from the internet, supports client/server, etc) then may I suggest you try Kiwijunglist's great version here:</p><p> </p><p><a href="https://forum.team-mediaportal.com/threads/tv-thumbnailer-custom-rec-tv-thumbs-better-h264-support.113415/" target="_blank">https://forum.team-mediaportal.com/threads/tv-thumbnailer-custom-rec-tv-thumbs-better-h264-support.113415/</a></p><p> </p><p>The updated "Source" zip contains the four modules used in this project (No project or solution file).</p><p> </p><p><strong>Change log:</strong></p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 77:</p><p>Fixed a bug if no registry key values are set.</p><p>Now supports "overridebegin" and "overrideend" registry keys. These override the commandline "begin" and "end" skip values (-B and -E). This will allow you to use different values to those hardcoded by Mediaportal (eg 720 and 500 I think - Cant remember the end value off the top of my head).</p><p>To specify the begin skip period, create the following key "overridebegin" (REG_SZ) and set it to the required time in seconds.</p><p>To specify the end skip period, create the following key "overrideend" (REG_SZ) and set it to the required time in seconds.</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 76:</p><p>Now supports "maxthumbnailwidth". This will prevent a thumbnail from exceeding this value. Handy if using "thumbwidth -1". If the thumbnail is wider than the maximum, it is rescaled to the maximum value (if the width is less than max, then nothing is done).</p><p>To specify the maximum width, create the following key "maxthumbnailwidth" (REG_SZ) and set it to the required width.</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 74:</p><p>Incorrect reporting of thumbnail in the log file</p><p>New option of "-1" for thumbnail size, will now make the thumbnail width to be the total width of the source videos * columns. This may may mean the thumbnail could be massive!</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 73:</p><p>Simplified maths/logic for calculating tile sizes</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 72:</p><p><strong>Customisable borders</strong></p><p>Now supports customisable internal and external borders.</p><p>Create a new registry key called "externalborder" and set it to the number of pixels</p><p>Create a new registry key called "internalborder" and set it to the number of pixels</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 71:</p><p><strong>Black Frame Detection</strong></p><p>Now supports black/blank frame detection. If a grabbed frame/tile is black, it will try and grab another one. It will try 3 times. If they are all black, it will give up and use the black grabbed frame. This option is on by default. To turn it off create the following registry key (REG_SZ): "disableblankframedetection" and set it to "1". Please let me know how you get on with detection rates and speed. This function does drastically slow the thumbnailing process down (it is not variable like the MTN version - might be something I look at going forward)</p><p> </p><p><strong>Borders</strong></p><p>Now supports black borders between the tiles. This is off by default, to enable borders (and specify thickness in pixels), create the following registry key (REG_SZ): "border" and set it to the required thickness.</p><p><strong>Image Quality</strong></p><p>Change the default, such that image encoding is done by default (JPEG quality is 100%). This will now produce smaller thumbs at 100% quality. To disable the encoding, set the "thumbnailquality" regsitry key to "-1"</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 70:</p><p>Code is now C# (instead of VB.Net) - Great fun converting data types!!</p><p>Fixed a logic/maths issue with tiling</p><p>Now includes a "thumbnailquality" option - set via the registry (value is 1 to 100 - Where 100 does no adjustment))</p><p>Now includes a "thumbnailwidth" option - set via the registry that sets the default size if one is</p><p>not set via the commandline (instead of using video size)</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 61:</p><p>Exit level on failure is now -1 (instead of 1)</p><p>Can now specify debug mode via commandline ("-debug")</p><p>Now supports two modes of aspect ratio:</p><p><strong>Thumbnail Aspect Ratio (default option)</strong></p><p>In this mode, the final thumbnail aspect ratio will match the source/video aspect ratio. This will mean the individual tile images may be distorted to ensure the overal AR is maintained for the thumbnail. The final thumbnail size should be quite consistant as it will be based on video aspect ratios (16:9, 4:3, etc)</p><p> </p><p><strong>Tile Aspect Ratio (custom option)</strong></p><p>In this mode the final thumbnail aspect ratio will not match the source/video aspect ratio. Instead the individual tile image(s) aspect ratios are maintained. This may mean the overall thumbnail AR (dimensions) will be way off. I'm not sure how well MePo will handle it. In this mode having a large differential between rows and columns will make the overall thumbnail size "interesting".</p><p> </p><p>To change from the default mode, to the TileAR mode, create a reg key call "keeptilear" and set it to "1" (or specify "-keeptilear") as a commandline option.</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 60:</p><p>Refactored the code a little</p><p>Dropped the minimum video length to 30 seconds (instead of 60)</p><p>Now supports process priority (use a reg key called "priority" and set it to: realtime, abovenormal, belownormal,high, normal,idle) - default is BELOWNORMAL</p><p>Has a commandline help feature (mtn.exe --h or -h or -help)</p><p>Temporary tile files are now saved into a MTN_Replacement sub directory in "Windows Temp"</p><p>Exit level set to 1 on a failure (0 on success)</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 59:</p><p>Switched to using a more complex process based launching mechanism (instead of shell and external file)</p><p>If FFmpeg fails to extract movie details, the program will assume some defaults (duration 300, width 1270)</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 56:</p><p>Fixed annoying issues with long filenames and spaces (which I thought I had fixed in v55)</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 55:</p><p>Fixed issues of paths with spaces/long names</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 53:</p><p>Reverted to FFMpeg for extracting movie details</p><p>Fixed stupid timeout mistake (wanted miliseconds I gave it secsonds)</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 52:</p><p>Tried using MediaInfo to extract details but was taking 20 seconds to open/read a movie of the LAN</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 51:</p><p>A large rewrite to address issues and performance (wife is not happy about how much time I've spent on it!!)</p><p>No longer uses FFmpeg to tile (internally done by code)</p><p>Frame grabs are now equally spaced between start and end points</p><p>Supports custom suffix</p><p>Supports custom output directory</p><p>Supports end skip value</p><p>If no custom size is specified for thumbnail, the size of the source is used</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 50:</p><p>Major issue/bug - so not available anymore!!</p><p>Program rewritten using VB.Net</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 49:</p><p>Fixed issue of rows and columns the wrong way around</p><p>-------------------------------------------------------------------------------------------------------------------------</p><p>Version 48:</p><p>Tweaked the "debug" setting - You can either use a "mtn.debug" flag file (in the same directory as the mtn.exe file), or you can create the following reg key: HKLM\Software\MTN\debug (create as a string and set to 1).</p><p> </p><p>To make everyone's life easy, I have included two reg files within the Zip file - these will turn on/off debug (simply double click on either one).</p><p> </p><p>With debug enabled, MTN will create a "mtn_replacement.log" log file in the mtn.exe directory.</p><p>---------------------------------------------------------------------------------------------------------------------------</p><p> </p><p>Many thanks,</p><p> </p><p>J.</p></blockquote><p></p>
[QUOTE="Jay_UK, post: 928682, member: 98509"] All, Please find attached a "replacement" for the MTN.exe thumbnailer used by Mediaportal. Due to MTN being a dead project with no updates in over a year, no response from the author and not being able to thumbnail all types of media, I decided to have a look at a "fix". Ideally MediaPortal should be updated to stop using MTN and switch to something else (internal Windows thumbnailing, FFmpeg, etc - Pilehive did post some code previously), but my coding abilities are limited, so I wrote a new MTN.exe which is simply a wrapper to FFMpeg. It takes the commandline options (most of them) that MTN was sent and runs them through FFMpeg. To install simply copy the two files from the ZIP file (MTN.EXE and FFMpeg.exe) and place them into the Mediaportal/MovieThumbNailer directory (overwriting the MTN that is there) - thats it :D If you want a more feature rich replacement for MTN (which will grab images from the internet, supports client/server, etc) then may I suggest you try Kiwijunglist's great version here: [url]https://forum.team-mediaportal.com/threads/tv-thumbnailer-custom-rec-tv-thumbs-better-h264-support.113415/[/url] The updated "Source" zip contains the four modules used in this project (No project or solution file). [B]Change log:[/B] ------------------------------------------------------------------------------------------------------------------------- Version 77: Fixed a bug if no registry key values are set. Now supports "overridebegin" and "overrideend" registry keys. These override the commandline "begin" and "end" skip values (-B and -E). This will allow you to use different values to those hardcoded by Mediaportal (eg 720 and 500 I think - Cant remember the end value off the top of my head). To specify the begin skip period, create the following key "overridebegin" (REG_SZ) and set it to the required time in seconds. To specify the end skip period, create the following key "overrideend" (REG_SZ) and set it to the required time in seconds. ------------------------------------------------------------------------------------------------------------------------- Version 76: Now supports "maxthumbnailwidth". This will prevent a thumbnail from exceeding this value. Handy if using "thumbwidth -1". If the thumbnail is wider than the maximum, it is rescaled to the maximum value (if the width is less than max, then nothing is done). To specify the maximum width, create the following key "maxthumbnailwidth" (REG_SZ) and set it to the required width. ------------------------------------------------------------------------------------------------------------------------- Version 74: Incorrect reporting of thumbnail in the log file New option of "-1" for thumbnail size, will now make the thumbnail width to be the total width of the source videos * columns. This may may mean the thumbnail could be massive! ------------------------------------------------------------------------------------------------------------------------- Version 73: Simplified maths/logic for calculating tile sizes ------------------------------------------------------------------------------------------------------------------------- Version 72: [B]Customisable borders[/B] Now supports customisable internal and external borders. Create a new registry key called "externalborder" and set it to the number of pixels Create a new registry key called "internalborder" and set it to the number of pixels ------------------------------------------------------------------------------------------------------------------------- Version 71: [B]Black Frame Detection[/B] Now supports black/blank frame detection. If a grabbed frame/tile is black, it will try and grab another one. It will try 3 times. If they are all black, it will give up and use the black grabbed frame. This option is on by default. To turn it off create the following registry key (REG_SZ): "disableblankframedetection" and set it to "1". Please let me know how you get on with detection rates and speed. This function does drastically slow the thumbnailing process down (it is not variable like the MTN version - might be something I look at going forward) [B]Borders[/B] Now supports black borders between the tiles. This is off by default, to enable borders (and specify thickness in pixels), create the following registry key (REG_SZ): "border" and set it to the required thickness. [B]Image Quality[/B] Change the default, such that image encoding is done by default (JPEG quality is 100%). This will now produce smaller thumbs at 100% quality. To disable the encoding, set the "thumbnailquality" regsitry key to "-1" ------------------------------------------------------------------------------------------------------------------------- Version 70: Code is now C# (instead of VB.Net) - Great fun converting data types!! Fixed a logic/maths issue with tiling Now includes a "thumbnailquality" option - set via the registry (value is 1 to 100 - Where 100 does no adjustment)) Now includes a "thumbnailwidth" option - set via the registry that sets the default size if one is not set via the commandline (instead of using video size) ------------------------------------------------------------------------------------------------------------------------- Version 61: Exit level on failure is now -1 (instead of 1) Can now specify debug mode via commandline ("-debug") Now supports two modes of aspect ratio: [B]Thumbnail Aspect Ratio (default option)[/B] In this mode, the final thumbnail aspect ratio will match the source/video aspect ratio. This will mean the individual tile images may be distorted to ensure the overal AR is maintained for the thumbnail. The final thumbnail size should be quite consistant as it will be based on video aspect ratios (16:9, 4:3, etc) [B]Tile Aspect Ratio (custom option)[/B] In this mode the final thumbnail aspect ratio will not match the source/video aspect ratio. Instead the individual tile image(s) aspect ratios are maintained. This may mean the overall thumbnail AR (dimensions) will be way off. I'm not sure how well MePo will handle it. In this mode having a large differential between rows and columns will make the overall thumbnail size "interesting". To change from the default mode, to the TileAR mode, create a reg key call "keeptilear" and set it to "1" (or specify "-keeptilear") as a commandline option. ------------------------------------------------------------------------------------------------------------------------- Version 60: Refactored the code a little Dropped the minimum video length to 30 seconds (instead of 60) Now supports process priority (use a reg key called "priority" and set it to: realtime, abovenormal, belownormal,high, normal,idle) - default is BELOWNORMAL Has a commandline help feature (mtn.exe --h or -h or -help) Temporary tile files are now saved into a MTN_Replacement sub directory in "Windows Temp" Exit level set to 1 on a failure (0 on success) ------------------------------------------------------------------------------------------------------------------------- Version 59: Switched to using a more complex process based launching mechanism (instead of shell and external file) If FFmpeg fails to extract movie details, the program will assume some defaults (duration 300, width 1270) ------------------------------------------------------------------------------------------------------------------------- Version 56: Fixed annoying issues with long filenames and spaces (which I thought I had fixed in v55) ------------------------------------------------------------------------------------------------------------------------- Version 55: Fixed issues of paths with spaces/long names ------------------------------------------------------------------------------------------------------------------------- Version 53: Reverted to FFMpeg for extracting movie details Fixed stupid timeout mistake (wanted miliseconds I gave it secsonds) ------------------------------------------------------------------------------------------------------------------------- Version 52: Tried using MediaInfo to extract details but was taking 20 seconds to open/read a movie of the LAN ------------------------------------------------------------------------------------------------------------------------- Version 51: A large rewrite to address issues and performance (wife is not happy about how much time I've spent on it!!) No longer uses FFmpeg to tile (internally done by code) Frame grabs are now equally spaced between start and end points Supports custom suffix Supports custom output directory Supports end skip value If no custom size is specified for thumbnail, the size of the source is used ------------------------------------------------------------------------------------------------------------------------- Version 50: Major issue/bug - so not available anymore!! Program rewritten using VB.Net ------------------------------------------------------------------------------------------------------------------------- Version 49: Fixed issue of rows and columns the wrong way around ------------------------------------------------------------------------------------------------------------------------- Version 48: Tweaked the "debug" setting - You can either use a "mtn.debug" flag file (in the same directory as the mtn.exe file), or you can create the following reg key: HKLM\Software\MTN\debug (create as a string and set to 1). To make everyone's life easy, I have included two reg files within the Zip file - these will turn on/off debug (simply double click on either one). With debug enabled, MTN will create a "mtn_replacement.log" log file in the mtn.exe directory. --------------------------------------------------------------------------------------------------------------------------- Many thanks, J. [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Replacement MTN (Thumbnailer) for H264 content
Contact us
RSS
Top
Bottom