Page 1 of 2

MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sat Aug 22, 2009 11:49 pm
by cybereality
I am very excited about the Fujifilm FinePix REAL 3D W1 digital 3D camera that is coming out in the US next month. It has already been released in Japan but has met with mixed reviews. One of the main complaints was that the camera only captures 3D images into the Fujifilm proprietary format MPO. This format is only used by the camera itself and the FinePix REAL 3D V1 picture frame which is not yet available. This seriously limits the appeal of the product, considering you cannot view the content you are creating. There was a mention that Fujifilm would release an application called MPO2JPG but currently that is not available. There is however a beta version of StereoPhoto Maker which will import MPO files, but this is only available on the Japanese version. With the US version of the W1 releasing in less than a month I wanted to be sure I could actually use this product on day one without any unnecessary hassle.

Anyway, I wrote this little program that will convert MPO files into JPG stereo pairs. It is a very lightweight program (only 10k) and very easy to use. You simply drag and drop any number of *.MPO onto the executable file and it will convert them all to JPG with the suffix "*_L.JPG" and "*._R.JPG". I have tested this with some MPO files I got from a Japanese site and it works perfectly (at least on Windows Vista). The program is not doing any fancy conversion, so you are getting the full quality raw images. As it turns out, Fujifilm's MPO format is not really anything special at all, it is just basically JPEG data. What they have done is simply append two industry standard JPEG/EXIF files together (left view first). So the conversion process was really trivial. However, I am unsure why they would do this. It would seem the product would have a lot more appeal if it simply saved the files as two JPEGs (which it is basically doing anyway). Whatever the case may be, its all a moot point now with this simple conversion app. I am just hoping that US reviewers will become aware of this so they do not unfairly discredit the product due to the unsupported file format.

And without further ado, here is the download link:
MPO2Stereo.zip
UPDATE: New version MPO2JPS converts directly into a JPS file:
http://www.mtbs3d.com/phpBB/viewtopic.php?f=3&t=4419" onclick="window.open(this.href);return false;

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sun Aug 23, 2009 11:53 pm
by yuriythebest
thanks mister cyberreality! as for the mpo files- can you link me to that site? what happens if you just rename them to jps?

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 24, 2009 12:14 am
by cybereality
yuriythebest wrote:thanks mister cyberreality! as for the mpo files- can you link me to that site? what happens if you just rename them to jps?
No problem. You can test the program with the MPO files here:
http://88.191.20.67/video/akiba/3dphoto.zip" onclick="window.open(this.href);return false;

Renaming to JPS won't do much. You will only see the first image (left). JPS is simply a regular JPEG file by with both images encoded side by side into a single image. The MPO format is two independent JPEG files appended together, each image is still encoded separately. If you wanted a JPS file you would have to take the L/R pairs that MPO2Stereo outputs and bring them into Photoshop to combine them into a single cross-eye image (R/L), export a JPEG file and then manually rename it to JPS.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 24, 2009 3:04 am
by yuriythebest
cybereality wrote:
yuriythebest wrote:thanks mister cyberreality! as for the mpo files- can you link me to that site? what happens if you just rename them to jps?
No problem. You can test the program with the MPO files here:
http://88.191.20.67/video/akiba/3dphoto.zip" onclick="window.open(this.href);return false;

Renaming to JPS won't do much. You will only see the first image (left). JPS is simply a regular JPEG file by with both images encoded side by side into a single image. The MPO format is two independent JPEG files appended together, each image is still encoded separately. If you wanted a JPS file you would have to take the L/R pairs that MPO2Stereo outputs and bring them into Photoshop to combine them into a single cross-eye image (R/L), export a JPEG file and then manually rename it to JPS.

