Vincent Chalnot

Exporting collections from Lightroom to Premiere

Sometimes software programming can have a very practical use in a totally unexpected situation.

I created a new Lightroom library dedicated to my videos, although I could have used Adobe Bridge for that, at the time it seemed quite a good idea considering the fact that I am pretty skilled at using Lightroom.

I wasn't expecting the total lack of export/import features of both Lightroom and Premiere that I planned to use to edit my videos.

In Lightroom I couldn't find a way to simply export a list of files from a collection or a selection but that's fine, I was used to tinker with Lightroom's SQLite database which I find a very good technical choice for it's powerfull features and the fact that it is a standard in software development and not a crappy proprietary format like Photoshop's PSD (A developer point of view)

I'm using SQLite Admin to explore and export data from the catalogue but you can use any SQLite database editor/admin or even the command line to extract the informations you need. It's not the most user friendly solution but it does the job. I found these articles quite useful to get an idea of the kind of data you can get from the database: What's in your Lightroom 2 catalog? and Getting to the data in Adobe Lightroom–with or without PowerShell.

I was personally looking to export the list of my "picked" videos so I used this query:

SELECT   r.absolutePath || d.pathFromRoot || f.originalFilename AS FullName
FROM Adobe_images i
JOIN AgLibraryFile f ON f.id_local = i.rootFile
JOIN AgLibraryFolder d ON d.id_local = f.folder
JOIN AgLibraryRootFolder r ON r.id_local = d.rootFolder
WHERE i.pick = 1 ORDER BY FullName

That gave me a list that looked like that:

Z:/Videos/2010/08 - Août/MVI_0010.MOV,
Z:/Videos/2010/08 - Août/MVI_0017.MOV,
Z:/Videos/2010/08 - Août/MVI_0039.MOV,
Z:/Videos/2010/08 - Août/MVI_0043.MOV,
Z:/Videos/2010/08 - Août/MVI_0048.MOV,
Z:/Videos/2010/08 - Août/MVI_0051.MOV,
Z:/Videos/2010/08 - Août/MVI_0052.MOV,
Z:/Videos/2010/08 - Août/MVI_0085.MOV,
Z:/Videos/2010/08 - Août/MVI_0086.MOV,
Z:/Videos/2010/08 - Août/MVI_0087.MOV,
Z:/Videos/2010/08 - Août/MVI_0088.MOV,

Then I tried to import this list to Premiere and I realized that there were nothing that allowed me to do that. There is the "batch list" import/export function but it doesn't take full pathnames, only filenames (???) and there is no CSV or simple XML import out of the box.

I checked the .prproj XML format and it seemed too complicated to write to it without having to code a real application and I'm pretty certain that Premier would have rejected the generated file. (Checksums, UUIDs and such things)

Then I was a bit desperate and I tried to go through Bridge to import my file, I didn't found anything that would allow me to import directly a list of files but I tried to open a Bridge collection (that you can found in %USERPROFILE%\AppData\Roaming\Adobe\Bridge CS6\Collections) directly with a text editor and it looked like this:

<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<arbitrary_collection version='1'>
	<file uri='bridge:fs:file:///Z:/Videos/2011/04 - Avril/Perhentians/MVI_7711.MOV'>
	<file uri='bridge:fs:file:///Z:/Videos/2011/04 - Avril/Perhentians/MVI_7712.MOV'>
	<file uri='bridge:fs:file:///Z:/Videos/2011/04 - Avril/Perhentians/MVI_7719.MOV'>
	<file uri='bridge:fs:file:///Z:/Videos/2011/04 - Avril/Perhentians/MVI_7720.MOV'>

That was just what I was looking for ! So I transformed my SQL query to something that would allow me to past the output directly into a Collection file between the <arbitrary_collection> tags :

SELECT '<file uri=''bridge:fs:file:///' ||
    replace(r.absolutePath || d.pathFromRoot || f.originalFilename, ' ', ' ')
FROM Adobe_images i
JOIN AgLibraryFile f ON f.id_local = i.rootFile
JOIN AgLibraryFolder d ON d.id_local = f.folder
JOIN AgLibraryRootFolder r ON r.id_local = d.rootFolder
WHERE i.pick = 1

Then after saving the new collection I opened Bridge and there it was ! I just had to drag'n'drop the files to Premiere to import them.

I plan to write a script that would convert automatically all your Lightroom's collection to Bride collections so that I may still work with Lightroom without having to do all this stupid hacks next time.

Share: Twitter Facebook Pinterest Tumblr Google+