Automating video production
Narakeet makes it easy to script video production, and integrate it with a continuous delivery pipeline. For example, you can set up a CI step to deploy your application and take screen-shots of key pages, then use Narakeet to include the latest look and feel of your application into explainer videos automatically.
This page explains the current options for automating video production using Narakeet.
We plan to significantly improve automation features in the future, so if none of the options below are good for your workflow, please get in touch by sending an email to contact@narakeet.com.
- Getting an API key
- GitHub actions
- Command-line API client
- Invoking the API manually
- Pricing
- Scope and API limitations
Getting an API key
To use any of the options below, you will need an API key. To request a key, send an email to contact@narakeet.com.
GitHub actions
For users that want to keep video scripts and assets on GitHub, we support directly building videos using GitHub actions. Create a workflow for your repository, and use the narakeet/build-video-github-action
step with the following three parameters:
source-path
: the path to the main video script file in your repositoryapi-key
: your API key. We strongly suggest storing it as an encrypted secretgithub-token
: set to$
The action has two outputs:
video-file
: the resulting video file, ready for uploading to GitHub action artifacts or further processing.video-url
: Temporary secure (signed) video URL - valid for 10 minutes - which can be used to download the video.
For example, the following workflow will generate a video and upload it to the workflow artifacts.
name: Make videos
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: narakeet/build-video-github-action@v1.0.2
id: video
with:
source-path: hello-world/script/script.md
github-token: $
api-key: $
- uses: actions/upload-artifact@v1
with:
name: video
path: "$"
Check out the Narakeet GitHub action for more information.
Command-line API client
For users hosting their code somewhere else, we provide a command line API client (runs with Node.js). You can use this command-line tool to request a video build from an online ZIP file.
To install the client using NPM, run the following command
npm i -g @narakeet/api-client
Next, create a ZIP archive with your project files and upload somewhere securely, for example upload to AWS S3, then create a pre-signed URL for the uploaded archive. Execute the following command to create the video:
narakeet-api-client --api-key $API_KEY --repository $URL --source source.md --output video.mp4
The command line client will download the resulting file and save it locally to your disk, and you can then upload it or publish somewhere else.
See the Narakeet API client page for more information about the arguments.
Invoking the API manually
For full control over the process, or if you do not want to install the command-line utility, you can request a video build directly by invoking the API.
- create a
POST
request tohttps://api.narakeet.com/video/build
- set the content type to
application/json
- provide your API key in the
x-api-key
header - post a JSON body containing the following properties:
repositoryType
: usezip-url
to build from an URL containing a ZIP filerepository
: URL to a ZIP archive containing your project filessource
: path to the main video script inside your ZIP file
The response will be a JSON structure containing the field statusUrl
. This is the URL where you can periodically poll for results. We recommend polling every 5-10 seconds.
The polling URL will contain a JSON file, with following properties:
finished
: boolean value (true
/false
) signalling if the video build completed. The valuetrue
means you should stop polling.percent
: numerical value between 0 and 100, signalling the progress of the video build.succeeded
: once the task is finished, a boolean value (true
/false
) signalling if the video was built, or if there was an error. The valuetrue
means that you can download the result video.result
: if the task succeeded, a string value with a secure URL, valid for 10 minutes, where you can download the video.message
: if the task failed, a string value detailing the error
Pricing
There is no additional price for using the API, it is included in our regular subscription offer for all commercial users with a personal top-up or pay-as-you-go metered subscriptions.
Flat-fee unmetered accounts or free users are not eligible for API keys.
Scope and API limitations
The API only allows making videos from Markdown scripts. Although users also can convert Powerpoint presentations into videos using Narakeet, it’s not currently possible to directly automate this process.
By default, the API allows you to make 1440 calls per day (1 per minute). If you need to build more videos through the API, request an increased quota by sending an email to contact@narakeet.com.