SlideShare uma empresa Scribd logo
1 de 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

Mais conteúdo relacionado

Semelhante a VIMANTRA PHP SDK Introduction

Word press, the automated way
Word press, the automated wayWord press, the automated way
Word press, the automated wayMichaël Perrin
 
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 Guidewebhostingguy
 
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 ServicesMingfei Yan
 
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...OW2
 
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...VMworld
 
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 2013Puppet
 
Client install
Client installClient install
Client installmrt Londeh
 
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 ISMAR13Rob Manson
 
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 appKaty Slemon
 
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...Amazon Web Services
 
yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)yapi.js introduction (mopcon 2016 version)
yapi.js introduction (mopcon 2016 version)Jesse (Chien Chen) Chen
 
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 MediaConvertAmazon Web Services Japan
 
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 ferberMoshe Ferber
 
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 coreAlan Tsai
 
WebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleWebRTC & Firefox OS - presentation at Google
WebRTC & Firefox OS - presentation at GoogleRobert Nyman
 
AmazonRTOS - Antonio Luciano
AmazonRTOS - Antonio LucianoAmazonRTOS - Antonio Luciano
AmazonRTOS - Antonio LucianoAntonio 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 AWSJan Löffler
 

Semelhante a 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
 

Último

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 productivityPrincipled Technologies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
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 2024The Digital Insurer
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
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 CVKhem
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
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...apidays
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
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 RobisonAnna Loughnan Colquhoun
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 

Último (20)

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
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
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
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
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...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
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
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 

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