I see. I don't have the fujifilm camera and probably won't for quite a long time, but can you make the program transform the mpo files directly to jps?

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 24, 2009 4:50 am
by taidaeve
I agree, direct conversion to JPS will be much more helpful, because now you still need to join the two files if the viewer does not support importing them from separate files... if you can make that it would be much more helpful. :shutter

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 24, 2009 10:28 am
by Likay
A direct conversion to jps or a side-by-side jpg is handy but you'll also loose details since you need to decompress images, merge them into side-by-side and then compress into jpg again. The original picturequality will unavoidable be lost here (with that said it's not really a huge deal). The same thing happens when using stereophotomaker or other softwares but i agree: It would be handy.
Good and easy understanding info on how jpeg/jpeg2000 works on "pixellevel" here.
Headerinfo on jpeg here.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 24, 2009 7:28 pm
by cybereality
Yeah, I considered supporting JPS, but that would be a whole other project. What this program does is give you access to the raw image data, which is what any serious photographer would want. If it converted into JPS it would have to re-compress an already compressed image and thus you would lose quality. I guess you would lose some quality even if you used Photoshop, but at least then you have greater control over the output. MPO2Stereo is just supposed to be a bare-bones conversion application.

If you need more robust functionality I suggest you look at Stereo Photo Maker, and I believe Nvidia's image viewer will soon support MPO (and export JPS). I am also currently working on a fully featured 3D image editing application which will be supporting MPO files. However, there does seem to be demand so I will look to see if I can do the JPS conversion. I don't imagine it would be too hard, so if I have some time I can probably whip something together.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Tue Aug 25, 2009 7:47 am
by Likay
Good practice if nothing else. Maybe there are some readymade codesnippets to "borrow" but it takes away the joy of doing something on the own. :D

Stereophotomaker has a multiconversion function which makes conversion of several images an easy task once they're l+r imagepairs. This is golden since there's no need to convert+align each and every single image from the cameras.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Wed Aug 26, 2009 11:00 am
by KindDragon
My tool now, that convert L&R jpg to jps: http://tinyurl.com/muqh93" onclick="window.open(this.href);return false; :-) (with some loss of quality)
You can extract MPO2STEREO and JPG2JPS in the same folder and use batch file mpo2jps that do everything at once.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Wed Aug 26, 2009 12:47 pm
by Likay
Lol@Dragon!
You just had to, right? ;)

Works great with some images i tried. :D

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Fri Aug 28, 2009 5:48 am
by coolio
StereoPhotoMaker 4.11 converts to MPO and viceversa

http://stereo.jpn.org/eng/stphmkr/" onclick="window.open(this.href);return false;

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 31, 2009 1:30 pm
by jimmydonc
Oh please oh please someone,
is there no mac application that can convert MPO files?
I dont have windows or a windows emulator, so I can't run the pc program. Im really anxious about this. Just got my new fuji camera in the mail and I wanna make some stereo pairs.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 31, 2009 8:59 pm
by cybereality
jimmydonc wrote:is there no mac application that can convert MPO files?
Not that I know of, and it is doubtful there will be one any time soon. You might want to take a look at Darwine, the Mac version of WINE. My program should work with it (although I don't have a Mac so I can't test that, sorry). I also doubt the drag-and-drop functionality will work, but you should still be able to use it with the command line. Worth a shot anyhow (and if you are really lucky StereoPhoto Maker might work):

http://www.kronenberg.org/darwine/" onclick="window.open(this.href);return false;

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 31, 2009 10:21 pm
by jimmydonc
oh what a world what a world. Ive got a non intel mac g4 and those crossover/wine type programs dont seem to work for me.
Well, c'mon hackers of the world. hack us up a mac MPO converter.

