Samples directory of scripts that migrate content from public content repositories to Kaltura using Kaltura's XML Bulk Upload Ingestion
PHP Other
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.

README.md

Kaltura's Bulk Upload XML Content Migration Sample Scripts

Video about Kaltura's Bulk Upload XML
Samples directory of scripts that migrate content from public content repositories to Kaltura using Kaltura's XML Bulk Upload Ingestion Learn more about Kaltura's Bulk Upload at:

This script includes

  • Zend - The complete Zend Framework 1.12 minimal (www.zend.com/community/downloads). This is used to parse feeds from public content repositories such as Ted.com's Feedburner videos feed.
  • Kaltura - The Kaltura PHP API Client Library (http://www.kaltura.com/api_v3/testme/client-libs.php).
  • phpQuery.php - Library used to parse HTML pages for simplified crawling of pages. This is used to parse pages of public content repositories that don't provide feeds.
  • 5minimport.php - Conversion script that migrates 5min.com feed to a Kaltura Bulk Upload XML format.
  • latesttedtalksimport.php - Conversion script that migrates Ted.com feedburner feed to a Kaltura Bulk Upload XML format.
  • KalturaAccountConfiguration.php - A configuration file for ImportEntriesFromTedRSSFeed.php.
  • ImportEntriesFromTedRSSFeed.php - A version of latesttedtalksimport.php showing how to submit the generated Kaltura Bulk Upload XML directly to Kaltura using the media.bulkuploadadd API call.
  • tempTedBulkUpload.xml - Sample Kaltura Bulk Upload XML (This file is generated by ImportEntriesFromTedRSSFeed.php).
  • openyalecourseimport.php - Conversion script that migrates courses from http://oyc.yale.edu/ to a Kaltura Bulk Upload XML format.
  • importYaleForm (folder) - Provides a web form for openyalecourseimport.php (this is self contained, just place in your web server)

Usage Guidelines

To run the scripts, simply use a PHP CLI, and enter the following:

ImportEntriesFromTedRSSFeed
  • Edit KalturaAccountConfiguration.php and include your Kaltura credentials.
  • php ImportEntriesFromTedRSSFeed.php
  • Visit your KMC account and check the Bulk Upload Log tab under the Content tab for import status.
The other migration scripts
  • php [migrationScript].php > outputBulkUpload.xml
  • Upload the generated outputBulkUpload.xml file to your KMC using the Bulk Upload XML ingestion in the Upload menu.

Samples Configuration

To edit the number of pages to import from 5min's feed:

  • Edit 5minimport, set the $pagesToFetch to the number of pages (API results paging) you want to import from 5min.

To edit the course to import from oyc.yale.edu:

  • Go to http://oyc.yale.edu/courses , select a course to import, go into the course page, click "VIEW CLASS SESSIONS", go into the first lecture page.
  • Edit openyalecourseimport and paste the URL of the first lecture in the course you wish to import to the variable: $firstCoursePage. Save.

importYaleForm (folder)

This folder provides a self-contained web form interface for the openyalecourseimport.php script. After placing in a web server, open the index.php file in a web browser, and the form will allow you to edit the script configurations. Hitting submit will download an XML file that can be submitted to Kaltura via the KMC. Live Sample at http://www.kaltura.org/demos/bulk-import-yale-opencourse/

License and Copyright Information

This sample code is provided for demonstration purposes only. No action to promote scraping or copying of content is encouraged. Always ask for the content owner permission and retain proper attribution when using content from other sites.

All code in this project is released under the AGPLv3 license unless a different license for a particular library is specified in the applicable library path.

Copyright © Kaltura Inc. All rights reserved.

Authors @zoharbabin and many others.