Sunday, March 11, 2012

Using a photo frame as second monitor [Updated]

Some computing scenarios would benefit from a second monitor, even a small one. A good example are HTPC, where info like what music, radio station, or TV channel is played is often shown on little 2-line LCD devices.

Photo frames offer so much more space - and at much higher resolution than even the biggest LCD devices - to display information. If one only could write to them.

The Samsung SPF-87H Digital Photo Frame is such a device. It can be connected to a computer and switched into a so called Mini-Monitor mode, allowing the computer to write to the frame. Samsung is offering a program called 'Frame Manager' for Windows, but nothing for Linux. Some attempts for Linux functionality have been made already, like here, here, and discussion here.

I am now offering a Python script, which can lock the frame into Mini-Monitor mode and send pictures to the frame. The script is very simple, has basically no error checking, but is heavily commented. It provides the basic functionality only, e.g. pictures must be pre-sized to what the frame can handle (800x480 pixel, width x height). To use the script, copy the content of the post pyframe_basic into a file pyframe_basic and make it executable (chmod a+x pyframe_basic).

An advanced version - not shown yet - will use the Python Imaging Library (PIL) to process pictures of any size and type to fit with the frame requirements, and could prepare pictures with textual information.

The photo frame unfortunately does not allow auto-connection. Go through these steps for manual connection:
  • Connect frame to computer with USB cable
  • Switch on the frame
  • A dialogue pops up on the frame, offering Mass Storage, Mini Monitor, and Photo Frame. Select Mini Monitor and press Select
  • Your welcome picture (see program code) will be shown

UPDATE 1: transfer speed evaluated
UPDATE 2: code for switching from Mass Storage mode to Mini Storage mode added
UPDATE 3: a program to send screenshots to the photo frame at video speeds, completely from within Python
UPDATE 4: a program which allows to send screenshots upon receiving a trigger signal
UPDATE 5:  A video recorded from a photoframe, showing a video playing on the photoframe

2 comments:

  1. Hey there! Thanx a ,lot for ur work, i think its brilliant. I only get a "no supported devices found" on my spf-107h. Im on ubuntu 11.10.

    ReplyDelete
  2. ???

    you tried the idVendor and idProduct for your frame, which might be these:
    # Samsung SPF-107H (data from web reports - not tested)
    SPF107H_MiniMon = {'name':"SPF107H Mini Monitor", 'idVendor':0x04e8, 'idProduct':0x2036, 'width':1024, 'height':600 }
    SPF107H_MassSto = {'name':"SPF107H Mass Storage", 'idVendor':0x04e8, 'idProduct':0x2035}

    see here: http://pyframe.blogspot.com/2012/01/code-to-switch-frame-from-mass-storage.html
    ullix

    ReplyDelete