FrostByte 5063 Posted August 19, 2015 Share Posted August 19, 2015 (edited) What is the long alpha/num thing after the title? A lot of my text ones work now that didn't before, thanks Still needs some tweaking on others like you mentioned. Edited August 19, 2015 by FrostByte Link to comment Share on other sites More sharing options...
Happy2Play 8389 Posted August 19, 2015 Share Posted August 19, 2015 What is the long alpha/num thing after the title? I believe it is the movie id to distinguish between same name movies I reported. 1 Link to comment Share on other sites More sharing options...
FrostByte 5063 Posted August 19, 2015 Share Posted August 19, 2015 Ahh, I couldn't see where it was coming from, but I think I see it now. Link to comment Share on other sites More sharing options...
chef 3752 Posted August 19, 2015 Share Posted August 19, 2015 What is the long alpha/num thing after the title? A lot of my text ones work now that didn't before, thanks Still needs some tweaking on others like you mentioned. It was complicated, you have to split the title into parts and then count the letters in each part to make sure they don't run off the thumb. Then wrap the parts accordingly. Lol! 1 Link to comment Share on other sites More sharing options...
FrostByte 5063 Posted August 19, 2015 Share Posted August 19, 2015 Well, I appreciate your effort. Even if you can't fix it all there are a bunch it did. I can only find 2 text ones that don't fit right now 1 Link to comment Share on other sites More sharing options...
chef 3752 Posted August 19, 2015 Share Posted August 19, 2015 Well, I appreciate your effort. Even if you can't fix it all there are a bunch it did. I can only find 2 text ones that don't fit right now I'll wrap the fourth word if it exceeds the spacing limit. That'll fix it up. Link to comment Share on other sites More sharing options...
FrostByte 5063 Posted August 19, 2015 Share Posted August 19, 2015 Here is that other one. 1 Link to comment Share on other sites More sharing options...
chef 3752 Posted August 20, 2015 Share Posted August 20, 2015 After reading this tracker article here: http://emby.media/community/index.php?/topic/23972-genre-images-source-list/ I think that we should add a genre thumb image editor tab to the form. 1 Link to comment Share on other sites More sharing options...
chef 3752 Posted August 22, 2015 Share Posted August 22, 2015 I think this solves the text wrapping problems. But for movies with really long titles (ie. "The Lord of the Rings: Fellowship of the Ring")... lets just say, I'm glad there will be logos made for them. lol! https://dl.dropboxusercontent.com/u/46151346/Thumb%20Maker.zip 1 Link to comment Share on other sites More sharing options...
Happy2Play 8389 Posted August 22, 2015 Share Posted August 22, 2015 (edited) Looks like a little more adjusting. Really long name Assault at West Point, The Court-Martial of Johnson Whittaker Edited August 22, 2015 by Happy2Play 1 Link to comment Share on other sites More sharing options...
FrostByte 5063 Posted August 22, 2015 Share Posted August 22, 2015 (edited) For the two I'm having issues with (2 pics in #105/107) it fixed the space between the words on the one (space after Christmas), but neither one wraps that last word still. Very close Edit: new pics Edited August 22, 2015 by FrostByte 1 Link to comment Share on other sites More sharing options...
chef 3752 Posted August 23, 2015 Share Posted August 23, 2015 (edited) I think is aligns the text better. It also takes into consideration the "-" in media titles so it can be broken down into manageable string sizes. The only thing I can see happening now, is that the title is so long, that it would run off the bottom of the thumb image, but at least it won't run off the right side. If it does run off the bottom, then it'll have to be coded to move the title up if the lines exceed the bottom. <-- this is going to happen I already know it... https://dl.dropboxusercontent.com/u/46151346/Thumb%20Maker.zip Edited August 23, 2015 by chef 2 Link to comment Share on other sites More sharing options...
FrostByte 5063 Posted August 23, 2015 Share Posted August 23, 2015 Well...I think that made it worse in some cases. It seems like it is returning after almost every word now except real small words (the, it's, is, etc). Movies that use to fit no longer do. All of them did a return line in places it didn't need to. A lot more movies run off now because they are too big. Link to comment Share on other sites More sharing options...
chef 3752 Posted August 23, 2015 Share Posted August 23, 2015 Damn! That was unexpected. Back to the drawing board. I am learning to hate graphic text. Lol! 1 Link to comment Share on other sites More sharing options...
chef 3752 Posted October 11, 2015 Share Posted October 11, 2015 That sounds great! In most cases that is what this does. The text was only added if a logo wasn't present. One thing we realized while developing this app wa that movies and tv series have different size ratios. The tv series thumbs were smaller. Also somewhere mentions In This thread by ebr is a calculation to keep aspect ratios whilst shrinking the size of logos to position them on the backdrop. Might be useful. Try this app and see if it is something you are interested in. Any input Into functionality is welcome. Link to comment Share on other sites More sharing options...
micnda 2 Posted December 9, 2015 Share Posted December 9, 2015 Hi I'm having a few issues with this app. It seems to work fine for Moves, but it wont save the image for collections. It fines the collection and lists it, lets me "show thumb" but when I click save nothing, no error, no image... Are there some setting I need to change to make this happen? Also, I think I read on a previous post that this can batch run through all the images, but I can't seem to find the any option for this. Is the app suppose to be installed in emby or just stand a lone? Can I some how use the scheduler in emby to call this app? Any help would be appreciated. Link to comment Share on other sites More sharing options...
Nologic 30 Posted December 9, 2015 Share Posted December 9, 2015 (edited) @ chef I'd personally attack this from a different perspective...well tools. I'd use subtitles for the text...namely ASS...since it's text based and can be fairly well stylized. I'd then use FFMpeg to load the ASS file as an overlay...then render the image. I'd do much the same thing with clear art & logo's. Here is some code snippits from one of my app's...granted it's written in AutoIt...but you should be able to read and understand it. Func _FFWaterMark( $iWidth , $iHeight , $iResolution , $sWaterMark , $sLocation , $sVideoFilter ) Local $sSomeRandomString , $sContent , $fFactor Local $iWaterMarkWidth , $iWaterMarkHeigh , $iWaterMarkX , $iWaterMarkY $iWidth = Int( $iWidth ) $iHeight = Int( $iHeight ) $sSomeRandomString = _RandomString() RunWait( @ComSpec & ' /c ffprobe.exe -show_streams "' & $sWaterMark & '" >"' & $sTempFolder & $sSomeRandomString & '.txt"' , @ScriptDir & '\BIN\FFMpeg\' , @SW_HIDE ) $sContent = FileRead( $sTempFolder & $sSomeRandomString & '.txt' ) FileDelete( $sTempFolder & $sSomeRandomString & '.txt' ) $iResolution = Int( $iResolution ) $fFactor = $iHeight / $iResolution $iWaterMarkWidth = Int( _RegExString( $sContent , '(?s)(?i)(?:.+?width=(\S+))?' ) * $fFactor ) $iWaterMarkHeight = Int( _RegExString( $sContent , '(?s)(?i)(?:.+?height=(\S+))?' ) * $fFactor ) Switch $sLocation Case 'Top Left' $iWaterMarkX = 0 $iWaterMarkY = 0 Case 'Top Center' $iWaterMarkX = Int(( $iWidth - $iWaterMarkWidth ) / 2 ) $iWaterMarkY = 0 Case 'Top Right' $iWaterMarkX = Int( $iWidth - $iWaterMarkWidth ) $iWaterMarkY = 0 Case 'Center Left' $iWaterMarkX = 0 $iWaterMarkY = Int(( $iHeight - $iWaterMarkHeight ) / 2 ) Case 'Center' $iWaterMarkX = Int(( $iWidth - $iWaterMarkWidth ) / 2 ) $iWaterMarkY = Int(( $iHeight - $iWaterMarkHeight ) / 2 ) Case 'Center Right' $iWaterMarkX = Int( $iWidth - $iWaterMarkWidth ) $iWaterMarkY = Int(( $iHeight - $iWaterMarkHeight ) / 2 ) Case 'Bottom Left' $iWaterMarkX = 0 $iWaterMarkY = Int( $iHeight - $iWaterMarkHeight ) Case 'Bottom Center' $iWaterMarkX = Int(( $iWidth - $iWaterMarkWidth ) / 2 ) $iWaterMarkY = Int( $iHeight - $iWaterMarkHeight ) Case 'Bottom Right' $iWaterMarkX = Int( $iWidth - $iWaterMarkWidth ) $iWaterMarkY = Int( $iHeight - $iWaterMarkHeight ) EndSwitch If $sVideoFilter = '' Then Return ' -vf "' & "movie='" & _FFPathing( $sWaterMark ) & "', scale=" & $iWaterMarkWidth & ':' & $iWaterMarkHeight & '[WaterMark];[In][WaterMark]overlay=' & $iWaterMarkX & ':' & $iWaterMarkY & '[Out]"' Else Return StringTrimRight( $sVideoFilter , 1 ) & "[Movie];movie='" & _FFPathing( $sWaterMark ) & "', scale=" & $iWaterMarkWidth & ':' & $iWaterMarkHeight & '[WaterMark];[Movie][WaterMark]overlay=' & $iWaterMarkX & ':' & $iWaterMarkY & '[Out]"' EndIf EndFunc Func _FFSubtitle( $sSubTitle , $sVideoFilter ) If StringInStr( $sVideoFilter , '[Out]' ) Then Return StringReplace( $sVideoFilter , '[Out]' , "[Overlay];[Overlay]ass='" & _FFPathing( $sSubTitle ) & "'[Out]" ) Else Return StringTrimRight( $sVideoFilter , 1 ) & ", ass='" & _FFPathing( $sSubTitle ) & "'" & '"' EndIf EndFunc Here is a very dumbed down example of doing overlays with images...notice I'm not scaling the watermark to properly fit...nor setting a good location. More importantly pathing in the filter...back slashes must be turned into forward slashes, and colons must be escaped with a backslash. ffmpeg -i "W:\TV Shows\2 Broke Girls (2011)\fanart.jpg" -vf "movie='W\:/TV Shows/2 Broke Girls (2011)/logo.png'[WaterMark];[In][WaterMark]overlay=0:0[Out]" test.png You might also want to check into the code here...again it's AutoIt...and it's meant for GUI's rather than Images...but maybe you can gleam some useful info out of it all the same. Also to get a better handle on subtitles you may wish to look at Subtitle Edit & Aegisub. To bad Emby don't have a way of injecting ASS effects...as it could liven up subtitles a lot. Provided some fairly tame ones could be found. This one is certainly out of hand for movies, but fun for karaoke. https://www.youtube.com/watch?v=NIARCZVTmKM https://www.youtube.com/watch?v=dZgx8vPKtQQ Edited December 9, 2015 by Nologic 1 Link to comment Share on other sites More sharing options...
chef 3752 Posted December 9, 2015 Share Posted December 9, 2015 Hi I'm having a few issues with this app. It seems to work fine for Moves, but it wont save the image for collections. It fines the collection and lists it, lets me "show thumb" but when I click save nothing, no error, no image... Are there some setting I need to change to make this happen? Also, I think I read on a previous post that this can batch run through all the images, but I can't seem to find the any option for this. Is the app suppose to be installed in emby or just stand a lone? Can I some how use the scheduler in emby to call this app? Any help would be appreciated. This app fell off the table. I'll have to take another look at the code. I remember it was left incomplete. My apologizes. I'll look into completing it. Link to comment Share on other sites More sharing options...
Nologic 30 Posted December 9, 2015 Share Posted December 9, 2015 (edited) @ chef I noticed in my example "2 Broke Girls" that the logo.png had a huge transparent border...I'm not sure if you are trimming the transparency in your app...but it might be a good idea to get more reliable output. ImageMagik example.1 convert imagename.png -trim new_name.png How to not upscale with ffmpeg when trying to downscale examle 1 -filter_complex "scale=iw*min(1\,min(640/iw\,360/ih)):-1" My code snippit for watermarks is rather simplistic...as I assumed someone spent the time creating a watermark that would look good at a certain resolution...I'm not sure if the ClearArt & Logo images have a certain resolution in mind...other than for the image to just look good. I personally feel logo's should be limited to 25% of the background, with 3-5% of that used for minimum outside margins. Of course the logo should be centered as best as possible within that 25% area. In the instance of my tastes...some ClearArt & Logos might be too small to begin with, to loosely fill such an area...my thoughts in this case would be to resize the background, then apply the overlay...then do the final resize. Another idea for your text based ones...would be to dig through the NFO\XML's and read tag info...then use a font in the ASS file that goes along with it...like say MS Comic San's for Cartoons, or some sort of stencil font for War based shows. Here is a more complete example...of making FFMpeg do all the work. ffmpeg -i "W:\TV Shows\2 Broke Girls (2011)\fanart.jpg" -vf "movie='W\:/TV Shows/2 Broke Girls (2011)/logo-trim.png', scale=iw*min(1\,min((640-10)/iw\,(360-10)/ih)):-1[WaterMark];[In][WaterMark]overlay=W-(w+10):H-(h+10), scale=500:-1[Out]" test.png Not exactly right...but not far off ether. Okay ASS\SSA example ffmpeg -loop 1 -f image2 -i "W:\TV Shows\2 Broke Girls (2011)\fanart.jpg" -vf "ass='W\:/TV Shows/2 Broke Girls (2011)/test.ssa';scale=500:-1" -vframes 1 test2.png SSA contents [Script Info] ; This is a Sub Station Alpha v4 script. Title: ScriptType: v4.00 Collisions: Normal PlayDepth: 0 [V4 Styles] Format: Name, Fontname, Fontsize, PrimaryColour, SecondaryColour, TertiaryColour, BackColour, Bold, Italic, BorderStyle, Outline, Shadow, Alignment, MarginL, MarginR, MarginV, AlphaLevel, Encoding Style: Default,Calibri,60,16777215,65535,65535,-2147483640,0,0,1,2,1,3,10,10,10,0,1 [Events] Format: Marked, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: Marked=0,0:00:00.00,0:00:03.00,Default,NTP,0000,0000,0000,,2 Broke {\c&Hff00ff&}Girls Anyways food for thought. Edited December 9, 2015 by Nologic 1 Link to comment Share on other sites More sharing options...
chef 3752 Posted December 9, 2015 Share Posted December 9, 2015 That should be built into the core! @@Luke check this post out above. It looks great! If fanart doesn't have the image or the other sources. I think it also gives emby an edge that some of the other server programs are missing, even if only of thumb images. I love this. If not the core then a plugin, now that the ffmpeg is coded, it could be easily built into a dll. 2 Link to comment Share on other sites More sharing options...
Nologic 30 Posted December 10, 2015 Share Posted December 10, 2015 (edited) Okay I fussed with Subtitles some more...it took me forever and a day to figure out how to render subtitles to a transparent png via FFMpeg...and sadly the method I came up with left the stroke boarders semi transparent and other minor issues. Like having to remove the drop shadow...well see for your self...had to up the font from 60 to 90. ffmpeg -y -f lavfi -i color=c=gray:s=1920x1080 -filter_complex "format=pix_fmts=rgba,ass='W\:/TV Shows/2 Broke Girls (2011)/test.ssa'[sub];[sub]colorkey=gray:0.3:0.2" -vframes 1 -pix_fmt rgba -c:v png out.png Given the results didn't fair well...I decided to take a different approach...I'd strip the stroke & drop shadow from the png and add them back via ImageMagik...this turned out rather well. ffmpeg -y -f lavfi -i color=c=black:s=1920x1080 -filter_complex "format=pix_fmts=rgba,ass='W\:/TV Shows/2 Broke Girls (2011)/test.ssa'[sub];[sub]colorkey=black:0.3:0.2" -vframes 1 -pix_fmt rgba -c:v png out.png convert ..\ffmpeg\out.png -bordercolor none -border 2x2 -background black -alpha background -channel A -blur 0x3 -level 0,1% ..\ffmpeg\transparent.png convert ..\ffmpeg\transparent.png -strokewidth 15 ( -clone 0 -background black -shadow 80x3+0+8 ) -reverse -background none -layers merge +repage ..\ffmpeg\transparent-new.png convert ..\ffmpeg\transparent-new.png -trim ..\ffmpeg\transparent-trim.png I then decided to see if I couldn't do the whole bloody thing in ImageMagic. Which turned out well, other than the new bald spot on the top of my head. convert -alpha on -background transparent -fill white -stroke black -strokewidth 2 -font Calibri -pointsize 240 -density 96 -gravity Center caption:"2 Broke Girls" -channel RGBA -gaussian 0x0.5 png32:temp.png convert temp.png -channel A -blur 0x2 -level 0,1% png32:temp-stroke.png convert temp-stroke.png -strokewidth 15 ( -clone 0 -background black -shadow 80x3+0+8 ) -reverse -background none -layers merge +repage png32:temp-shadow.png So what does rasterizing our text gain us...well we can cheat on some math by just brute force resizing things. I'll probably do a few more things...but I think this itch is nearly scratched. Well I think text split should happen on ":" except when there are numeric values on ether side of it...so something like "3:10 to Yuma" doesn't get botched. Text should probably also split on "," provided it's over a certain length. Might also want to split on a single quote if, there are 3 or more alphanumeric char prior and one post. I think a length of 22 char should cause a test for text split, and split on the prior white space...provided it's not less than say 16 char in length from the start. If so...then maybe seek to the next white space post the 22 marker. Should a colon be found in a title...the primary title should be twice the size of the secondary title, provided it's ether as long or longer than the secondary. If the length of the secondary is longer then the primary should be scaled to the same pixel width...provided it doesn't raise above the imposed constraints. Edited December 11, 2015 by Nologic 1 Link to comment Share on other sites More sharing options...
shorty1483 454 Posted February 23, 2016 Share Posted February 23, 2016 @@chef Thumb Maker seems not to work anymore. It finds no titles even there are ones without thumbs. Using latest Dev. Gesendet von meinem HTC One M8 mit Tapatalk 1 Link to comment Share on other sites More sharing options...
chef 3752 Posted February 23, 2016 Share Posted February 23, 2016 Cool, I will pull up the sln and take a look 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now