![]() |
#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? |
![]() |
![]() |
![]() |
#2 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,250
Karma: 57979022
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 | |
|
![]() |
#3 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Boox Note Air 3 & 3C, KyBook 3 on iPad
|
|
![]() |
![]() |
![]() |
#4 |
Well trained by Cats
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 30,250
Karma: 57979022
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
|
![]() Bulk mode Metadata Edit has a spin wheel (Compress Images) near the bottom. |
![]() |
![]() |
![]() |
#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 | |
|
![]() |
#6 |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,626
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Boox Note Air 3 & 3C, KyBook 3 on iPad
|
|
![]() |
![]() |
![]() |
#8 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 44,253
Karma: 23661992
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.
|
![]() |
![]() |
![]() |
#9 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
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 11:52 AM. |
![]() |
![]() |
![]() |
#10 | |
Resident Curmudgeon
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 75,626
Karma: 134254544
Join Date: Nov 2006
Location: Roslindale, Massachusetts
Device: Kobo Libra 2, Kobo Aura H2O, PRS-650, PRS-T1, nook STR, PW3
|
Quote:
|
|
![]() |
![]() |
![]() |
#11 |
Wizard
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 1,133
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.
|
![]() |
![]() |
![]() |
#12 | |
Junior Member
![]() Posts: 7
Karma: 10
Join Date: Jun 2024
Device: Boox Note Air 3 & 3C, KyBook 3 on iPad
|
Quote:
|
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
batch processing regex search/replace? | G2B | Editor | 21 | 11-24-2020 09:52 PM |
Batch processing with kindlegen | Blunaigel | Kindle Formats | 28 | 01-25-2019 10:01 AM |
Batch-Processing of CSS in epub | Kiruhdu | Sigil | 7 | 08-31-2018 10:44 AM |
Tag editor with batch processing | semenoof | General Discussions | 0 | 01-17-2013 03:12 AM |
Batch processing of PDB files? | Asterra | iRex | 6 | 12-04-2007 01:10 PM |