Archive for the ‘Platforms’ Category.

Integrating Dotsub in to your video CMS

It’s a question we get here at Dotsub all the time. How do I integrate the captioning process into my custom CMS system? In this blog post I’ll show you how simple it is to add subtitles to your CMS workflow with a few calls to the Dotsub API.

I’ll be using cURL to call the Dotsub API and Python to listen for callbacks. This guide will use features from our ‘Extended API‘ which is only available to Enterprise accounts. If you need access to this API please contact us.

We will implement a workflow which will do the following:

  • Upload videos to Dotsub.
  • Orders captions and translations.
  • Listens for Pings from Dotsub server to download completed subtitle files.

The first step is to upload the video to Dotsub. Our team is good, but not good enough to caption your video without the file! Our ‘Media API‘ lets you upload a video file or provide us with a URL directly to a video file.

curl -u "username:password" -L -F file=@/Users/brooks/Movies/foo.mov -F title='My Video' -F description='Example' -F language='eng' -F license='a2be14e1-37d9-11dd-ae16-0800200c9a66' -F project=projectId https://dotsub.com/api/media

Note: You’ll have to replace username, password and projectId with the values for your Dotsub account.
Dotsub will reply with the UUID for your new video.

{"status":{"message":"Media created","error":false,"uuid":"f67c4500-9616-4ee6-962b-122c2aeb1e78","code":200}}

There you have it, your first video uploaded to Dotsub ready to be captioned.

Now we have to tell Dotsub what to do with this video. In this case we want captions and translations in a few languages. Let’s get it translated into French (Canada), Italian and Spanish. We do this by calling the order API:

curl -u "username:password" --form items="transcription,f67c4500-9616-4ee6-962b-122c2aeb1e78" 
--form items="translation,f67c4500-9616-4ee6-962b-122c2aeb1e78,fre_ca" --form items="translation,f67c4500-9616-4ee6-962b-122c2aeb1e78,ita" --form items="translation,f67c4500-9616-4ee6-962b-122c2aeb1e78,spa" https://dotsub.com/api/order

Note: You’ll have replace f67c4500-9616-4ee6-962b-122c2aeb1e78 with a UUID of your uploaded Dotsub video.
Dotsub will reply with all the details of your order:

