FFMPEG Microservice

Default

covert

Convert a media file (video or audio) and get response as stream

Convert a media file and return as stream


/convert

Usage and SDK Samples

curl -X POST\
-H "Accept: application/octet-stream"\
-H "Content-Type: form/multipart-data"\
"https:///api/v3/convert?input_options=&output_options=&buffer_size="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Convert_body body = ; // Convert_body | File to upload for conversion
        String outputOptions = outputOptions_example; // String | 
        String inputOptions = inputOptions_example; // String | 
        Integer bufferSize = 56; // Integer | 
        try {
            byte[] result = apiInstance.covert(body, outputOptions, inputOptions, bufferSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#covert");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Convert_body body = ; // Convert_body | File to upload for conversion
        String outputOptions = outputOptions_example; // String | 
        String inputOptions = inputOptions_example; // String | 
        Integer bufferSize = 56; // Integer | 
        try {
            byte[] result = apiInstance.covert(body, outputOptions, inputOptions, bufferSize);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#covert");
            e.printStackTrace();
        }
    }
}
Convert_body *body = ; // File to upload for conversion
String *outputOptions = outputOptions_example; // 
String *inputOptions = inputOptions_example; //  (optional)
Integer *bufferSize = 56; //  (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Convert a media file (video or audio) and get response as stream
[apiInstance covertWith:body
    outputOptions:outputOptions
    inputOptions:inputOptions
    bufferSize:bufferSize
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FfmpegMicroservice = require('ffmpeg_microservice');

var api = new FfmpegMicroservice.DefaultApi()
var body = ; // {{Convert_body}} File to upload for conversion
var outputOptions = outputOptions_example; // {{String}} 
var opts = { 
  'inputOptions': inputOptions_example // {{String}} 
  'bufferSize': 56 // {{Integer}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.covert(bodyoutputOptions, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class covertExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var body = new Convert_body(); // Convert_body | File to upload for conversion
            var outputOptions = outputOptions_example;  // String | 
            var inputOptions = inputOptions_example;  // String |  (optional) 
            var bufferSize = 56;  // Integer |  (optional) 

            try
            {
                // Convert a media file (video or audio) and get response as stream
                byte[] result = apiInstance.covert(body, outputOptions, inputOptions, bufferSize);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.covert: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // Convert_body | File to upload for conversion
$outputOptions = outputOptions_example; // String | 
$inputOptions = inputOptions_example; // String | 
$bufferSize = 56; // Integer | 

try {
    $result = $api_instance->covert($body, $outputOptions, $inputOptions, $bufferSize);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->covert: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::Convert_body->new(); # Convert_body | File to upload for conversion
my $outputOptions = outputOptions_example; # String | 
my $inputOptions = inputOptions_example; # String | 
my $bufferSize = 56; # Integer | 

eval { 
    my $result = $api_instance->covert(body => $body, outputOptions => $outputOptions, inputOptions => $inputOptions, bufferSize => $bufferSize);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->covert: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body =  # Convert_body | File to upload for conversion
outputOptions = outputOptions_example # String | 
inputOptions = inputOptions_example # String |  (optional)
bufferSize = 56 # Integer |  (optional)

try: 
    # Convert a media file (video or audio) and get response as stream
    api_response = api_instance.covert(body, outputOptions, inputOptions=inputOptions, bufferSize=bufferSize)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->covert: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
input_options
String
output_options*
String
Required
buffer_size
Integer

Responses

Status: 200 - Successful operation

Status: 413 - file to convert is larger than upload size limit

Status: 422 - Unprocessable entity when either file in body or action in query parameters is not available


covertFile

Convert a media file (video or audio) and get response as file

Convert a media file and return as file


/convert-file

Usage and SDK Samples

curl -X POST\
-H "Accept: audio/*,video/*"\
-H "Content-Type: form/multipart-data"\
"https:///api/v3/convert-file?input_options=&output_options="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;

import java.io.File;
import java.util.*;

public class DefaultApiExample {

    public static void main(String[] args) {
        
        DefaultApi apiInstance = new DefaultApi();
        Convertfile_body body = ; // Convertfile_body | File to upload for conversion
        String outputOptions = outputOptions_example; // String | 
        String inputOptions = inputOptions_example; // String | 
        try {
            byte[] result = apiInstance.covertFile(body, outputOptions, inputOptions);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#covertFile");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        Convertfile_body body = ; // Convertfile_body | File to upload for conversion
        String outputOptions = outputOptions_example; // String | 
        String inputOptions = inputOptions_example; // String | 
        try {
            byte[] result = apiInstance.covertFile(body, outputOptions, inputOptions);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#covertFile");
            e.printStackTrace();
        }
    }
}
Convertfile_body *body = ; // File to upload for conversion
String *outputOptions = outputOptions_example; // 
String *inputOptions = inputOptions_example; //  (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

// Convert a media file (video or audio) and get response as file
[apiInstance covertFileWith:body
    outputOptions:outputOptions
    inputOptions:inputOptions
              completionHandler: ^(byte[] output, NSError* error) {
                            if (output) {
                                NSLog(@"%@", output);
                            }
                            if (error) {
                                NSLog(@"Error: %@", error);
                            }
                        }];
var FfmpegMicroservice = require('ffmpeg_microservice');

var api = new FfmpegMicroservice.DefaultApi()
var body = ; // {{Convertfile_body}} File to upload for conversion
var outputOptions = outputOptions_example; // {{String}} 
var opts = { 
  'inputOptions': inputOptions_example // {{String}} 
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.covertFile(bodyoutputOptions, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class covertFileExample
    {
        public void main()
        {

            var apiInstance = new DefaultApi();
            var body = new Convertfile_body(); // Convertfile_body | File to upload for conversion
            var outputOptions = outputOptions_example;  // String | 
            var inputOptions = inputOptions_example;  // String |  (optional) 

            try
            {
                // Convert a media file (video or audio) and get response as file
                byte[] result = apiInstance.covertFile(body, outputOptions, inputOptions);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.covertFile: " + e.Message );
            }
        }
    }
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

$api_instance = new Swagger\Client\ApiDefaultApi();
$body = ; // Convertfile_body | File to upload for conversion
$outputOptions = outputOptions_example; // String | 
$inputOptions = inputOptions_example; // String | 

try {
    $result = $api_instance->covertFile($body, $outputOptions, $inputOptions);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->covertFile: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;

my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $body = WWW::SwaggerClient::Object::Convertfile_body->new(); # Convertfile_body | File to upload for conversion
my $outputOptions = outputOptions_example; # String | 
my $inputOptions = inputOptions_example; # String | 

eval { 
    my $result = $api_instance->covertFile(body => $body, outputOptions => $outputOptions, inputOptions => $inputOptions);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->covertFile: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint

# create an instance of the API class
api_instance = swagger_client.DefaultApi()
body =  # Convertfile_body | File to upload for conversion
outputOptions = outputOptions_example # String | 
inputOptions = inputOptions_example # String |  (optional)

try: 
    # Convert a media file (video or audio) and get response as file
    api_response = api_instance.covert_file(body, outputOptions, inputOptions=inputOptions)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->covertFile: %s\n" % e)

Parameters

Body parameters
Name Description
body *
Query parameters
Name Description
input_options
String
output_options*
String
Required

Responses

Status: 200 - Successful operation

Status: 413 - file to convert is larger than upload size limit

Status: 422 - Unprocessable entity when either file in body or action in query parameters is not available