Thread: PRC to MOBI
View Single Post
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,977
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