{
    "order": {
        "completionDate": 1424375078795,
        "createdBy": "admin",
        "dateCreated": 1424375078760,
        "discount": 0,
        "id": "e94503e7-c253-4ed6-a8f3-1dda65833363",
        "invoiceNumber": "",
        "invoiced": false,
        "notes": "",
        "orderItems": [
            {
                "actor": "",
                "completionDate": 1424375078781,
                "dateCreated": 1424375078781,
                "deliveryDate": 0,
                "id": "e4b97aed-1918-44d8-b3b9-5743b350b903",
                "itemType": "TranscriptionOrderItem",
                "language": "eng",
                "languageName": "English",
                "mediaExternalIdentifier": "",
                "mediaId": "f67c4500-9616-4ee6-962b-122c2aeb1e78",
                "mediaLanguage": "eng",
                "mediaLanguageName": "English",
                "mediaTitle": "My Video",
                "orderId": "e94503e7-c253-4ed6-a8f3-1dda65833363",
                "orderNumber": "249",
                "orderProjectId": "",
                "orderProjectName": "",
                "orderStatus": "PENDING",
                "orderUsername": "admin",
                "percentageComplete": 0,
                "period": null,
                "price": 0,
                "readyToAssign": true,
                "subtitleSpecification": null,
                "userName": "",
                "vendorAssignedDate": 0,
                "vendorId": "",
                "vendorName": "",
                "videoMinutes": 0
            },
            {
                "actor": "",
                "completionDate": 1424375078783,
                "dateCreated": 1424375078783,
                "deliveryDate": 0,
                "id": "529c8a1b-0e50-491b-a3ac-6813441405f6",
                "itemType": "TranslationOrderItem",
                "language": "spa",
                "languageName": "Spanish",
                "mediaExternalIdentifier": "",
                "mediaId": "f67c4500-9616-4ee6-962b-122c2aeb1e78",
                "mediaLanguage": "eng",
                "mediaLanguageName": "English",
                "mediaTitle": "My Video",
                "orderId": "e94503e7-c253-4ed6-a8f3-1dda65833363",
                "orderNumber": "249",
                "orderProjectId": "",
                "orderProjectName": "",
                "orderStatus": "PENDING",
                "orderUsername": "admin",
                "percentageComplete": 0,
                "period": null,
                "price": 0,
                "readyToAssign": true,
                "subtitleSpecification": null,
                "userName": "",
                "vendorAssignedDate": 0,
                "vendorId": "",
                "vendorName": "",
                "videoMinutes": 0
            },
            {
                "actor": "",
                "completionDate": 1424375078782,
                "dateCreated": 1424375078782,
                "deliveryDate": 0,
                "id": "8d065be9-e72f-47b5-8cca-720eb6ea9078",
                "itemType": "TranslationOrderItem",
                "language": "ita",
                "languageName": "Italian",
                "mediaExternalIdentifier": "",
                "mediaId": "f67c4500-9616-4ee6-962b-122c2aeb1e78",
                "mediaLanguage": "eng",
                "mediaLanguageName": "English",
                "mediaTitle": "My Video",
                "orderId": "e94503e7-c253-4ed6-a8f3-1dda65833363",
                "orderNumber": "249",
                "orderProjectId": "",
                "orderProjectName": "",
                "orderStatus": "PENDING",
                "orderUsername": "admin",
                "percentageComplete": 0,
                "period": null,
                "price": 0,
                "readyToAssign": true,
                "subtitleSpecification": null,
                "userName": "",
                "vendorAssignedDate": 0,
                "vendorId": "",
                "vendorName": "",
                "videoMinutes": 0
            },
            {
                "actor": "",
                "completionDate": 1424375078782,
                "dateCreated": 1424375078782,
                "deliveryDate": 0,
                "id": "6a2c0dfa-d814-45ca-9d72-ac1deaea827d",
                "itemType": "TranslationOrderItem",
                "language": "fre_ca",
                "languageName": "French (Canada)",
                "mediaExternalIdentifier": "",
                "mediaId": "f67c4500-9616-4ee6-962b-122c2aeb1e78",
                "mediaLanguage": "eng",
                "mediaLanguageName": "English",
                "mediaTitle": "My Video",
                "orderId": "e94503e7-c253-4ed6-a8f3-1dda65833363",
                "orderNumber": "249",
                "orderProjectId": "",
                "orderProjectName": "",
                "orderStatus": "PENDING",
                "orderUsername": "admin",
                "percentageComplete": 0,
                "period": null,
                "price": 0,
                "readyToAssign": true,
                "subtitleSpecification": null,
                "userName": "",
                "vendorAssignedDate": 0,
                "vendorId": "",
                "vendorName": "",
                "videoMinutes": 0
            }
        ],
        "orderNumber": 249,
        "orderSource": "ADMIN",
        "orderStatus": "PENDING",
        "price": 0,
        "projectId": "",
        "projectName": "",
        "totalItems": 4,
        "videoMinutes": 0
    }
}

Now we will build a Python script that listens for pings from the Dotsub API. The address Dotsub sends pings to is configured under ‘Project Settings’ in your project.

We will listen for ‘order pings‘ where their status is ‘ITEM_COMPLETED’. When we see that an item is completed we will download it using the ‘Order Download‘ API.

from BaseHTTPServer import BaseHTTPRequestHandler
from SocketServer import ThreadingMixIn
from BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler
import base64
import urllib2
import cgi
#An example script that listens for HTTP order pings from the Dotsub API.

username = "username"
password = "password"

auth_header = base64.b64encode(("%s:%s" % (username, password)))

download_url = "https://dotsub.com/api/order/%s/items/%s/download"

class PostHandler(BaseHTTPRequestHandler):
    def do_POST(self):
        # Parse the form data posted
        form = cgi.FieldStorage(
            fp=self.rfile,
            headers=self.headers,
            environ={'REQUEST_METHOD': 'POST',
                     'CONTENT_TYPE': self.headers['Content-Type'],
                     })
        #There are the 4 fields the Dotsub Order Ping API posts in a callback.
        orderId = form['orderId'].value
        itemId = form['itemId'].value
        language = form['language'].value
        state = form['state'].value
        #only download an item when the item has been completed
        if state == 'ITEM_COMPLETE':
            file_url = download_url % (orderId, itemId)
            sub_req = urllib2.Request(file_url)
            sub_req.add_header('Authorization', 'Basic %s' % auth_header)
            u = urllib2.urlopen(sub_req)
            filename =  "%s_%s.srt" % (itemId, language)
            localFile = open( filename, 'w')
            localFile.write(u.read())
            localFile.close()
        self.send_response(200)

