SlideShare une entreprise Scribd logo
1  sur  25
Cloud Video Platform PHP API Introduction
Next 3 Slides may be
skipped if you know
what’s VIMANTRA 
95% of Asian Video Streaming
Suffers from
DON’T SUPPORT MOBILE VIDEO, NOT ENOUGH BANDWIDTH, BUGGY VIDEO PLAYERS
Problem with WebTV
Infrastructure
Its Expensive
- Global Content Delivery networks have high upfront costs
- Video Transcoding to convert the video for multiple end user devices requires
expensive software and hardware infrastructure
- Costly and lengthy development cycle to build players which work across devices.
- High Capital Costs for video storage.

Technically Complex
- As viewers become mobile across devices, new video encoding formats have to be
handled
- Integration with ad exchanges to monetize your content requires complex
integration
- your player has to be aware of the end users device before it requests an ad
VIMANTRA Solves
This Problem

Upload Your
Video to
Vimantra

Vimantra converts for
over 100+ devices and
stores your video.
Integrated with CDN with
presence in 140+ cities
across the world.

Vimantra’s Unique Embed
Codes and API have
automatic device
detection and CDN
integration. Play the right
format from the server
nearest to the viewer.
CLOUD ECOSYSTEM
Integrated
Vimantra is integrated with popular file storage like Google
Drive, Dropbox , Amazon S3 and Box.com
WHERE CAN I GET THE API
www.vimantra.com

Login/API -> Vimantra API
WHERE CAN I GET THE API –
DIRECT Links

Documentation

Tar File with PHP SDK
Tar File with PHP SDK and Test
Videos

http://fpc.vimantra.com/corp/VIMANTRA+PHP+S
DK+-+3+Steps+to+Get+You+Started.pdf

http://fpc.vimantra.com/corp/sdkvimantra_php_
1.0_lite.tar
http://fpc.vimantra.com/corp/sdkvimantra
_php_1.0.tar
SETUP – Untar and Start
CONFIG FILE

cd sdkvimantra_php_1.0
vi vimantra.config.php
<?php

VIMANTRA KEY
VIMANTRA TOKEN
AWS TOKEN

AWS SECRET

