Cover cropper - Creating Kodi style poster files from covers

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
If it can be done with mp4 then mp4box will be able to do it and it's command line so you can do it in batch.
 

Fetterbr

Member
Dec 10, 2010
103
5
sorry that is to complex for me, i know where the cover pictures are and where the movie folders are, than i need automatics for the rest :)
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
Not really possible with the current version, you'd have to modify the source picture first to get the desired output size(or modify the output in the code, which isn't up-to-date atm since I was waiting to make a few changes first, to force a certain size), but that would be a good thing to add.
 

Fetterbr

Member
Dec 10, 2010
103
5
thanks for all your work on this little but very good program, i use it dayli to bring my movies up todate. One thing more you realy need to add is that i can drag files to the program and not only have one specific folder to add. :)
In mp3tag fxample here you need to drag all files at ones as every thing will dissapere when you forgot one file and do again.
 

Fetterbr

Member
Dec 10, 2010
103
5
question. Sorting with Win 10 explorer. I have lots of Folders with movie file, subtitle file, picture file.
I want to see All my Folders with content, expanded and grouped by folder path. Sorted by the date i have created the movie file. i simply cant get it to work.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
Sounds like you want to sort with 2 columns(path and date), which isn't possible in windows explorer as far as I know.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
I'm hoping there will be. Finding a balance between things is hard and I haven't been coding at all for a few months now because I've been too absorbed by other things.

Hopefully I manage to get started again today(said to myself I would yesterday but here we are the next day and I haven't started yet) since there's a few bugs annoying me in my own script and I do need to make a modification to the cover cropping script before I continue on that other one.
 

Fetterbr

Member
Dec 10, 2010
103
5
maybe you can find the issue that it stops. it seams its to do when the indexing from windows is running but i cant tell. also would be very very nice if i could drag the picture in and make them one by one where they are missing instead of specifying the whole folder
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
The main thing I need to add is support for opening a cover file directly so if the GUI library I'm using can understand drag and drops, it should be trivial to add after.

That bug will be a lot trickier without knowing what the issue really is but I'm hoping beefing up the checks on stuff will possibly help.

I'll also look back at the other stuff you said in here.


Edit: Drag and drop support will be in the next release, I've added it today.
 
Last edited:

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
I'm currently working on implementing a verification system and this is what I'm currently thinking.
I'll add a 4th crop method called verify posters or something like that which will check if a poster file exist, check if the dimension matches(with an option to add a margin of error) the expected ones from the software cropping and it'll take into account the crop threshold too as a sanity check for when it crops too much, which means it has a high chance of being wrong. It will then only display those that break those checks which means there's a good chance of something being wrong with either the existing poster or the software crop.

It will also now always load the poster file(which means it's possible to check them all one by one even outside of the verification mode) if it exist so it can be compared with what the cropping software does with the current settings which looks something like this right now:
Crop_verif_prototype.jpg

If there's any ideas or concerns about the way I'm thinking of doing this, let me know.
I've debated doing a more manual verification on more than one poster at a time but decided against it since ideally you need the original cover to compare since some are less obviously wrong than others and they'd need to be fairly small to find a decent amount on a monitor.


I've also improved the edge detection a bit by setting a minimum % of the width of the image allowed(only for the automated detection, manually changing the size has no limitation) for the poster, which eliminates the single digit pixel wide posters. It tried to detect only on the right side of the image if that happens, which helps detect better. The cover in the example above had a 1x1 pixel poster made before.
 
Last edited:

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
Current plan is fix the zoom that adding the preview broke(current version is completely broken if the zoom activates with the preview on in most scenario, it infinitely adjust itself and stops responding. About to work on that now), add the verification mode, add setting a minimum and maximum height resolution for the poster(can be disabled, not sure yet how that'll work exactly) and then add some new settings to the interface related to all that before next release.
 

Fetterbr

Member
Dec 10, 2010
103
5
i have good idear for you. can you make it so the program can be selected to add the file name on the bottom of the cover or poster. see picture
 

Attachments

  • poster cover with file name.jpg
    poster cover with file name.jpg
    72.3 KB · Views: 3

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
Displaying it on the software would be easy enough, I'm just not sure what the use for it would be.
You already have the folder name in the status bar at the bottom and the poster file name is decided by the template you choose for it.
Below the poster would only show up if a poster already exist since that section is hidden if there isn't.
What would that be useful for you?

If you mean on the actual saved picture, that would be more difficult but it would mess up the aspect ratio so not something I'd want to do, but I assume you mean the option above.


Also, I've done all I said I wanted to do and also added controlling the selection with the arrow keys. Increase by default, decrease by holding ctrl and move by holding shift.
Just needs some more testing to make sure I didn't break anything and a couple of tweaks.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
Just released v1.2 which is now available for download at the end of the first post.

Here's the changes:
Verification mode with existing poster comparison.
Opening covers directly from the menu or by passing it as an argument or by drag and dropping it on the window.
Slightly improved edge detection using a minimum acceptable width ratio.
Can set a minimum and maximum height for the saved poster.
Arrow keys with modifiers can now control the poster selection.
Various bug fix and increased error handling.

The documentation in the first post has also been updated with the new options.
 

Fetterbr

Member
Dec 10, 2010
103
5
hi. i tryed it and i see it dosent produce a config file, i cant save the settings etcc.. i am using windows
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
Odd, works with the .py version but not the exe. Gonna look into it. You can re-use an old config file until it's fixed, all but the new settings will be loaded.
 

SamKook

Grand Wizard
Staff member
Super Moderator
Uploader
May 10, 2009
3,779
5,352
Just released version 1.2.1 which fixes that issue. Seems there's a temporary folder involved when using the exe but now it will be saved in the same directory as it, like before.