class ThreadedHTTPServer(ThreadingMixIn, HTTPServer):
    """Handle requests in a separate thread."""

if __name__ == '__main__':
    server = ThreadedHTTPServer(('', 9088), PostHandler)
    print 'Starting server, use  to stop'
    server.serve_forever()

And there you have it. In under 100 lines of code, we are submitting video files to Dotsub, ordering captions and translations, and handling the download of completed caption files.сайтповедение клиентоввзлом пользователей вконтакте

Updated YouTube Synchronization and Upload

We have recently made some updates to how Dotsub integrates with YouTube. We are now using OAuth 2.0 and the latest version on YouTube APIs.

You will now be asked what channel in your YouTube account you’d like to give Dotsub access to. This will simplify the connection process for anyone using channels.

Screen Shot 2015-02-13 at 12.50.36 PM

 

After selecting the channel you will see a confirmation screen:

Screen Shot 2015-02-13 at 12.52.43 PM

 

The same push and match options are available to all users. Our enterprise clients can also set up automated subtitle updates to YouTube.

Because of this update, you will be asked again to give permission on your YouTube account next time you use the feature. You can see if you have made this update on your ‘My Account‘ page. Users who need to re-authenticate with YouTube will see this warning message:

Screen Shot 2015-02-13 at 12.48.05 PMsiteсоздание веб контентаскачать vkbot бесплатно и без регистрации

Vimeo Integration

Dotsub is happy to announce we have added support for Vimeo. You can now upload your Dotsub videos or captions into Vimeo.

Setting up a vimeo integration is very simple. You have to enable access from ‘My Account’ on our site menu:
Screen Shot 2015-01-14 at 8.42.05 AM

 

In your ‘My Account’ settings you will see ‘Publishing Settings’. Here you can enable/disable access to your Vimeo account.

Screen Shot 2015-01-14 at 8.42.17 AM

 

Clicking ‘Enable Access’ will prompt you to validate Dotsub access to your Vimeo account:

Screen Shot 2015-01-14 at 8.42.30 AM

Please Note: Please do not uncheck ‘upload videos on my behalf’. Upload permissions is what allows Dotsub to send captions to your account. 

Now you can access the Vimeo feature from any of your videos. In the sidebar to the right of the video player, you will see the ‘Publish Video’ area. Hitting ‘Publish Video to my Vimeo Account’ will begin the sync process.

 

Screen Shot 2015-01-14 at 8.46.09 AM

You are now presented with two options. Select whichever is appropriate for you.

Screen Shot 2015-01-14 at 8.46.17 AM

After matching or pushing a video to Vimeo you will be shown the link to the video.

Screen Shot 2015-01-14 at 8.46.59 AM

You should now see captions on your Vimeo video!

 

Screen Shot 2015-01-14 at 8.47.30 AM

 

If you have any questions please let us know at [email protected].free-anonymizer.ruаренда номеровнакрутка вконтакте онлайн

Autoplaying Brightcove Captions and Subtitles

We recently had a customer ask us how to have captions autoplay in their Brightcove player without any changes to their pages.  It turns out this is not currently possible. Since this is such an important and simple use-case, we decided to not only solve it for our client, but also to release the code on github for anyone to use.

If you are familiar with Brightcove you’ll know that there are two parts to any plugin. Flash and Javascript versions of a plugin need to be created.

First lets look at the Flash component. Brightcove provides the ‘CustomModule’ interface as a starting point for your plugin. All we have to do is override initialize() and set captions enabled to ‘true’.

package {

import com.brightcove.api.APIModules;
import com.brightcove.api.CustomModule;
import com.brightcove.api.modules.CaptionsModule;

/**
 * A Brightcove plugin that auto loads captions.
 */
public class CaptionConfigurationModule extends CustomModule {

    override protected function initialize():void {
        var captionModule:CaptionsModule = player.getModule(APIModules.CAPTIONS) as CaptionsModule;
        captionModule.setCaptionsEnabled(true);
    }
}
}