seriously how does your application work? Is there some long way around? what's the difference between an MPO and a jpeg? I changed the extension to jpeg out of curosity and was able to open it in photoshop. Of course it was the same as the 2 d jpeg. not it's stereo pair. where's that second image hiding in there??

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Mon Aug 31, 2009 11:48 pm
by cybereality
jimmydonc wrote:seriously how does your application work?
Do you know C++? If so send me a PM and I'll give you the source code.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Tue Sep 01, 2009 9:24 pm
by cybereality
jimmydonc wrote:seriously how does your application work? Is there some long way around? what's the difference between an MPO and a jpeg? I changed the extension to jpeg out of curosity and was able to open it in photoshop. Of course it was the same as the 2 d jpeg. not it's stereo pair. where's that second image hiding in there??
Ok, let me give you a proper response. Basically an MPO file is just two standard JPEG files appended together. All my program does is slice the file into two and save the data with the JPEG extension. There is no conversion going on. The reason renaming the file to JPG works is because it is basically JPEG data. So an image program (like photoshop) will start reading the file as a JPEG and all is fine until it hits the End Of Image marker. The second image is right after that but the program is only expecting one image so it stops there. You can extract this data manually, but it will be time consuming for more than just a couple of pictures at a time. However if you have no other choice, here is how to do it.

- First off, you will need a Hex editor to manipulate the file. This one for Mac looks decent: https://www.ifd.com/product_info.php/products_id/87" onclick="window.open(this.href);return false;

- Open the MPO file in the Hex editor. Start a new search, set it to "Hex" and search for this string "FFD8FFE1". That is the Start Of Image marker for a standard JPEG/EXIF file. Your first find will be the beginning of the file naturally, so hit "Find Next". This will be the break point between the image data.

- Select all the data before this point and save it to a file with the extension "JPG", this will be the left image. Most hex editors will let you do something like "Save selection to file" or something similarly named. Now select all the data after the marker (and including the marker) and save this to another JPG file. This is the right image.

- Thats it, you're done. You now have both stereo pairs.

Obviously this is not very practical for a large set of images, but its at least a solution.

I am looking into how I can make my program for the Mac and I found a way to install OS X on my PC. If I can get OS X running it should be fairly simple to just re-compile the program for use on Mac. However this is a whole other can of worms to get into, so its probably going to be another week to two before I could have this done. But I am looking into it. I am also working on a fully featured 3D image editing program (to compete with StereoPhoto Maker) and now that I think of it, it would be nice to have cross-platform support (PC, Mac and maybe Linux). Would help at least to give me an edge. Macs are also popular with the photography crowd so if this Fujifilm camera becomes popular I could see a lot of demand for something like this. I'm not making any promises, but it is on the table.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Wed Sep 02, 2009 10:31 pm
by jimmydonc
a week or 2? thats all? hey. I'll wait for you. I'll donate some money for your efforts.

if you are making a program, may I offer a suggestion. a fun thought. I made a template in photoshop that I can put a stereo pair into so I can print out old timey stereoscope cards. That would be a neat plugin. easy enough to do in photoshop but would be awesome to have some automatic program.
Speaking of automatic. Batch features. I constantly use the batch feature in photoshop to apply effects to large numbers of files. A bath feature in your program would be cool too.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Wed Sep 02, 2009 11:51 pm
by cybereality
jimmydonc wrote:A batch feature in your program would be cool too.
Yeah, it already does that. You can just drag any arbitrary amount of MPOs onto the exe file and it will convert them all.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sat Sep 05, 2009 5:32 am
by scrameta
I have a Mac and wanted to split some MPO's so built a little java app. Just extract the DMG, run SplitMPO, click "Convert File", Select a file. It writes a filename_l.jpg (left eye image) and filename_r.jpg (right eye image).

http://ssh.scrameta.net/www.scrameta.net/SplitMPO.dmg

I know the program is rubbish, but it does the job for now until someone writes something better...

Mark

Edit:Fixed URL

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sat Sep 05, 2009 8:33 am
by cybereality
scrameta wrote:I have a Mac and wanted to split some MPO's so built a little java app. Just extract the DMG, run SplitMPO, click "Convert File", Select a file. It writes a filename_l.jpg (left eye image) and filename_r.jpg (right eye image).
Very nice work man.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sun Sep 06, 2009 5:22 am
by scrameta
I had a quick play to improve this this morning, since viewing them was annoying me! i.e. open left/right, resize windows etc...

