2010-03-10

Video playback on my Casio Exilim Z10 digital camera

Watch movies on your Casio Camera's LCD screen, that is!



I have been thinking about watching movies (maybe TV series) on the screen of my Casio Exilim Z10 digital camera for half a year now. Just recently I have decided to do something about it. My first approach was to download a camera-made MJPEG video from the SD card of my camera, analyse the format and then use mencoder from the mplayer pack to generate something very similar format-wise but with my own movie content.

Mencoder failures
My first approach was to use mencoder. I love mencoder. It's my primary choice for transcoding stuff. But this time mencoder has miserably failed on me. The reason for that was that mencoder had a very poor multiplexer code built-in allowing literally zero control whatsoever how the audio and video streams you wish to mux together. The Casio Exilim Z10 digital camera requires that one video frame is followed by one audio frame (a short chunk of audio stream for the previous video fame). Densely muxed - in other words. The most obvious reason for that is, that this way playback requires less read-ahead, less caching on forward and backward seeks and thus less operational memory. What's more such muxing of A/V makes seeks a lot snappier since there is no need to read large areas of the slow flash storage (SD card) when a seek happens and land itself at some random position within the muxed stream.

Commercial Software
There is a commercial software called Digital Camera Media Studio by Makayama Interactive. It has a price tag. The freely downloadable demo versio has a 3 minute limitation for transcoding video. The only upside of this software was that it actually worked. It's campaign is quite misleading though: It advertises itself to be the de-facto transcoder for the "proprietary MJPEG format of Casio cameras". Now that's a sheer lie. Read on why!

Combining Commercial Software with mencoder
The no-brainer dumb idea to get a free lunch here is to slice up your source video into 3 minute chunks, transcode them using the commercial demo tool, and join them back together with mencoder. Let it be enough to say here: It works. I am not going to detail the mencoder command lines for that herein, because there is a superior method. Read on!

VirtualDub and Reps's article on steves-digitcams.com
Works! Hurray! Reps's blog on Casio Cameras is quite accurate. let me quote it for history's stake:


Hi all,


as I see all this mess around in all Casio forums about putting images and video back to cameras I promised to make a small tutorial. It is not perfect and will be edited constantly but I hope that You will get the idea. All software used for this process is kept freeware up to reasonable extent.

1. Still images to camera: freeware from Casio (all oldies are best when rediscovered :-) ) : http://www.exilim.com/intl/avenue/function/photo_t.html

Same can be done via Bestman editor (but shareware)

2. M4S2 video playback/editing:
a) I suggest to download ffdshow ( http://sourceforge.net/projects/ffdshow/ ) and install it (I personally did not associate it with any types of files)

b) open Video decoder configuration and select libavcodec for generic MPEG4:



c) this enables to open them in VirtualDub ( http://www.virtualdub.org) for editing and play back in WMP without sound synchronization problems.

d) for quick processing of M4S2 files for viewing on DiVX capable DVD player or other device I can recommend MP4Cam2avi :http://sourceforge.net/projects/mp4cam2avi/
This enables the DiVX compatibility and sound in eg MP3 format- and it is lighting fast!

3. To play back any video on Casio (MJPEG): to my great surprise my Z750 (which uses enhanced M4S2 video was capable of MJPEG coded AVI playback- so I believe that they all do- check it out please...)
a) open Your video in VD (version 1.7.0 supports AVI, MPEG and VOB at least...)
NB! careful with VBR MP3 soundtracks- You have to find modded VD for them or process the audio separately. NB! Make sure You are in full processing mode for video.
b) basic actions in VD will not be covered here - enough to visit eg http://www.doom9.org and read the tutorials (RTFM first as always :-)
c) if Your video is not 320x240 or 640x480 open Video->Filters->Add->resize , here You can adjust for letterbox and resize (use the preview...):


d) Open Video->Compression->ffdshow codec->Configuration (not tried various speeds but around 1000 seems OK- testing later :-) ):



e) Open Audio tab and set it to full processing mode also. Then open Conversion and make the desired changes (may depend on camera model):


f) Open Audio->Compression and select IMA ADPCM (less wasty than uncompressed PCM) and select desired quality:



g) Then You can do Preview filtered under File tab- and if no error messages You can go to File->Save as AVI... and save it like something VIDSxxxx.avi (even directly to Your camera if too lazy to load it later :-) )
h) as a small result I can offer this (WARNING, file is 3.5MB - common to MJPEG videos :-( ):http://casio.diagnostika.ee/VIDS3256.AVI

That is briefly sufficent for now, in some days I will continue with M4S2 playback in Casios (P505, Z7/850, S600, S770 as far I can recall now...)

Best and hope this helps You all a bit, JR

PS All questions and critique and additions and corrections are welcome...





No comments:

Post a Comment