3 Replies Latest reply on Sep 29, 2012 3:51 AM by areohbee

    How to Initialize Export Video Setttings

    woofyman99

      I'd like to initialize the export settings for video in an export plugin but it isn't covered in the SDK documentation.  I opened an export preset in an editor and looked at the table entires but I couldn't get it to work when I set the same table entries from my plugin.

        • 1. Re: How to Initialize Export Video Setttings
          areohbee Level 5

          Did you prefix them with 'LR_' ?

           

          In case you didn't know, in a preset, there is:

           

          ['{plugin-id}'].{export-param-name}

          {lr-setting}

           

          which need to be translated to

           

          {export-param-name}

          LR_{lr-setting}

           

          in the export session before beginning the export.

           

          R

          • 2. Re: How to Initialize Export Video Setttings
            woofyman99 Level 1

            Here's my code:

             

            function TourBuzzUploadTask.updateExportSettings (exportSettings)

                  exportSettings.LR_videoFormat = '4e49434b-4832-3634-fbfb-fbfbfbfbfbfb'

                 exportSettings.LR_videoPreset = 'SIZE_max'

            end

            • 3. Re: How to Initialize Export Video Setttings
              areohbee Level 5

              Does your code work?

               

              Video export is confusing. I'm doing my first video export and could not find the info I need in the documentation either.

               

              Here's my code for determining the target video extension (yuck):

               

              for i, vp in ipairs( LrExportSettings.videoExportPresets() ) do

                  local name = LrStringUtils.lower( vp:name() ) -- e.g. "Max".

                  if self.exportParams.LR_export_videoPreset:find( name, 1, true ) then -- e.g. "SIZE_max"

                      destExtension = vp:extension()

                      break

                  end

              end

               

              A totally ad-hoc/empirical hack, but it was the only thing I could find that worked.

               

              There has got to be a better way!(?) - any ideas???

               

              Rob