Part 1: Uploading Photos from Lightroom to a Samsung Frame TV


Posted:

Categories & Tags:

This is a multipart series in a blog series about using Lightroom and the Samsung Frame TV. Check out Part 1 (Lightroom configuration), Part 2 (using ChatGPT for generating an upload script) and Part 3, Lightroom Mobile integration.

I’ll just come out and say it: I almost absolutely love my Samsung Frame TV. The hardware is outstanding. It truly does hang on the wall like art. When the television is in art mode, it really does look like art on the wall. Samsung truly delivered something new and compelling with the Frame TV. It’s a great way to expose and see my photography on a regular basis. I love coming out of the office and seeing a new photograph on the TV. I can’t imagine a having a regular TV sitting as a big black rectangle on my wall anymore.

The Frame TV, does have one fatal flaw, however, the software on it falls far short. Samsung deliberately makes it difficult to push your own art to the Frame TV. Samsung obfuscates necessary steps at the bottom of long lists requiring lots of scrolling and remote clicks. Additionally, there is no easy way to set defaults when new photographs are loaded into the TV. Samsung clearly wants Frame TV customers to subscribe to their $50 a year professional art subscription service. I create plenty of art that I’m super proud of. I don’t need to pay Samsung to put content on my TV. However, Samsung fights me every step of the way on getting my own art on the Frame TV.

Adding insult to injury, it’s not unheard of for these TVs to have issues. All of the configuration data (photo, mat color, and mat size) is on the physical television. There is no cloud powering the TV and no way to backup and restore the Frame TV’s configuration. If my TV dies for whatever reason, my entire set up goes out the window. That’s thousands of clicks to get things just right over many photos.

As a photographer, all of my truly great photos are in Adobe Lightroom. Uploading the photos to the Frame TV is way more complicated than it should be. Ideally I could stick a USB stick into the TV with my photographs and all of the configuration data would stay on the USB stick for me to easily backup. Alas, Samsung doesn’t make this easy. I don’t want to lose the configuration of hundreds of photographs on the Frame TV.

I said something I thought I would never say: I need a build process for my television. I want to make sure I can connect to the Frame TV, push all of the photographs into the Frame TV’s database, and set the right mat type and color each and every time. I was hoping there was something I could use with Home Assistant, but alas that search turned up dry. There were no plug-ins for Adobe Lightroom. I did however find a Python library which connected to the TV and provided the APIs I needed in theory to make this work. The problem is, I’m not a Python programmer. My partner mentioned needing to learn Python so I figure this is as good a reason as any to jump on in.

Build a Lightroom Collection

I’ve taken tens of thousands of photos spread across many years and many directories in Lightroom’s catalog. I did a few things in Lightroom to set up the photo collection process. I didn’t want to make copies of RAW files in a separate directory to eat up disk space. Collections and virtual copies to the rescue here.

  1. Create a collection in Lightroom for all the photos I want to push to the Frame TV.
  2. Create a virtual copy of each photo I want to push to the Frame TV (so the original can live outside of 16×9).
  3. Add the virtual copy to the newly created collection
  4. Set the aspect ratio of the virtual copy to 16×9.
  5. Set the EXIF caption of the photograph to flexible_<color>.

If you’re an experienced Lightroom user, I probably had you until step 5. The Samsung Frame TV has several different kinds of mats.  I’m using the flexible mat, which has the thinnest border, maximizing space for my art. The flexible mat has 14 different color options. For example, if I wanted the medium grey neutral mat, I’d set the caption of the photograph to flexible_neutral.

The caption can be found on the right-hand side of library view in Lightroom. Here’s a list of colors for the caption:

I’ve also created three additional smart collections to make sure I’ve said all the right options and haven’t lost any photographs:

Figure 1: Photographs that have FrameTV attributes but aren’t in a collection that gets sent to the Frame TV

Figure 2: Photographs that are in a collection that go to the FrameTV, but don’t have the flexible mat set.

Figure 3: Photographs that have a specific mat type and color that I’m looking to review.

I can certainly create different kinds of collections for different times of year. I could have a holiday collection, a family collection, a motorcycle collection (lol), and so on. Once I’ve built the collection I’m ready to export the photos for upload into the Frame TV.

Exporting images from Lightroom

The export process from Lightroom is pretty straightforward, much like any other export but with a few specific options set:

  • Choose a consistent folder to export your files to. Out of sheer laziness and ease of review, I created a folder called Samsung on my computer’s desktop: /Users/me/Desktop/Samsung (I’m a Mac user).
  • Overwrite existing files without warning
  • Set quality export to 80% (I’m still tweaking this)
  • Resize to fit dimensions 3840 x 2160 pixels

Lightroom then chugs through your entire collection exporting photos one by one but including the metadata we need for mat type and color. Make sure to save these export settings as a specific profile.

Uploading images to the Samsung Frame TV

As I mentioned earlier, I found a library on Github by Nick Waterton: samsung-tv-ws-api. He’s got a bunch of documentation about how to get the library running on your computer. To simplify things a bit for me, I used the community edition of PyCharm. I simply:

I’ll admit, I’m a first-time Python programmer and my code is simple, slow, and not very smart but gets the job done. I didn’t want to write synchronization code as it much easier to delete all of the images off the TV and re-upload fresh photography from Lightroom.  Want to change the mat colors for several photographs? Need to change the JPEG quality factor? Just export from Lightroom and rerun the upload script. It only takes a few minutes to delete and re-upload 150 photos.

upload_to_frameTV.py

import logging
import os

from PIL import Image
from samsungtvws import SamsungTVWS

# Increase debug level
logging.basicConfig(level=logging.INFO)

# Setup Variables
target_dir = '/Users/you/Desktop/Samsung/'
target_ip = '192.168.abc.xyz'

# Normal constructor.  Create a TV object to connect with in code.
tv = SamsungTVWS(target_ip)

# List the art available on the device
available_art = tv.art().available()

# Delete all the art on the TV. It may take a few moments to complete.
for art in available_art:
    print("Deleting Content ID"+art["content_id"])
    tv.art().delete(art["content_id"])
print('nDelete Complete. Loading Artn')

# Open the directory to start loading art
for files in os.listdir(target_dir):
    if files.endswith('.jpg'):
        with open(target_dir + files, 'rb') as f:
            image = Image.open(f)
            image_exifdata = image.getexif()
            try:
                selected_matte = str(image_exifdata[270])
            except NameError:
                selected_matte = 'flexible_black'
            print('Uploading file ' + files + ' with ' + selected_matte)
            # Upload a picture
            file = open(target_dir + files, 'rb')
            data = file.read()
            tv = SamsungTVWS(target_ip)
            tv.art().upload(data,  file_type='JPEG',  matte=selected_matte)
            tv.close()

The value in this approach is that all the configuration data remains in Lightroom. Any changes that need to be made can be done in Lightroom and systematically pushed to the Frame TV. Once the new art has been pushed to the TV, go into art mode and choose to show all art.

With this little workaround, I now absolutely love my Samsung Frame TV. Go forth, create, and reliably and regularly push new content to your Frame TV!

Don’t miss the next ride!

Subscribe now to get the latest posts emailed to you.

Continue reading

Sharing

Navigation

Comments

One response to “Part 1: Uploading Photos from Lightroom to a Samsung Frame TV”

  1. Baptiste BERG Avatar
    Baptiste BERG

    Thanks for sharing this precious experience, i’m willing to do exactly this and your article confirms it is actually possible.

Leave a Reply to Baptiste BERGCancel reply

Discover more from Dashed Yellow Line

Subscribe now to keep reading and get access to the full archive.

Continue reading