Our main brightcove object, used for collecting media files, interpretting FCS XML, writing brightcove compliant XML and uploading these media files to BrightCove.
Creates a support folder at specified path, create subdirectories specified by self.supportSubDirs. If we are outputting multiple renditions via the multiplebitrate flag, we will create some bitrate target folders.
Load from configuration file, expects a ConfigParser type object. If you subclass, you should call this function. If we return false then you should abort. or do your own sanity checks
Cycle through our media support directory and find related media files
The BrightCove module has a number of configuration options that will define it’s behavior. The BrightCove module will inherent the same configuration file that transmogrifier.py is provided at runtime; by default this file is located at /usr/local/etc/transmogrifier.conf. This file can be usurped with a separate configuration file by providing transmogrifier.py with the --configFile= parameter.
Options utilized by the BrightCove module are designated under the [BrightCove] config section, as seen in the transmogrifier.conf file shown below:
[BrightCove]
host=38.113.27.171
username=demo
password=mypassword
publisherid=10001
multiplebitrate=True
In the following example, we’ll call the BrightCove with it’s only action, ‘upload’. In this example, we have multiplebitrate set to False, and we have setup FCS Copy responses to output 3 renditions of our file, a 1100kbps rendition at half rez, and 1500kbps and 3000kbps renditions at native resolution. We have also configured and fired an XML response to output an XML file, using the asset’s title, ‘myasset’, to our support file at /FCSSupport/BrightCove/xmlin/myasset.xml
>>> transmogrifier.py -a upload -m BrightCove -t myasset
DEBUG: Running older Codebase!
DEBUG: Running for module: BrightCove validModules: BrightCove,YouTube,thePlatform
BrightCove: Loading FCSXML from path: '/FCSSupport/BrightCove/xmlin/myasset.xml'
BrightCove: Reporting to Final Cut Server: '/FCSSupport/fcsvr_xmlin/BrightCove_23456.xml'
BrightCove: Multiple bitrate specified, searching sub directories
BrightCove: searching directory: /FCSSupport/BrightCove/media/1100
BrightCove: readMediaFiles() adding file found at '/FCSSupport/BrightCove/media/1100/myasset.mov' with bitrate: '1100'
BrightCove: searching directory: /FCSSupport/BrightCove/media/1100.5
BrightCove: searching directory: /FCSSupport/BrightCove/media/1500
BrightCove: readMediaFiles() adding file found at '/FCSSupport/BrightCove/media/1500/myasset.mov' with bitrate: '1500'
BrightCove: searching directory: /FCSSupport/BrightCove/media/3000
BrightCove: readMediaFiles() adding file found at '/FCSSupport/BrightCove/media/3000/myasset.mov' with bitrate: '3000'
BrightCove: searching directory: /FCSSupport/BrightCove/media/stills
BrightCove: upload() uplaoding file: 'myasset.mov' as '1100kbps_myasset.mov'
BrightCove: upload() uplaoding file: 'myasset.mov' as '3000kbps_myasset.mov'
BrightCove: upload() uplaoding file: 'myasset.mov' as '1500kbps_myasset.mov'
BrightCove: upload() uplaoding file: 'manifest.xml'
BrightCove: Successfully published assets to BrightCove.
This action will upload each of our renditions (in this particular case we provided no stills for upload), had an asset named ‘myasset.jpg’ been present in the stills folder, it would have been uploaded.
After uploading our media files, we upload a BrightCove compliant XML file, manifest.xml
For more information about working with Transmogrifier modules, click here