The Javascript plugin is just as simple. Once the player is ready we set captions enabled to ‘true’.

(function() {
    function onPlayerReady() {
        var captionsModule = player.getModule(brightcove.api.modules.APIModules.CAPTIONS);
        captionsModule.setCaptionsEnabled(true);
    }

    var experience = player.getModule(brightcove.api.modules.APIModules.EXPERIENCE);
    if (experience.getReady()) {
        onPlayerReady();
    } else {
        experience.addEventListener(brightcove.player.events.ExperienceEvent.TEMPLATE_READY, onPlayerReady);
    }
}());

There you have it; two simple plugins to enable caption autoplay on your Brightcove player. You can also see these plugins in our GitHub account: https://github.com/dotsub/api-samples/tree/master/brightcove-autoplay-captionsраскрутка сайта в киевевзлом пароля в одноклассниках по логину

Captioning Your Videojs Videos

For a little change of pace, I thought it might be fun to do a write up on adding captions to an open source video player. Using Dotsub’s API, adding captions to most players is dead simple.

I decided to use videojs’s HTML5 player for this demo. Video.js is a great player and comes with built in subtitle support. This support is provided by HTML5’s track element. Dotsub’s API allows you to directly access various subtitle formats. Video.js uses WebVTT files which we can fetch from the Dotsub API using this URL pattern:

https://dotsub.com/media/<video_id>/c/<language_code>/vtt

This will fetch the WebVTT file for your video directly from our servers. We, by default, enable CORS on all WebVTT file requests, so you do not have to worry about same-origin policy issues.

Adding captions to a video player then only requires a track tag for every language you want to add. A simple player like:

<video id="dotsub_example" class="video-js vjs-default-skin" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls preload="auto" data-setup='[]'>
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"' />
</video>

Becomes caption enabled by simply adding:

<video id="dotsub_example" class="video-js vjs-default-skin" width="640" height="264" poster="http://video-js.zencoder.com/oceans-clip.png" controls preload="auto" data-setup='[]'>
<source src="http://video-js.zencoder.com/oceans-clip.mp4" type='video/mp4' />
<source src="http://video-js.zencoder.com/oceans-clip.webm" type='video/webm; codecs="vp8, vorbis"' />
<source src="http://video-js.zencoder.com/oceans-clip.ogg" type='video/ogg; codecs="theora, vorbis"' />
<track kind='captions' src='https://dotsub.com/media/5d5f008c-b5d5-466f-bb83-2b3cfa997992/c/eng/vtt' srclang='en' label='English' default />
<track kind='captions' src='https://dotsub.com/media/5d5f008c-b5d5-466f-bb83-2b3cfa997992/c/spa/vtt' srclang='es' label='Spanish' />
<track kind='captions' src='https://dotsub.com/media/5d5f008c-b5d5-466f-bb83-2b3cfa997992/c/fre_ca/vtt' srclang='fr' label='French' />
</video>

Now you have a beautiful video.js player that supports captions:

 управление контекстной рекламойчитать чужую переписку в вк

New Feature: Upload Directly from Your Dropbox.com Account

Dotsub has added the ability to upload videos directly from your Dropbox.com account into your Dotsub account. This new addition makes adding files from Dropbox fast and simple.

On our upload page you will now see a ‘From Dropbox.com’ tab.

Screen Shot 2014-11-06 at 2.03.45 PM

Just hit ‘Choose from Dropbox’ and select the file from your account:

Screen Shot 2014-11-06 at 2.04.43 PM

Hit upload and *poof* your video is on Dotsub ready to be captioned and translated.план раскрутки сайтаклавиатурный шпион для андроид

Scenarist Closed Caption (SCC) file export

NTSCDotsub now supports export into Scenarist Closed Caption (SCC) subtitle files. This is an older NTSC based subtitle format used with broadcast TV.

Our SCC support is limited to the EIA-608 character set, which limits the number of languages we can display. We currently support English, Spanish, Spanish (Latin America), French, French (Canada), Portuguese, Portuguese (Brazil), German, Danish and Italian. We will be happy to expand this as needed for languages that can be rendered with the EIA-608 character set.

