May 15, 2017

Splitting video into smaller pieces

Table of Contents:

We recently introduced videos into our v2 API, which allows you to predict on videos as well! To make sure our infrastructure runs smoothly, and we allow all customers to benefit from this service, we have created caps on the file size and video length you can predict against. For the private beta release, the cap is set to 10MB in size or 10min in length.

However, if your videos exceed these limits, don’t worry! We got you covered in this tutorial

 

You just need to take advantage of an open-source tool called GPAC, which can quickly split your videos, and you would be able to send smaller-sized videos to the Clarifai API. 

Let's get started! 

#Installation

First, install the GPAC software using the installers.

If you're on a Mac you can install it with homebrew. Just enter brew install gpac in the command line. 

 

#Usage

To split your video into 80MB files, just use the command below:

mp4box -splits 80000 <filename.mp4>

 

To split your video in 10min segments, you can use the command below:

mp4box -split 600 <filename.mp4>

 

Your video should now be split into smaller chunks, which you can now send to the Clarifai API!