Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > Workshop

Notices

Reply
 
Thread Tools Search this Thread
Old 12-30-2007, 10:28 AM   #1
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
PRC to MOBI

Almost all MobiPocket e-books come with the filename extension .prc, but this simply identifies a generic PalmOS compatible file (see PDB in the wiki). As the wiki says, PRC/PDB files have an 8 character plain text ID near the start viewable with any text editor. Older MobiPocket files, and those (e.g. from Baen) identified as MobiPocket/Palm, are TEXtREAd files but newer ones are BOOKMOBI. Note that either type can come with the filename extension .prc or .mobi, but I will call TEXtREAd files PRC and BOOKMOBI files MOBI.

All this matters because MOBI files have much richer metadata than PRC files. In particular MOBI files can include the author and the title and a cover image and a thumbnail image. This allows them to be handled differently by MobiPocket's Reader software under Windows and on three E-Ink readers (iLiad, Cybook and Kindle). It may also make a difference on other MobiPocket compatible devices. One simple way to identify PRC files it to look in MobiPocket's library view and see if an author is identified - if not it is a PRC.

Tompe's Mobiperl suite of command line programs manipulates DRM-free MOBI/PRC files. It includes the command mobi2mobi that can convert a PRC to a MOBI, adding the missing metadata as it does so. Mobiperl is written in Perl and is therefore cross-platform, and it includes pre-built binaries for Windows machines. A link to the latest windows binaries and an example of a mobi2mobi command line is in Mobiperl post #65. The typical mobi2mobi usage is:
Code:
mobi2mobi file.prc --outfile file.mobi --author "Last, First" --title "Book Title" --coverimage cover.jpg --addthumbnail cover.jpg
All the arguments are optional, and in particular you can leave off the image arguments if you want. I have not tried this, but mobi2mobi will probably work on actual PalmDOC .prc files as well (not just MobiPocket's extended PRC version).

The command line is unfamiliar to many Windows users, and if someone wants to add a GUI wrapper to mobi2mobi that would be very useful. I'm not sure I use the command line optimally, but the way I do this is to first copy mobi2mobi.exe to the same directory as the PRC file. Then open a command window (START > All Programs > Accessories > Command Prompt). In the command window:

Code:
cd dirpath
mobi2mobi file.prc --outfile file.mobi --author "Last, First" --title "Book Title" --coverimage cover.jpg --addthumbnail cover.jpg
The full "dirpath" starts with a capital letter, e.g. C:\, and I usually get it by copying and pasting from the Address header of a windows open on that directory (in this case the PRC directory). Note that the arrow keys allow you to recall previous command lines and you can edit them to create modified commands.

One source of PRC files is BookDesigner, which has been used on most e-books in the Mobi/PRC Upload forum. For new books, I suggest following HarryT's procedure for making MOBI books using BD and MobiPocket's Creator software, see Tutorial - How to Create a MobiPocket eBook. For existing BD PRC e-books, an alternative is to use mobi2mobi. This won't create a formal Table of Contents, but it will do everything else a MOBI book needs. The cover image from BD is often very small. The optional MOBI cover is typically a JPEG close to 800x600 in size. If you created the PRC file via BD, then you may already have a large image that can be converted to JPEG. If not, then mobi2html will extract the images from the PRC file and you can use any image program to increase its size and convert to JPEG (I use IrfanView). If there is already a cover image in the PRC file, --coverimage will replace this with the larger JPEG. The --addthumbnail option will make a thumbnail that will be used in the library view on some devices.

Last edited by wallcraft; 12-30-2007 at 11:27 AM.
wallcraft is offline   Reply With Quote
Old 12-30-2007, 11:35 AM   #2
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
Quote:
Originally Posted by wallcraft View Post
but the way I do this is to first copy mobi2mobi.exe to the same directory as the PRC file.
If you plan on using it regularly, it's a lot better to put the program in a folder (say "c:\tools"), then go to Windows Control Panel, run the "System" application, go to the "Advanced" tab, click "Environment Variables", and add the name of the folder to the "Path" environment variable (it's a semi-colon separated list of folder names).