Most SCC encoders have limits on the subtitle display area which is a 16 x 32 grid (16 rows and 32 columns). We support files that comply with these rules as well as files that have lines that are too long. Why would we support line lengths that are too long you ask? It turns out one major video provider actually supports this. If you are planning to use SCC as an export format we recommend that you subtitle lines to 32 characters in length.

Our export interface:

Frame Rate: We support the two frame rates outlined in the specification: 29.97 FPS non-drop frame and 29.97 drop frame. To see the difference between the two, you can learn that here: https://www.youtube.com/watch?v=ykjyNeuQROU

Control Code Format: Since SCC was intended as a streamed format without transmission control, control codes if repeated are ignored; some systems require control codes to always be doubled. This option enables or disables the doubling of control codes.

Caption Mode: We support two SCC caption modes. Pop on which is the default. This is what you normally see when watching pre-taped content. Captions are shown on the screen and removed. Roll Up which are the type of captions you see when watching ‘live’ programs. Each time a line of captioning is added all the previous lines ‘roll up’ to make room for the new line at the bottom.

SCC Channel: This defines what SCC channel the data is being written for. Valid settings are 1-4.

Subtitle Options:

First time code: This can be 00:00:00:00 or 01:00:00:00 this is for systems that start at the hour mark.

Subtitle Justification: The normal left, right or centered alignment for subtitles.

Max characters per line: Used for file validation, this can be 32 – 28 characters on a line.

Max lines per caption: Used for file validation, this can be 1-4 lines in a caption.

Advanced Options:

Text Wrapping: There are two options here.  The first is As Entered. This will take the subtitles as entered by the captioner. It uses their manually entered line breaks to create the SCC file. Dotsub added a second option called Override. This option was created to make it possible to wrap files where the line breaks are NOT at 32 characters, it works by attempting to re-wrap the captions. It is not 100% effective, but will help in a lot of cases.

Our export interface will walk you through the process and help you ensure your file meets the listed specifications.

If you have any questions please let us know at [email protected].заказать веб сайтузнать тиц яндекснакрутка вконтакте бесплатно

YouTube Creator Academy Goes Global Using Dotsub

YouTube set up the Creator Academy to help video developers strengthen their channels on the YouTube platform.  Its goals are to help the creator to build a subscriber base, publish engaging content, and to make the channel a destination that is branded and keeps them coming back.  All video courses provided free.  The drawback?  In English only.

But no longer, as of October 14, 2014, YouTube Creator Academy is now in more than 20 languages via Dotsub.
subsYT

 

 

 

 

 

 

 

 

To access the various subtitles, play an Academy lesson, click the Settings button in the lower right corner, click on the Subtitles menu, scroll and choose the language you want.  Try it on the video below:

Of course if Dotsub translations work for Youtube’s videos, they will work for Creators like you. Please contact us at [email protected] for more information.vzlom2014копирайтеровкак взломать почту gmail зная логин

Startup Class Videos Freely Available From Y Combinator and Stanford University

Screenshot 2014-09-23 21.19.12

For the first time in its history famed Silicon Valley accelerator Y Combinator, in collaboration with Stanford University, is making its lecture series teaching how to build a startup freely available to anybody, launching the open Startup Class. The lessons taught by proven startup founders, each of whom created companies that grew to valuations in excess of $1 billion, are posted on YouTube every Tuesday and Thursday. Within a few days from the announcement over 50.000 people signed up to follow them, from all over the world.

Screenshot 2014-09-23 21.24.36

 

Dotsub is contributing captions to make the videos easily accessible, and we also created a team page where volunteers following the course who speak other languages can sign up to translate the videos into Russian, Korean, Italian… any language!

The first video is available already on YouTube, and we are at this very moment preparing its English time-coded captions. There is also a Facebook group and a mailing list to keep everybody up to date on the program.

We are very excited to help this project which opens the best advice on how to build a successful startup to anybody in the world, and which, with the help of Dotsub and the students everywhere will be available in many languages shortly.управление имиджемреклама с гуглкак узнать пароль от почты outlook

New Feature: iOS Subtitles for Brightcove users

Another exciting addition to our platform for all our Brightcove enterprise users.  We now can provide subtitles for iPhone/iPad via a new plug-in. Documentation for this can be found here.

For more details please contact your account manager.заказать раскруткуанонимайзер для одноклассников бесплатно зеркало