...making Linux just a little more fun!

Camera review: Kodak V1253/Ubuntu Linux

By Peter Knaggs

This is just a quick explanation of the Kodak V1253 camera, from the point of view of interoperability with Linux.

A full review written by OSNews contributor (and former editor) Eugenia Loli-Queru can be found here.

I'll just mention some of the quirks when using this camera with Linux.

This camera comes with an empty SD card slot. It also has 32MB of internal (built-in) flash memory. The internal memory doesn't appear to Linux as a USB device, so I initially thought that this camera might not be a good choice for Linux users seeking to avoid using the camera with an additional SD memory card.

Without using an SD card, I thought that the internal memory would only be accessible using the "EasyShare" drivers for the Microsoft operating system (these are apparently only supported in Microsoft Windows XP or later, but I didn't try them, for obvious reasons). But it turns out that by using gphoto2 and gtkam on Ubuntu Gutsy Gibbon, the camera's memory is accessible over USB (see below).

Getting Started

Charging the battery is the first puzzle.

The camera comes with

All of the above items must be used together, simply to charge the camera battery.

While the battery is charging in this way, the unit can't be used as a camera. The little blue "heart" light on the leftmost button on top of the camera will flash while the camera is charging. When charging is completed, the lights on all three of the leftmost buttons on top of the camera will be lit.

The camera also has an ordinary power adapter connector, but no power connector is shipped for this.

Units are available to recharge the battery outside of the camera, but none is shipped with the camera.

Getting the captures out over USB using gphoto2 and gtkam

Initially, I didn't know about gphoto2 and gtkam for Linux.

In Ubuntu 7.10 (Gutsy Gibbon), gtkam is able to see the camera, save photos from it, and upload photos to it.

It took a little trial and error to find the proper sequence to get the camera's USB interface to show up in Linux.

After plugging in the USB connector, I pressed the "ON/OFF" button on the top of the camera (pressing any of the four leftmost buttons on the top of the camera appears to have the same effect). After that, the screen comes "on" (i.e. the backlight comes on) but doesn't display anything.

After the above sequence, the camera shows up in the lsusb output and the dmesg output looks like this:

[84101.432818] usb 5-6: new high speed USB device using ehci_hcd and address 7
[84101.565396] usb 5-6: configuration #1 chosen from 1 choice

The lsusb output contains the following additional line, indicating that the camera's USB interface is detected:

Bus 005 Device 007: ID 040a:05b6 Kodak Co. 

In gtkam, clicking on the menu item Camera and selecting the Add Camera menu item, I selected Kodak V705 (you can select any of the cameras that use a USB interface rather than a Serial interface, e.g. the first in the list is AEG Snap 300), click on Detect and click OK. After clicking OK, gtkam detected the camera as a USB PTP Class Camera.

Downloading and uploading photos works OK. Downloading videos works OK (and quite fast too, full USB 2.0 speed).

Uploading videos seems to be a little hit-and-miss at the moment. Sometimes it works, but sometimes the transfer appears to go through but hits a "PTP I/O error" right at the end. After such an error, nothing works, even downloading photos which downloaded successfully before also fails with the same "PTP I/O error". To recover, I have to go through the USB disconnect/reconnect sequence (see below). So I haven't had complete success with videos yet, and would recommend using the SD card approach (see the next section) as it seems to be very reliable.

To disconnect the camera from the USB, pressing the ON/OFF button on the top of the camera does the trick. If you disconnect the USB cable before doing this, the camera powers on, which isn't very nice.

The USB disconnection should looks something like this in the dmesg output, and of course lsusb should no longer list the camera.

[84863.752847] usb 5-6: USB disconnect, address 7

After pressing the ON/OFF button on the top of the camera, the little blue "heart" button will usually begin to flash (after a short time). This means that the camera is disconnected. You can then press the SCN button to connect it again. This is all without unplugging or plugging in the USB connector (just leave it attached and plugged in).

Sometimes, gtkam gets stuck starting up, so I found that removing the $HOME/.gphoto/settings file, unplugging the camera, plugging it back in and re-doing the camera detection steps helped get it going again.

Getting the captures out using an SD card

To get the photos (and videos) out of the camera, I used an additional SD card (not included).

The camera has one SD card slot (which is SDHC compatible).

I tried the camera with a SanDisk 4GB (SDSDRH-4096-AC11) card (this SD card comes with a USB card reader, making it very convenient for use on older Linux machines). The camera apparently accepts SDHC cards up to 8 GB, although the packaging and manuals make no mention of this, and I didn't try an 8GB card. The camera does allow the images (and small videos) to be copied from the internal flash to the SD card. When the SD card is installed, if you choose "auto" it becomes the default location for the captures.

Photo Capture (JPG)

The camera captures still images in a variety of aspect ratios. The camera uses JPEG/EXIF v 2.21. This table lists them in order of decreasing size. The lens unit has "Schneider - KREUZNACH" and "VARIOGON 37-111mm (Equiv.) AF 3X Opt." written on it. The aperture can vary from f/3.4 to f/5.3. The shutter speed can vary from 8s to 1/2000s. It uses TTL autofocus, there's no manual focus control.

Megapixels Aspect Ratio Dimensions
12 4:3 4000 x 3000
10.7 3:2 4000 x 2664
9 16:9 4000 x 2256
6 4:3 2832 x 2128
3.1 4:3 2048 x 1536
2.2 3:2 1800 x 1200
2.1 16:9 1920 x 1080
1.2 4:3 1280 x 960

It has a clear bright 3.1" LCD screen with a 16:9 aspect ratio, but no viewfinder.

It can capture 9 megapixel images in the 16:9 aspect ratio, and up to 12 megapixel images in the 4:3 aspect ratio, perhaps useful if you're planning on printing the pictures. Most computer monitors and HDTVs nowadays are only be able to display around 2 megapixels (1920 x 1080). The still images the Kodak V1253 captures look comparable to a 4 megapixel camera (not noticeably clearer, despite the much higher "12 megapixel" number).

It has a convenient sensor (which can be switched off for either video or photos or for both) to detect when you have rotated the camera vertically.

Video Capture - MPEG-4 Part 2 at 1280x720 (720p)

The Kodak V1253 can capture video. The codecs is uses are:

A raw sample direct from the camera can be found here. It can capture in these resolutions:

Resolution Name Bitrate
1280 x 720 1280 x 720 (HD720p) HQ 13mbps
1280 x 720 1280 x 720 (HD720p) 10mbps
640 x 480 640 x 480 (VGA) HQ todo
640 x 480 640 x 480 (VGA) todo
320 x 240 320 x 240 (QVGA) todo

The camera has two microphones, so it's able to record in stereo mode. Audio quality is fine.

When recording video, a bright green LED light shines out from the front of the camera. Perhaps this is needed by the autofocus? Remember that it will show up in the recording, if you're taking video of reflective surfaces.

Remember that video files will be cut off at 2 GB because of the FAT filesystem limitation. That's about 16 minutes of 720p HQ video.

The codec Kodak used is ffodivx, not the more efficient H.264 (AVC).

Video Playback

The ffodivx ".mov" video files play back at 1280x720 resolution using vlc, totem, xine or mplayer.

Under Ubuntu 7.10 (Gutsy Gibbon), the default video player (totem) does a very good job (both audio and video work fine by default).

The audio runs too fast and breaks up in xine, on both the 3.4GHz P4 box and the iMac. Not sure why, yet.

Playback with mplayer and the -vo xv flag tends to jam up after playing back for a little while. When playing back using mplayer with the -vo x11, the video doesn't jam, but of course the video can't go full-screen when using the -vo x11 flag. An alternative, if you have OpenGL support on your graphics card, is to use the -vo gl2 flag, which works quite smoothly. The audio is OK in mplayer.

You can try video playback on your system using this sample video from the review article.

To get the video playback to look as smooth as real 720p from ATSC sources, you have to hold the camera very steady. If you are doing any "panning", you have to do it quite slowly, to avoid slight jagged jitters during playback.

  mplayer  -framedrop -monitoraspect 16:9 -cache 8192 -ao alsa  v1253.MOV

The output from mplayer in Ubuntu 7.10 (Gutsy Gibbon) looks like this:

MPlayer 2:1.0~rc1-0ubuntu13.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.40GHz (Family: 15, Model: 3, Stepping: 4)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing 100_0120.mov.
Cache fill:  0.00% (0 bytes)   
Quicktime/MOV file format detected.
VIDEO:  [mp4v]  1280x720  24bpp  30.006 fps    0.0 kbps ( 0.0 kbyte/s)
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [alaw] aLaw/uLaw audio decoder
AUDIO: 16000 Hz, 2 ch, s16le, 256.0 kbit/50.00% (ratio: 32000->64000)
Selected audio codec: [ulaw] afm: alaw (uLaw)
==========================================================================
AO: [alsa] 16000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
VO: [xv] 1280x720 => 1280x720 Planar YV12 
A:  25.8 V:  25.8 A-V:  0.000 ct:  0.000 776/776 33%  0%  0.1% 5 0 49% 

Using the nVidia 5200 graphics card, you can playback using mplayer's OpenGL support with a command line as follows:

mplayer -vo gl2 -framedrop -monitoraspect 16:9 -cache 8192 -ao alsa  v1253.MOV

This gives much smoother playback, with no jams.

MPlayer 2:1.0~rc1-0ubuntu13.1 (C) 2000-2006 MPlayer Team
CPU: Intel(R) Pentium(R) 4 CPU 3.40GHz (Family: 15, Model: 3, Stepping: 4)
CPUflags:  MMX: 1 MMX2: 1 3DNow: 0 3DNow2: 0 SSE: 1 SSE2: 1
Compiled with runtime CPU detection.
Can't open joystick device /dev/input/js0: No such file or directory
Can't init input joystick
mplayer: could not connect to socket
mplayer: No such file or directory
Failed to open LIRC support. You will not be able to use your remote control.

Playing 100_0120.mov.
Cache fill:  0.00% (0 bytes)   
Quicktime/MOV file format detected.
VIDEO:  [mp4v]  1280x720  24bpp  30.006 fps    0.0 kbps ( 0.0 kbyte/s)
xscreensaver_disable: Could not find XScreenSaver window.
GNOME screensaver disabled
==========================================================================
Opening video decoder: [ffmpeg] FFmpeg's libavcodec codec family
Selected video codec: [ffodivx] vfm: ffmpeg (FFmpeg MPEG-4)
==========================================================================
==========================================================================
Forced audio codec: mad
Opening audio decoder: [alaw] aLaw/uLaw audio decoder
AUDIO: 16000 Hz, 2 ch, s16le, 256.0 kbit/50.00% (ratio: 32000->64000)
Selected audio codec: [ulaw] afm: alaw (uLaw)
==========================================================================
AO: [alsa] 16000Hz 2ch s16le (2 bytes per sample)
Starting playback...
VDec: vo config request - 1280 x 720 (preferred colorspace: Planar YV12)
Could not find matching colorspace - retrying with -vf scale...
Opening video filter: [scale]
VDec: using Planar YV12 as output csp (no 0)
Movie-Aspect is 1.78:1 - prescaling to correct movie aspect.
SwScaler: using unscaled yuv420p -> bgr24 special converter
VO: [gl2] 1280x720 => 1280x720 BGR 24-bit 
[gl2] You have OpenGL >= 1.2 capable drivers, GOOD (16bpp and BGR is ok!)
[gl2] antialiasing off
[gl2] bilinear linear
gnome_screensaver_control()53 ct:  0.125  81/ 81 41% 57%  0.5% 54 0 49% 
Exiting... (Quit)

Using the provided RCA cable, you can playback (at NTSC resolution) to a TV or VCR.

To playback 720p from the camera directly to a 720p HDTV, a separate "dock" would be needed. But of course, you don't need a HDTV if you already have a computer running Linux, and the playback of 720p in Linux is quite smooth (not as smooth as playing back 720p ATSC captures using XVmc, but close).

Converting to MPEG2 using mencoder

To be able to playback video on most DVD players, as well as being able to playback using XVmc, we'd need to be able to convert the video into MPEG2. One way to do this is to use mencoder as follows (see here for a guide to all the options). The resulting file is about 70% smaller, but the process takes a lot of CPU resources to preserve the high quality, and runs at only around 6fps on a 2GHz iMac. It takes around one minute for an 11 second video. Let's try it with the sample here:

wget https://www.osnews.com/img/19052/v1253.MOV

mencoder -oac lavc -ovc lavc \
-of mpeg -mpegopts format=dvd:tsaf \
-vf harddup -srate 48000 -af lavcresample=48000 \
-lavcopts vcodec=mpeg2video:vrc_buf_size=1835:vrc_maxrate=9800:vbitrate=8000:\
keyint=15:trell:mbd=2:precmp=2:subcmp=2:cmp=2:dia=-10:predia=-10:cbp:mv0:\
vqmin=1:lmin=1:dc=10:vstrict=0:acodec=ac3:abitrate=192 \
-ofps 30 -o output.m2v v1253.MOV

Converting to MPEG2 using transcode

The transcode input works OK, but audio is lost. Remember to use -g to specify the video stream frame size, otherwise transcode crashes. Here, we'll just use the default ffmpeg encoding settings, which are lower quality but quicker to encode. This sample takes only about 4.5s to encode, and the resulting file is only about one seventh of the size of the original (3MB compared to 21MB).

  wget https://www.osnews.com/img/19052/v1253.MOV
  transcode -i v1253.MOV -g 1280x720 -x mov  -y ffmpeg -F mpeg2video -o output

Using mplayer as the input to transcode works OK, but audio is lost. Again, remember to use -g to specify the video stream frame size, otherwise the resulting video is just a blur of colors. For example, we can use ffmpeg to encode to mpeg2 using this command:

  wget https://www.osnews.com/img/19052/v1253.MOV
  transcode -x mplayer -i v1253.MOV -g 1280x720  -y ffmpeg -F mpeg2video -o output

lsusb -v

This is the output of sudo lsusb -v.

Note: your camera's serial number shows up in the iSerial field of the Device Descriptor section:

Bus 005 Device 021: ID 040a:05b6 Kodak Co. 
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  idVendor           0x040a Kodak Co.
  idProduct          0x05b6 
  bcdDevice            1.00
  iManufacturer           1 Eastman Kodak Company
  iProduct                2 KODAK EasyShare V1253 Zoom Digital Camera
  iSerial                 3 ____________
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength           39
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0 
    bmAttributes         0xc0
      Self Powered
    MaxPower                2mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           3
      bInterfaceClass         6 Imaging
      bInterfaceSubClass      1 Still Image Capture
      bInterfaceProtocol      1 Picture Transfer Protocol (PIMA 15470)
      iInterface              0 
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x01  EP 1 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x82  EP 2 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0200  1x 512 bytes
        bInterval               0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x84  EP 4 IN
        bmAttributes            3
          Transfer Type            Interrupt
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0040  1x 64 bytes
        bInterval              16
Device Qualifier (for other device speed):
  bLength                10
  bDescriptorType         6
  bcdUSB               2.00
  bDeviceClass            0 (Defined at Interface level)
  bDeviceSubClass         0 
  bDeviceProtocol         0 
  bMaxPacketSize0        64
  bNumConfigurations      1
Device Status:     0x0001
  Self Powered

Conclusion

Given the lowish price, the large bright screen and well thought out user-interface, it's a useful camera.

The video quality is surprisingly good, although ffodivx does fill up the precious flash memory more quickly than H.264 would.

Kodak also make an even lower-priced camera (model number Z1275) which also records 720p, albeit at "medium" quality (10Mbps) instead of 13Mbps.

Talkback: Discuss this article with The Answer Gang


Bio picture I studied engineering at Université de Liège for a year, then at Trinity College Dublin for four more (and where I wish I had paid more attention during the networking lectures). I've always been curious about audio and video on computers, and Linux has been truly an amazing platform for learning about these areas.

Copyright © 2008, Peter Knaggs. Released under the Open Publication License unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 148 of Linux Gazette, March 2008

Tux