/**
*
*/
// Vimantra access info
if (!defined('vimantraAccessKey'))
define('vimantraAccessKey',’YOUR-ACCESS-KEY’);
if (!defined('vimantraToken'))
define('vimantraToken', 'YOUR-API-TOKEN');
if (!defined('AWSKEY'))
define('AWSKEY', ‘YOUR-AWS-KEY');
if (!defined('AWSSECRET'))
define('AWSSECRET', 'YOUR-AWS-SECRET');

?>

AWS KEY & AWS SECRET are required only if you are uploading
videos from AmazonS3
VIMANTRA KEY & TOKEN

You can get your VIMANTRA Key & Token from VIMANTRA
Content Management Console. Its under Settings->My User
Profile.
API USE CASE

Upload Video to
Vimantra

Generate Embed
Code

Paste Embed Code on
your website.
It works across devices
globally.
VIMANTRA - Instance
All sample code is under subdirectory samples

Instantiate vimantra
…..
if (!class_exists('vimantra'))
require_once '../vimantra.php';
require_once '../vimantra.config.php';

// Instantiate the class
$vim = new vimantra(vimantraAccessKey, vimantraToken);
……
UPLOAD - From Desktop
Sample Code File: vimantra.fileupload.php
……
$data = array("displayname" => "SINTEL Trailer desktop video upload",

"file_contents" => '@./sintel480p.mp4',
"actiontype" => "File-Upload");

$vim->fileUpload($data);

$media_upload =
echo "Vimantra::fileUpload(): " . print_r($media_upload) . "n";
….

Upload Video
File from PC
UPLOAD - From AmazonS3
If your S3 file has granted read-only access for
everyone then you don’t have to use the AWS KEY &
SECRET
Sample Code File: vimantra.uploads3public.php
……

$data = array(

Upload Video
File from
AmazonS3
- Public
Access

"amazon_bucket" => "mybucket",
"amazon_directory_name" => "video/video2.mp4",
"displayname" => "Public post_" . time(),
"actiontype" => "Upload-S3"
);

$vim->UploadS3($data);

$media_upload =
echo "nVimantra::UploadS3(): " . print_r($media_upload) . "n";
….
UPLOAD - From AmazonS3

Sample Code File: vimantra.uploads3private.php
…..

("bucket_permission" => 'private',
"amazon_aws_key" => AWSKEY,
"amazon_aws_secretkey" => AWSSECRET,
"amazon_bucket" => "myprivatebucket",
"amazon_directory_name" => "video/video.mp4",

$data = array

Upload Video
File from
AmazonS3
- Private
Access

"displayname" => "S3 Private Upload post_" . time(),
"actiontype" => "Upload-S3");
$media_upload =
…..

$vim->UploadS3($data);
UNIQUE ID
Typical Result : You get a unique ID for your video
(

[responsetype] => media/postAction/File-Upload
[status] => OK
[session] => Array
(
[0] => Array
(
[account] => mycompany
[ipAddress] => XXX.XXX.XXX.XXX
[location] => Array
(
[countryCode] => XX
[regionCode] => 00
)

Upload Video
File

[message] => File uploaded successfully.
)
)

[Parentmediaid] => 0nApksHymX
)
WHERE IS MY VIDEO ?
Sample Code File: vimantra.findmedia.php
…….

$parentid = "0nApksHymX";
$media = $vim->findMedia($parentid);
echo "Vimantra::findMedia(): " . print_r($media) . "n";
…….

Whats
happening to
my video.
DIRECT Access Links
VIMANTRA Converts Your Videos for ABR
Result: vimantra.findmedia.php
[contents] => Array
(
[id] => 0nApksHymX
[idtype] => parent
[media] => Array
(

[parentmediaid] => 0nApksHymX
[displayname] => SINTEL Trailer desktop video upload
……..

Whats
happening to
my video.

(
[mediatype] => TRAILER
[displayname] => SINTEL Trailer desktop video upload
……………………………………..)
[Conversions] => Array
(
[tnoc] => 1
[conversion] => Array
(
[0] => Array
(

[conversiontype] => Adaptive Bit Rate
[convertedmediaid] => abr_0nApksHymX
[conversionstatus] => Ready
[convertedon] => 2013-10-04 14:13:42
[hls] =>
http://hmc.vimantra.com/4/0MlorFc0La/abr/abr_0MlorFc0La.m3u8
[hds] =>
http://smc.vimantra.com/4/0MlorFc0La/abr/abr_0MlorFc0La.f4m
GET EMBED CODE
Sample Code: vimantra.getembedcode.php
….
$mid = "0nApksHymX";
$playerid = "defaultSV";

$embedtype = "traditionalembed";
$vim->getEmbedCode($mid, $playerid,
$embedtype);
$embed_code =

print_r(html_entity_decode($embed_code['contents']['embedCode'])) . "n";
…..

Get Embed Code
- traditionalembed
- autoembed
- iframe
GET EMBED CODE
Result: vimantra.getembedcode.php

Result Embed Code
- traditionalembed

<script id="embedCode" class="embedCode" type="text/javascript"
src="http://prod.vimantra.com/js/player/embedjs.js?traditionalembed=true&playerid=defau
ltSV&mid=0nApksHymX&tr="></script><a id="CT_defaultSV_0nApksHymX_1381304907"
style="cursor:pointer;float:left;width:640;height:360;" class="player play_arrow"
onclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; ,
&#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"
ondblclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; ,
&#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"><img
alt="" class="player play_arrow" id="SPLASH_defaultSV_0nApksHymX_1381304907"
src="http://dmc.vimantra.com/vimantra/4/0nApksHymX/thumb/default_0nApksHymX.png?
1381304907" width="640" height="360"
onclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; ,
&#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"
ondblclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; ,
&#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"></a>
BROADCAST
<html><head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title>VIMANTRA Traditional Embed Code</title>
</head><body>

Embed in HTML

<script id="embedCode" class="embedCode" type="text/javascript"
src="http://prod.vimantra.com/js/player/embedjs.js?traditionalembed=true&playerid=defau
ltSV&mid=0nApksHymX&tr="></script><a id="CT_defaultSV_0nApksHymX_1381304907"
style="cursor:pointer;float:left;width:640;height:360;" class="player play_arrow"
onclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; ,
&#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"
ondblclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; ,
&#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"><img
alt="" class="player play_arrow" id="SPLASH_defaultSV_0nApksHymX_1381304907"
src="http://dmc.vimantra.com/vimantra/4/0nApksHymX/thumb/default_0nApksHymX.png?
1381304907" width="640" height="360"
onclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; ,
&#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"
ondblclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; ,
&#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"></a>

Broadcast from your site
Automatic Device Detection

</body>
</html>
BROADCAST - PC FLASH
Adaptive Bit Rate

Embed in HTML
Broadcast from your site
Automatic Device Detection
- PC FLASH HDS Adaptive
Bit Rate
BROADCAST – iOS .m3u8
Adaptive Bit Rate

Embed in HTML
Broadcast from your site
Automatic Device Detection
- iOS .m3u8 Adaptive Bit
Rate
BROADCAST – Android

Embed in HTML
Broadcast from your site
Automatic Device Detection
- Android
BROADCAST - Ubuntu FLASH
Adaptive Bit Rate

Embed in HTML
Broadcast from your site
Automatic Device Detection
- Ubuntu FLASH HDS
Adaptive Bit Rate

Contenu connexe

Similaire à VIMANTRA PHP SDK Introduction

Virtual Server Security for VMware: Installation Guide
Virtual Server Security for VMware: Installation GuideVirtual Server Security for VMware: Installation Guide
Virtual Server Security for VMware: Installation Guide
webhostingguy
 
Building video applications on Windows 8 with Windows Azure Media Services
Building video applications on Windows 8 with Windows Azure Media ServicesBuilding video applications on Windows 8 with Windows Azure Media Services
Building video applications on Windows 8 with Windows Azure Media Services
Mingfei Yan
 
Client install
Client installClient install
Client install
mrt Londeh
 
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleWebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
Robert Nyman
 

Similaire à VIMANTRA PHP SDK Introduction (20)

Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated way
 
Virtual Server Security for VMware: Installation Guide
Virtual Server Security for VMware: Installation GuideVirtual Server Security for VMware: Installation Guide
Virtual Server Security for VMware: Installation Guide
 
Building video applications on Windows 8 with Windows Azure Media Services
Building video applications on Windows 8 with Windows Azure Media ServicesBuilding video applications on Windows 8 with Windows Azure Media Services
Building video applications on Windows 8 with Windows Azure Media Services
 
Build, migrate and deploy apps for any environment with project Hammr , OW2co...
Build, migrate and deploy apps for any environment with project Hammr , OW2co...Build, migrate and deploy apps for any environment with project Hammr , OW2co...
Build, migrate and deploy apps for any environment with project Hammr , OW2co...
 
PWA Cheat Sheet 2023
PWA Cheat Sheet 2023PWA Cheat Sheet 2023
PWA Cheat Sheet 2023
 
VMworld 2013: The Story Behind Designing and Building a Distributed Automatio...
VMworld 2013: The Story Behind Designing and Building a Distributed Automatio...VMworld 2013: The Story Behind Designing and Building a Distributed Automatio...
VMworld 2013: The Story Behind Designing and Building a Distributed Automatio...
 
VMware vCHS, Puppet, and Project Zombie - PuppetConf 2013
VMware vCHS, Puppet, and Project Zombie - PuppetConf 2013VMware vCHS, Puppet, and Project Zombie - PuppetConf 2013
VMware vCHS, Puppet, and Project Zombie - PuppetConf 2013
 
Client install
Client installClient install
Client install
 
AWS + Puppet = Dynamic Scale
AWS + Puppet = Dynamic ScaleAWS + Puppet = Dynamic Scale
AWS + Puppet = Dynamic Scale
 
Web Standards for AR workshop at ISMAR13
Web Standards for AR workshop at ISMAR13Web Standards for AR workshop at ISMAR13
Web Standards for AR workshop at ISMAR13
 
Download and restrict video files in android app
Download and restrict video files in android appDownload and restrict video files in android app
Download and restrict video files in android app
 
Deploy, Customize, Start, & Monitor a Channel with Live Streaming on AWS (CTD...
Deploy, Customize, Start, & Monitor a Channel with Live Streaming on AWS (CTD...Deploy, Customize, Start, & Monitor a Channel with Live Streaming on AWS (CTD...
Deploy, Customize, Start, & Monitor a Channel with Live Streaming on AWS (CTD...
 
yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)
 
20200331 AWS Black Belt Online Seminar AWS Elemental MediaConvert
20200331 AWS Black Belt Online Seminar AWS Elemental MediaConvert20200331 AWS Black Belt Online Seminar AWS Elemental MediaConvert
20200331 AWS Black Belt Online Seminar AWS Elemental MediaConvert
 
Defcon23 from zero to secure in 1 minute - nir valtman and moshe ferber
Defcon23   from zero to secure in 1 minute - nir valtman and moshe ferberDefcon23   from zero to secure in 1 minute - nir valtman and moshe ferber
Defcon23 from zero to secure in 1 minute - nir valtman and moshe ferber
 
Sun & VMware Desktop Training
Sun & VMware Desktop TrainingSun & VMware Desktop Training
Sun & VMware Desktop Training
 
Insider Dev Tour Taipei 2019 - Future proof your desktop apps with .net core
Insider Dev Tour Taipei 2019 - Future proof your desktop apps with .net coreInsider Dev Tour Taipei 2019 - Future proof your desktop apps with .net core
Insider Dev Tour Taipei 2019 - Future proof your desktop apps with .net core
 
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleWebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at Google
 
AmazonRTOS - Antonio Luciano
AmazonRTOS - Antonio LucianoAmazonRTOS - Antonio Luciano
AmazonRTOS - Antonio Luciano
 
Stups.io - an Open Source Cloud Framework for AWS
Stups.io - an Open Source Cloud Framework for AWSStups.io - an Open Source Cloud Framework for AWS
Stups.io - an Open Source Cloud Framework for AWS
 

Dernier

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Dernier (20)

GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 

VIMANTRA PHP SDK Introduction

  • 1. Cloud Video Platform PHP API Introduction
  • 2. Next 3 Slides may be skipped if you know what’s VIMANTRA 
  • 3. 95% of Asian Video Streaming Suffers from DON’T SUPPORT MOBILE VIDEO, NOT ENOUGH BANDWIDTH, BUGGY VIDEO PLAYERS
  • 4. Problem with WebTV Infrastructure Its Expensive - Global Content Delivery networks have high upfront costs - Video Transcoding to convert the video for multiple end user devices requires expensive software and hardware infrastructure - Costly and lengthy development cycle to build players which work across devices. - High Capital Costs for video storage. Technically Complex - As viewers become mobile across devices, new video encoding formats have to be handled - Integration with ad exchanges to monetize your content requires complex integration - your player has to be aware of the end users device before it requests an ad
  • 5. VIMANTRA Solves This Problem Upload Your Video to Vimantra Vimantra converts for over 100+ devices and stores your video. Integrated with CDN with presence in 140+ cities across the world. Vimantra’s Unique Embed Codes and API have automatic device detection and CDN integration. Play the right format from the server nearest to the viewer.
  • 6. CLOUD ECOSYSTEM Integrated Vimantra is integrated with popular file storage like Google Drive, Dropbox , Amazon S3 and Box.com
  • 7. WHERE CAN I GET THE API www.vimantra.com Login/API -> Vimantra API
  • 8. WHERE CAN I GET THE API – DIRECT Links Documentation Tar File with PHP SDK Tar File with PHP SDK and Test Videos http://fpc.vimantra.com/corp/VIMANTRA+PHP+S DK+-+3+Steps+to+Get+You+Started.pdf http://fpc.vimantra.com/corp/sdkvimantra_php_ 1.0_lite.tar http://fpc.vimantra.com/corp/sdkvimantra _php_1.0.tar
  • 9. SETUP – Untar and Start CONFIG FILE cd sdkvimantra_php_1.0 vi vimantra.config.php <?php VIMANTRA KEY VIMANTRA TOKEN AWS TOKEN AWS SECRET /** * */ // Vimantra access info if (!defined('vimantraAccessKey')) define('vimantraAccessKey',’YOUR-ACCESS-KEY’); if (!defined('vimantraToken')) define('vimantraToken', 'YOUR-API-TOKEN'); if (!defined('AWSKEY')) define('AWSKEY', ‘YOUR-AWS-KEY'); if (!defined('AWSSECRET')) define('AWSSECRET', 'YOUR-AWS-SECRET'); ?> AWS KEY & AWS SECRET are required only if you are uploading videos from AmazonS3
  • 10. VIMANTRA KEY & TOKEN You can get your VIMANTRA Key & Token from VIMANTRA Content Management Console. Its under Settings->My User Profile.
  • 11. API USE CASE Upload Video to Vimantra Generate Embed Code Paste Embed Code on your website. It works across devices globally.
  • 12. VIMANTRA - Instance All sample code is under subdirectory samples Instantiate vimantra ….. if (!class_exists('vimantra')) require_once '../vimantra.php'; require_once '../vimantra.config.php'; // Instantiate the class $vim = new vimantra(vimantraAccessKey, vimantraToken); ……
  • 13. UPLOAD - From Desktop Sample Code File: vimantra.fileupload.php …… $data = array("displayname" => "SINTEL Trailer desktop video upload", "file_contents" => '@./sintel480p.mp4', "actiontype" => "File-Upload"); $vim->fileUpload($data); $media_upload = echo "Vimantra::fileUpload(): " . print_r($media_upload) . "n"; …. Upload Video File from PC
  • 14. UPLOAD - From AmazonS3 If your S3 file has granted read-only access for everyone then you don’t have to use the AWS KEY & SECRET Sample Code File: vimantra.uploads3public.php …… $data = array( Upload Video File from AmazonS3 - Public Access "amazon_bucket" => "mybucket", "amazon_directory_name" => "video/video2.mp4", "displayname" => "Public post_" . time(), "actiontype" => "Upload-S3" ); $vim->UploadS3($data); $media_upload = echo "nVimantra::UploadS3(): " . print_r($media_upload) . "n"; ….
  • 15. UPLOAD - From AmazonS3 Sample Code File: vimantra.uploads3private.php ….. ("bucket_permission" => 'private', "amazon_aws_key" => AWSKEY, "amazon_aws_secretkey" => AWSSECRET, "amazon_bucket" => "myprivatebucket", "amazon_directory_name" => "video/video.mp4", $data = array Upload Video File from AmazonS3 - Private Access "displayname" => "S3 Private Upload post_" . time(), "actiontype" => "Upload-S3"); $media_upload = ….. $vim->UploadS3($data);
  • 16. UNIQUE ID Typical Result : You get a unique ID for your video ( [responsetype] => media/postAction/File-Upload [status] => OK [session] => Array ( [0] => Array ( [account] => mycompany [ipAddress] => XXX.XXX.XXX.XXX [location] => Array ( [countryCode] => XX [regionCode] => 00 ) Upload Video File [message] => File uploaded successfully. ) ) [Parentmediaid] => 0nApksHymX )
  • 17. WHERE IS MY VIDEO ? Sample Code File: vimantra.findmedia.php ……. $parentid = "0nApksHymX"; $media = $vim->findMedia($parentid); echo "Vimantra::findMedia(): " . print_r($media) . "n"; ……. Whats happening to my video.
  • 18. DIRECT Access Links VIMANTRA Converts Your Videos for ABR Result: vimantra.findmedia.php [contents] => Array ( [id] => 0nApksHymX [idtype] => parent [media] => Array ( [parentmediaid] => 0nApksHymX [displayname] => SINTEL Trailer desktop video upload …….. Whats happening to my video. ( [mediatype] => TRAILER [displayname] => SINTEL Trailer desktop video upload ……………………………………..) [Conversions] => Array ( [tnoc] => 1 [conversion] => Array ( [0] => Array ( [conversiontype] => Adaptive Bit Rate [convertedmediaid] => abr_0nApksHymX [conversionstatus] => Ready [convertedon] => 2013-10-04 14:13:42 [hls] => http://hmc.vimantra.com/4/0MlorFc0La/abr/abr_0MlorFc0La.m3u8 [hds] => http://smc.vimantra.com/4/0MlorFc0La/abr/abr_0MlorFc0La.f4m
  • 19. GET EMBED CODE Sample Code: vimantra.getembedcode.php …. $mid = "0nApksHymX"; $playerid = "defaultSV"; $embedtype = "traditionalembed"; $vim->getEmbedCode($mid, $playerid, $embedtype); $embed_code = print_r(html_entity_decode($embed_code['contents']['embedCode'])) . "n"; ….. Get Embed Code - traditionalembed - autoembed - iframe
  • 20. GET EMBED CODE Result: vimantra.getembedcode.php Result Embed Code - traditionalembed <script id="embedCode" class="embedCode" type="text/javascript" src="http://prod.vimantra.com/js/player/embedjs.js?traditionalembed=true&playerid=defau ltSV&mid=0nApksHymX&tr="></script><a id="CT_defaultSV_0nApksHymX_1381304907" style="cursor:pointer;float:left;width:640;height:360;" class="player play_arrow" onclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; , &#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)" ondblclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; , &#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"><img alt="" class="player play_arrow" id="SPLASH_defaultSV_0nApksHymX_1381304907" src="http://dmc.vimantra.com/vimantra/4/0nApksHymX/thumb/default_0nApksHymX.png? 1381304907" width="640" height="360" onclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; , &#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)" ondblclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; , &#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"></a>
  • 21. BROADCAST <html><head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>VIMANTRA Traditional Embed Code</title> </head><body> Embed in HTML <script id="embedCode" class="embedCode" type="text/javascript" src="http://prod.vimantra.com/js/player/embedjs.js?traditionalembed=true&playerid=defau ltSV&mid=0nApksHymX&tr="></script><a id="CT_defaultSV_0nApksHymX_1381304907" style="cursor:pointer;float:left;width:640;height:360;" class="player play_arrow" onclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; , &#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)" ondblclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; , &#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"><img alt="" class="player play_arrow" id="SPLASH_defaultSV_0nApksHymX_1381304907" src="http://dmc.vimantra.com/vimantra/4/0nApksHymX/thumb/default_0nApksHymX.png? 1381304907" width="640" height="360" onclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; , &#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)" ondblclick="$vm(&#039;CT_defaultSV_0nApksHymX_1381304907&#039; , &#039;SPLASH_defaultSV_0nApksHymX_1381304907&#039;, &#039;media&#039;)"></a> Broadcast from your site Automatic Device Detection </body> </html>
  • 22. BROADCAST - PC FLASH Adaptive Bit Rate Embed in HTML Broadcast from your site Automatic Device Detection - PC FLASH HDS Adaptive Bit Rate
  • 23. BROADCAST – iOS .m3u8 Adaptive Bit Rate Embed in HTML Broadcast from your site Automatic Device Detection - iOS .m3u8 Adaptive Bit Rate
  • 24. BROADCAST – Android Embed in HTML Broadcast from your site Automatic Device Detection - Android
  • 25. BROADCAST - Ubuntu FLASH Adaptive Bit Rate Embed in HTML Broadcast from your site Automatic Device Detection - Ubuntu FLASH HDS Adaptive Bit Rate