06-17-2024, 11:49 AM | #1 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Boox Note Air 3 & 3C, KyBook 3 on iPad
|
Batch processing EPUB lossy compression
I was given several hundred EPUB files that are (needlessly) about 2-300MB in size. I find that I can use Calibre's pub editor to effectively compress each book by 80-90% by using lossy compression set to 60 while still remaining fully readable for my needs. However, it is quite tedious to individually:
Is there a plugin or action that would allow me to automate this so I can batch process all my files in one go? |
06-17-2024, 12:19 PM | #2 |
Well trained by Cats
Posts: 30,454
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
That is already a choice of Polish
Select Books: Click the Polish icon: tick the options as desired: OK |
Advert | |
|
06-17-2024, 12:31 PM | #3 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Boox Note Air 3 & 3C, KyBook 3 on iPad
|
|
06-17-2024, 12:41 PM | #4 |
Well trained by Cats
Posts: 30,454
Karma: 58055868
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
Sorry, misread the request.
Bulk mode Metadata Edit has a spin wheel (Compress Images) near the bottom. |
06-17-2024, 12:58 PM | #5 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Boox Note Air 3 & 3C, KyBook 3 on iPad
|
I'm confused. My Bulk Metadata Edit has a checkbox near the bottom of the "Basic Metadata" tab called "Compress cover images" along with a compression amount spinner. But it's only for the cover image, not all the images in the EPUB.
|
Advert | |
|
06-17-2024, 01:03 PM | #6 |
Resident Curmudgeon
Posts: 76,494
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
06-17-2024, 01:08 PM | #7 |
Junior Member
Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Boox Note Air 3 & 3C, KyBook 3 on iPad
|
|
06-17-2024, 09:39 PM | #8 |
creator of calibre
Posts: 44,565
Karma: 24495948
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
Do an EPUB to EPUB bulk conversion and in the epub output section specify a max resolution for the images.
|
06-18-2024, 09:38 AM | #9 |
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
A combination of Editor Chains and Action Chains lets you perform lossy compression on multiple books.
In Editor Chains, there is a an action called "Compress Images", that enables you to automate this process. You can use the Action Chains to run this for multiple books. (chain in first attachment). If you want to use an external tool to for lossy compression, e.g. ImageMagick, which can help convert png to jpg, you can use the Run Command action which will iterate over all images in an epub. See this post and screenshots for more details. (chain in second attachment). Note however, that you might need to edit the chain to configure the path to ImageMagick on your system. To import the attached chains: Action Chains > Add/Modify chains > right click the chains table > import > browse to the zip file. Note: I have found the ImageMagick approach to be much faster with lossy compression compared to the first approach that uses the editor's "Compress Images". Test with both and see which is more satisfactory. Last edited by capink; 06-18-2024 at 12:52 PM. |
06-18-2024, 10:54 AM | #10 | |
Resident Curmudgeon
Posts: 76,494
Karma: 136564766
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
06-18-2024, 12:47 PM | #11 |
Wizard
Posts: 1,139
Karma: 1954142
Join Date: Aug 2015
Device: Kindle
|
It can replicate what the editor does by using the "Compress Images". I updated the post above with example chains.
|
06-20-2024, 11:38 PM | #12 | |
Junior Member
Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Boox Note Air 3 & 3C, KyBook 3 on iPad
|
Quote:
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
batch processing regex search/replace? | G2B | Editor | 21 | 11-24-2020 10:52 PM |
Batch processing with kindlegen | Blunaigel | Kindle Formats | 28 | 01-25-2019 11:01 AM |
Batch-Processing of CSS in epub | Kiruhdu | Sigil | 7 | 08-31-2018 11:44 AM |
Tag editor with batch processing | semenoof | General Discussions | 0 | 01-17-2013 04:12 AM |
Batch processing of PDB files? | Asterra | iRex | 6 | 12-04-2007 02:10 PM |