That way, the command will be available from any command prompt without having to copy any files around.
HarryT is offline   Reply With Quote
Advert
Old 12-30-2007, 11:43 AM   #3
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by wallcraft View Post
The optional MOBI cover is typically a JPEG close to 800x600 in size. If you created the PRC file via BD, then you may already have a large image that can be converted to JPEG. If not, then mobi2html will extract the images from the PRC file and you can use any image program to increase its size and convert to JPEG (I use IrfanView). If there is already a cover image in the PRC file, --coverimage will replace this with the larger JPEG. The --addthumbnail option will make a thumbnail that will be used in the library view on some devices.
For the Gen3 it seems that adding a cover image is enough but to get the library image i the desktop version you have to add a thumb nail image.

I suddenly realize I have forgotten to rescale the images so if you input an image larger than 64k it will not work so good. Also there is an issue with large images (600x800) smaller than 64k on the Gen3. I will add my rescaling code to the next version. It is a bit unfortunate that I have not yet found the bug in the generated files that forces me to shrink the images a bit (to 480x640) for them to work on the Gen3. I think I will prioritize this bug...
tompe is offline   Reply With Quote
Old 12-30-2007, 11:51 AM   #4
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 85,544
Karma: 93383043
Join Date: Nov 2006
Location: UK
Device: Kindle Oasis 2, iPad Pro 10.5", iPhone 6
On one of my converted books (I forget which one, unfortunately), Mobigen gave a build warning that the file contained a record >64k, and that it probably wouldn't work on Palm devices as a result. It was fine on the Gen3, though.
HarryT is offline   Reply With Quote
Old 12-30-2007, 01:09 PM   #5
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
What I do is to change the images to jpg and change the quality (not the resolution) so that it fits 64K. And that seems to work in all other readers than the Gen3. For the Gen3 I have to shrink the image and now I shrink it to the width 480. And then it works on the Gen3. But I have example mobi files with images that are 600x800 that works on the Gen3 so there is some issue with the Mobi-file I generate. I spent an hour now seeing if I could solve the problem but I think I give up until I have more time available or I get some good idea of what to test.

So until I update Mobiperl you should use images with max width 480 for it to work on the Gen3. After the update the rescaling will be done automatically.
tompe is offline   Reply With Quote
Advert
Old 12-30-2007, 02:00 PM   #6
wallcraft
reader
wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.wallcraft ought to be getting tired of karma fortunes by now.
 
wallcraft's Avatar
 
Posts: 6,975
Karma: 5183568
Join Date: Mar 2006
Location: Mississippi, USA
Device: Kindle 3, Kobo Glo HD
I think images slightly smaller than 600x800 are probably best anyway, because they are not usually displayed full-screen. I was just repeating MobiPocket's own advice (600x800) for cover image size.

The limit on image file sizes is actually <63K, rather than <64K. I base this on two MobiPocket Forum threads: jpg which are equal in size get different sizes and Images in the ebook. So this might be your problem. In any case, one thing you could try (on one of the buggy 600x800 image .mobi files and a Windows desktop) is mobi2html and then mobigen -jpeg. If the mobigen version works on the Cybook then why? If not, then perhaps it isn't a html2mobi issue but a bug on the Cybook.
wallcraft is offline   Reply With Quote
Old 12-30-2007, 03:55 PM   #7
tompe
Grand Sorcerer
tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.tompe ought to be getting tired of karma fortunes by now.
 
Posts: 7,452
Karma: 7185064
Join Date: Oct 2007
Location: Linköpng, Sweden
Device: Kindle Voyage, Nexus 5, Kindle PW
Quote:
Originally Posted by wallcraft View Post
n any case, one thing you could try (on one of the buggy 600x800 image .mobi files and a Windows desktop) is mobi2html and then mobigen -jpeg. If the mobigen version works on the Cybook then why? If not, then perhaps it isn't a html2mobi issue but a bug on the Cybook.
The was actually a very good idea. It did not work with mobigen either. The Cybook hangs. So now i have a testcase using only mobigen that I can report to Bookeen.

I had mistakenly assumed that the mobi file that I got from MobiPockets web site and that worked with 600x800 images was produced by mobigen. Because I also tested to use gif instead of jpg and that did not work either. But now i know that it probably is a cybook bug or a mobigen bug.
tompe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
.prc to .mobi luthar28 Kindle Formats 3 07-30-2010 07:23 AM
.prc vs. .mobi cmbs Amazon Kindle 13 08-20-2009 03:46 AM
.prc vs. .mobi cmbs Kindle Formats 2 08-14-2009 07:19 AM
Mobi/PRC to LRF coase Calibre 1 05-02-2009 10:26 PM


All times are GMT -4. The time now is 12:59 AM.


MobileRead.com is a privately owned, operated and funded community.