Anyway it has some new features:
i) Convert a whole directory
ii) Displays last converted image
iii) Ability to select previously converted images (from current directory)
iv) Crosseyed or straight option

http://ssh.scrameta.net/www.scrameta.net/SplitMPOv2.dmg

I've also attached the jar in case someone wants to try this on a non-Mac. I think I might need to fix directory selection on non-Macs...

Mark

edit: Fixed URL

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sun Sep 06, 2009 8:54 am
by cybereality
This is really great news, now I don't have to bust my balls porting to Mac.

I am in the process of adding support for JPS output and hopefully that will be done soon (almost working now).

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sun Sep 06, 2009 1:06 pm
by scrameta
Yes I should add JPS output too. Just jpeg with the images next to each other right? Also I think animated gif for the wiggle style viewing would be good. Have to see how much Java will just do for me for almost free...

I'd offer to do the Mac port of your stuff, but I can't be bothered to learn Objective C and the OSX API right now!

Has anyone with a Mac tried this BTW? In case I messed up the deployment and it only runs on mine...

Mark

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sat Oct 10, 2009 6:38 pm
by BDJ
I just got a FUji W1 today. I almost sent it back until I downloaded your app for the MAC. It works fine for me (IMAC 20" Intel)

Bernard

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Tue Oct 13, 2009 3:29 pm
by grumpyMike
I have just updated my 3D slide maker for the Mac to include MPO files.
It's free at:- http://www.thebox.myzen.co.uk/Steroscop ... tware.html
It's a bit of a hack, let me know if it works for you.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Tue Oct 20, 2009 6:33 pm
by cybereality
I figured I'd post the source in case anyone wants. I compiled using Visual C++ 2008 Express, but it should work with any compiler.
MPO2Stereo.zip

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Wed Nov 04, 2009 1:45 am
by ArmanHunanyan
I am developing C++ class MPOWritter. The goal is to write mpo files which can be opened with Fuji Finepix V1 digital frame. The class is almost complete but it has some issue. I am looking tool that will help me to find that issue. I found Stereo Photo maker program, which has functionality to create MPO files. It also can preview mpo files. When I created mpo file with that program digital frame opens it as mpo file. When I creating mpo file using my class frame doesn't recognize it as MPO file. It opens file as single image. However stereo Photo Maker opens that file as MPO image. When I using your MPO2Stereo tool Left image becomes invalid jpeg while right image becomes valid. I think having your sources I will easily debug and find issue. Could you send it to my email arman.hunanyan@gmail.com. Thanks in advance

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Wed Nov 04, 2009 7:24 pm
by cybereality
The source is posted in the post directly above the last one. It should be pretty easy to follow. The MPO is basically just two JPGs in one file, as I'm sure you realized. The left image is first, then the right image. If your left image is getting corrupted then most likely you are not writing the proper end of file marker for the JPEG/EXIF data. Take a look at some real MPO files and split them with my program if necessary. Then use a hex editor to check the last byte of data. That is most likely where the error is.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Sun Dec 13, 2009 4:07 pm
by scrameta
That Slide Maker looks cool. Any chance of a PPC tiger build? :-)

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Wed Jan 20, 2010 6:25 am
by Vsevolod
There is another way to work with MPO files. Latest version of STOIK Imagic 5.0.4 (http://www.stoik.com/imagic" onclick="window.open(this.href);return false;) can split MPO files such as made by FujiFilm FinePix Real 3D W1 into standard JPEGs, generate stereo pairs (JPS, PNS), and anaglyphs. STOIK Imagic is free, but some advanced features will require purchase of activation key after initial 30 days. Splitting of MPO into JPEGs is available in free version.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Fri Feb 05, 2010 10:00 am
by magestik
Hello,

I'm working on S-3D apps for Linux. I wan't to include MPO viewing or converting. But I can't find MPO files.
Can you help me please ?

Thank you,

Magestik.

PS: Sorry for my bad english ... I'm french.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pairs

Posted: Fri Feb 05, 2010 7:00 pm
by cybereality
There are some MPO files in this post:
http://www.mtbs3d.com/phpBB/viewtopic.p ... 306#p32306" onclick="window.open(this.href);return false;

Convert all Fujifilm MPO files to JPS

Posted: Wed Aug 25, 2010 2:23 pm
by quizpalme
I have found the link to this page in the program from here:
http://3dvision-blog.com/tag/mpo2jps/" onclick="window.open(this.href);return false;
I like that program, but I needed to convert all files of a directory.
I have modifed the BAT-file to convert all MPO-files of a directory to JPS-files:

FOR /F %%i IN ('dir /b /s *.mpo') DO (
"%~dp0\MPO2Stereo.exe" "%%i"
"%~dp0\jpg2jps.exe" "%%i" -delete
)

Maybe this is helpfull for other people too...

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pa

Posted: Wed Aug 25, 2010 8:40 pm
by cybereality
You can also simply drag a number of files over the EXE and it will convert them all at once.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pa

Posted: Fri Aug 27, 2010 3:27 pm
by quizpalme
Yes, I like your program and I can drag a number of files over the EXE, but that does not work with the batch-file, which creates a JPS-file too.
You find it when you click on the link I have submitted before.
I have now found a way to resize the new JPGs too. Maybe this is a more interesting feature for other users
(because you can now create easily jps- and jpg-files for your website which your custom resolution):

Code: Select all

@echo off
set linksa=_L.JPG
set rechtsa=_R.JPG

if %1.==loop1. goto loop1

FOR /F %%i IN ('dir /b /s *.mpo') DO call %0 loop1 %%i
goto ende

:loop1
"%~dp0\MPO2Stereo.exe" "%2"
set alt=%2
set neu=%alt:~0,-4%
"c:\Program Files (x86)\IrfanView\i_view32.exe" "%neu%%linksa%" /resize_long=800 /aspectratio /resample /convert="%neu%%linksa%"
"c:\Program Files (x86)\IrfanView\i_view32.exe" "%neu%%rechtsa%" /resize_long=800 /aspectratio /resample /convert="%neu%%rechtsa%"
"%~dp0\jpg2jps.exe" "%2" -delete
goto ende

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pa

Posted: Sat Aug 28, 2010 2:24 pm
by cybereality
You may also want to take a look at my other utility, MPO2JPS, which converts directly to JPS:
http://www.mtbs3d.com/phpBB/viewtopic.php?f=3&t=4419" onclick="window.open(this.href);return false;

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pa

Posted: Tue Sep 14, 2010 3:44 am
by zbr
thanks for writing MPO2Stereo, cybereality
thanks for writing SplitMPOv2, scrameta

they make the W1 usable ; P

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pa

Posted: Thu Sep 16, 2010 8:07 pm
by cybereality
No problem. Anything I can do to help.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pa

Posted: Thu Jan 20, 2011 1:38 pm
by ALeeSVI
Great program, but I was unable to use the MPO to JPG converter to convert by dragging from windows. It will run the converter, but the physical files are never created. I had to do it one by one from the dos promt.

Re: MPO2Stereo: Convert Fujifilm MPO files to JPEG stereo pa

Posted: Thu Jan 20, 2011 8:07 pm
by cybereality
Yeah, there was a problem with the file paths. I know on Vista 32-bit it works perfectly and you can drag and drop files on the exe. Other OSes may not not work the same, but the files should still be created. Its just that the folder is wrong. I don't remember where the JPEGs went, but they're on your computer somewhere. You could try searching for the filename and see if it comes up (for example: myImage.mpo would become myImage_L.jpg and myImage_R.jpg so search for that).