Presentation is loading. Please wait.

Presentation is loading. Please wait.

Video API and Coding Graduate Seminar Dr. Jinan Fiaidhi

Similar presentations


Presentation on theme: "Video API and Coding Graduate Seminar Dr. Jinan Fiaidhi"— Presentation transcript:

1 Video API and Coding Graduate Seminar Dr. Jinan Fiaidhi
Name: Akshitkumar Patel Student ID:

2 outline You Tube Front-End API Back-End API
API for YouTube Player Back-End API Upload Video Search Video Create Playlist Live Streaming Caption You-Tube Android Player API Conclusion References

3 Preview What is API? What is coding?
Make simple video application using HTML 5.

4 YouTube APIS It has two types of APIS Front-end Back-end
(Player) (YouTube Data feed)

5 Front-end (Player) APIs
With an embedded YouTube player, you can integrate the YouTube video playback experience directly in your web page or application. You can use player parameters to customize the player's appearance, and you can also use Player APIs to control the player directly from your web page or app. The player parameters document explains how to embed a YouTube player in your app and customize the playback experience by adding parameters to the player URL. Without writing any code, you can embed a player that plays either a video, search results for a specified query term, or any playlist, such as a list of videos uploaded to a your channel. [1]

6 apis for YouTube player

7 Back-end (YouTube data) apis
The YouTube Data API (v3) lets you perform many operations available on the YouTube website and enables your app to have a deep integration with YouTube. Using this API, you can search for content, upload videos, create playlists, manage subscriptions, and much more. The YouTube Live Streaming API lets you create, update, and manage live events on YouTube. Using the API, you can schedule events (broadcasts) and associate them with video streams, which represent the actual broadcast content. [1]

8 api For upload video The following code samples, which use the Google APIs Client Library for .NET, are available for the YouTube Data API videos.insert method to upload a video to the channel associated with the request.

9 api for search video Search.List method to retrieve search results associated with a particular keyword.

10 Playlist A playlist is a collection of videos that can be viewed sequentially and shared with other users. A playlist can contain up to 200 videos, and YouTube does not limit the number of playlists that each user creates. A user can view and edit his list of playlists on his account page. Playlists can be public or private. A playlist will be publicly visible to other users unless it has been explicitly been designated as a private playlist. To create a playlist, you must provide a title and description for the playlist.

11 API for create playlist
Playlist.Insert method use to create a private playlist owned by the channel authorizing the request.

12 Adding a video to a playlist
To add a video to a playlist, send an API request that identifies the unique ID that YouTube assigned to the playlist as well as the unique ID that YouTube assigned to the video. By default, the newly added video will be added to the end of a playlist.  To insert a video into a different spot in the playlist, include the <yt:position> tag in your request and set its value to the position where the video should appear in the playlist. [1]

13 Live Streaming A stream identifies the audio-video content that is being communicated to YouTube. Each broadcast is associated with one video stream. Having created your livestream resources, you now need to associate the two using liveBrodcasts.bind method. This liveBroadcasts.bind method, set the id parameter to the broadcast ID obtained and the streamId parameter to the stream ID obtained.

14 Live Streaming API The code samples below are for an application that calls the API's Livestrem.List method to retrieve a list of video stream settings that a channel can use to broadcast live events on YouTube.

15 YouTube API – Captions Adding captions to your video files can help users to locate and understand your videos. You can add captions to a video via the API by creating a caption track and uploading it. YouTube supports a variety of caption file formats, including plain text transcripts. The caption file must be 1MB or smaller. YouTube supports many different formats for caption files, including RealText (.rt), SAMI (.smi) and Media RSS. YouTube also supports a simple format that is compatible with both the SubRip (.SRT) and SubViewer (.SUB) formats. In this simple format, each caption is divided into three segments that appear in the following order: HH:MM:SS.FS Where, HH – Hours (00, 01, etc.) MM – Minutes (00-59) SS – Seconds (00-59) FS – Fractional seconds ( ) [1]

16 Example of caption format
1 00:01:23,000,0:01: Do: I am gonna give you guys A little kind of peek 0:02:20.250,0:02:23.8 Behind the scenes of what it is Taken to scale YouTube. 0:03: I cannot really go Into a whole lot of detail. [1]

17 Simple HTML code for caption
<video width="640" height="480" controls>   <source src="video.mp4" type="video/mp4" />   <source src="video.webm" type="video/webm" />   <track src="subtitles.srt" kind="subtitles"srclang="en" label="English" /> </video> [1]

18 YouTube Android Player API
The YouTube Android Player API enables you to incorporate video playback functionality into your Android applications. The API defines methods for loading and playing YouTube videos (and playlists) and for customizing and controlling the video playback experience. Using the API, you can load or cue videos into a player view embedded in your application's UI. You can then control playback programmatically. For example, you can play, pause, or seek to a specific point in the currently loaded video.

19 Create YouTube app First, we need to enable to “YouTube data API V3”.
Then you will find API key. This API key will be used to access YouTube Android Player APIs. And last we need INTERNET permission to play video over internet. Add below permission in your application in .xml file. <uses-permission android:name=“android.permission.INTERNET” />

20 Define Layout Now, we will create an simple layout that uses YouTubePlayerView inside an LinearLayout.

21 Initialize YouTube Player
Initializing YouTube player view by calling initialize methood. Once the initialize is successful, you will get the onInitializationSuccess() callback with YouTubePlayer instance. You can add additional listeners to handle the playback control events.

22 Conclusion In conclusion, You can use these APIs to build your own video application. For example, Blackberry use their own APIs (BBM Platform APIs) to create video or any other applications.

23 References

24 Thank You


Download ppt "Video API and Coding Graduate Seminar Dr. Jinan Fiaidhi"

Similar presentations


Ads by Google