Video and Media Services API API Reference
The video APIs help you convert, encode, and transcode videos.
Swagger OpenAPI Specification | .NET Framework Client | .NET Core Client | Java Client | Node.JS Client | Python Client | Drupal Client
API Endpoint
https://api.cloudmersive.com
Schemes: https
Version: v1
Authentication
Apikey
API Key Authentication
Audio
Convert Audio File to MP3 format.
Automatically detect audio file format and convert it to MP3 format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Convert Audio File to M4A format.
Automatically detect audio file format and convert it to M4A format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Convert Audio File to AAC format.
Automatically detect audio file format and convert it to AAC format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
Optional; Specify the desired bitrate of the converted audio file in kilobytes per second (kB/s). Value may be between 48 and 1,411. By default, the optimal bitrate will be chosen automatically.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Convert Audio File to WAV format.
Automatically detect audio file format and convert it to WAV format. Supports many input audio formats, including AAC, FLAC, M4A, MP2, MP3, OGG, WMA, and WAV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
Optional; Specify the desired sample rate of the converted audio file in kHz. Value may be between 8 and 96. Standard for audio CDs is 44.1, while DVD audio standard is 48. By default, the optimal sample rate will be chosen automatically.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Video
Get detailed information about a video or audio file
Retrieve detailed information about a video or audio file, including format, dimensions, file size, bit rate, duration and start time. Compatible with many formats, including: AVI, ASF, FLV, GIF, MP4, MPEG/MPG, Matroska/WEBM, MOV, AIFF, ASF, CAF, MP3, MP2, MP1, Ogg, OMG/OMA, and WAV. Uses 1 API call per 10 MB of file size.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Code Example:
OK
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
{
"Successful": "boolean",
"FileFormat": "string",
"FileFormatFull": "string",
"ValidFileFormats": [
"string"
],
"Width": "integer (int32)",
"Height": "integer (int32)",
"Size": "integer (int32)",
"BitRate": "integer (int32)",
"Duration": "number (double)",
"StartTime": "number (double)"
}
Convert Video to WEBM format.
Automatically detect video file format and convert it to WEBM format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
Optional; If false, the original video's aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Convert Video to MOV format.
Automatically detect video file format and convert it to MOV format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
Optional; If false, the original video's aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Convert Video to MP4 format.
Automatically detect video file format and convert it to MP4 format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
Optional; If false, the original video's aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Convert Video to Animated GIF format.
Automatically detect video file format and convert it to animated GIF format. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB. Default height is 250 pixels, while preserving the video's aspect ratio.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Optional; Maximum width of the output video, up to the original video width. Defaults to 250 pixels, maximum is 500 pixels.
Optional; Maximum height of the output video, up to the original video width. Defaults to 250 pixels, maximum is 500 pixels.
Optional; If false, the original video's aspect ratio will not be preserved, allowing customization of the aspect ratio using maxWidth and maxHeight, potentially skewing the video. Default is true.
Optional; Specify the frame rate of the output video. Defaults to 24 frames per second.
Optional; Specify the desired starting time of the GIF video in TimeSpan format.
Optional; Specify the desired length of the GIF video in TimeSpan format. Limit is 30 seconds. Default is 10 seconds.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Resizes a Video Preserving the Original Aspect Ratio.
Resizes a video, while maintaining the original aspect ratio and encoding. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
Optional; Specify the file extension of the input video. This is recommended when inputting a file directly, without a file name. If no file name is available and no extension is provided, the extension will be inferred from the file data, which may cause a different extension to be used in the output.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Resizes a Video without Preserving Aspect Ratio.
Resizes a video without maintaining original aspect ratio, allowing fully customizable dimensions. May cause image skewing. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
Optional; Specify the quality of the output video, where 100 is lossless and 1 is the lowest possible quality with highest compression. Default is 50.
Optional; Specify the file extension of the input video. This is recommended when inputting a file directly, without a file name. If no file name is available and no extension is provided, the extension will be inferred from the file data, which may cause a different extension to be used in the output.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Cut a Video to a Shorter Length
Cuts a video to the specified start and end times. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Optional; Specify the desired starting time of the cut video in TimeSpan format.
Optional; Specify the desired length of the cut video in TimeSpan format. Leave blank to include the rest of the video. Maximum time is 4 hours.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
"string (byte)"
Split a Video into Two Shorter Videos
Cuts a video into two videos based on the specified start time. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time. Maximum output file size is 50GB.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Specify the desired time at which to split the video in TimeSpan format.
Optional; Specify the desired length of the second video in TimeSpan format. Leave blank to include the rest of the video. Maximum time is 4 hours.
Code Example:
OK
Response Content-Types: application/octet-stream
Response Example (200 OK)
{
"Successful": "boolean",
"Videos": [
{
"VideoNumber": "integer (int32)",
"Content": "string (byte)"
}
]
}
Convert Video to PNG Still Frames.
Automatically detect video file format and convert it to an array of still frame PNG images. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per additional minute of processing time over 5 minutes, up to a maximum of 25 minutes total processing time.
Input file to perform the operation on.
Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
Optional; How many video frames per second to be returned as PNG images. Minimum value is 0.1, maximum is 60. Default is 1 frame per second. Maximum of 2000 total frames.
Code Example:
OK
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
{
"Successful": "boolean",
"TotalFrames": "integer (int32)",
"StillFrames": [
{
"FrameNumber": "integer (int32)",
"TimeStamp": "string",
"Content": "string (byte)"
}
]
}
Scan a Video for NSFW content.
Automatically detect video file format and scan it for Not Safe For Work (NSFW)/Porn/Racy content. Supports many input video formats, including AVI, ASF, FLV, MP4, MPEG/MPG, Matroska/WEBM, 3G2, OGV, MKV, M4V and MOV. Uses 1 API call per 10 MB of file size. Also uses 1 API call per frame scanned.
Input file to perform the operation on.
Optional; URL of a video file being scanned. Use this option for files larger than 2GB.
Optional; How many video frames per second to be scanned. Minimum value is 0.05 (1 frame per 20 seconds), maximum is 1. Default is 0.33 frame per second (1 frame scanned every 3 seconds). Maximum of 1000 total frames can be scanned, potentially adjusting the framerate for longer videos.
Code Example:
OK
Response Content-Types: application/json, text/json, application/xml, text/xml
Response Example (200 OK)
{
"Successful": "boolean",
"HighestClassificationResult": "string",
"HighestScore": "number (double)",
"TotalRacyFrames": "integer (int32)",
"TotalNsfwFrames": "integer (int32)",
"TotalFrames": "integer (int32)",
"NsfwScannedFrames": [
{
"FrameNumber": "integer (int32)",
"TimeStamp": "string",
"Content": "string (byte)",
"ClassificationResult": "string",
"Score": "number (double)"
}
]
}
Schema Definitions
MediaInformation: object
Result of retrieving information about a video or audio file
- Successful: boolean
-
True if the operation was successful, false otherwise
- FileFormat: string
-
The file's short format name
- FileFormatFull: string
-
The file's full format name
- ValidFileFormats: string[]
-
A list of the file's valid formats
-
string - Width: integer (int32)
-
The video's width, if file is a video
- Height: integer (int32)
-
The video's height, if file is a video
- Size: integer (int32)
-
The file's size in bytes
- BitRate: integer (int32)
-
The file's bit rate
- Duration: number (double)
-
The file's duration in seconds
- StartTime: number (double)
-
The file's media start time
Example
{
"Successful": "boolean",
"FileFormat": "string",
"FileFormatFull": "string",
"ValidFileFormats": [
"string"
],
"Width": "integer (int32)",
"Height": "integer (int32)",
"Size": "integer (int32)",
"BitRate": "integer (int32)",
"Duration": "number (double)",
"StartTime": "number (double)"
}
SplitVideoResult: object
The result of splitting a video
Example
{
"Successful": "boolean",
"Videos": [
{
"VideoNumber": "integer (int32)",
"Content": "string (byte)"
}
]
}
VideoFile: object
A video file
- VideoNumber: integer (int32)
-
Sequence number of the video
- Content: string (byte)
-
The video file as a byte array
Example
{
"VideoNumber": "integer (int32)",
"Content": "string (byte)"
}
StillFramesResult: object
The result of converting a video into still frames
- Successful: boolean
-
True if the operation was successful, false otherwise
- TotalFrames: integer (int32)
-
The total number of frames converted
- StillFrames: StillFrame
-
Individual still frames from the conversion operation
-
StillFrame
Example
{
"Successful": "boolean",
"TotalFrames": "integer (int32)",
"StillFrames": [
{
"FrameNumber": "integer (int32)",
"TimeStamp": "string",
"Content": "string (byte)"
}
]
}
StillFrame: object
A single still frame from a video
- FrameNumber: integer (int32)
-
The number of the current frame
- TimeStamp: string
-
The playback time of the current frame
- Content: string (byte)
-
The still frame in PNG format as a byte array
Example
{
"FrameNumber": "integer (int32)",
"TimeStamp": "string",
"Content": "string (byte)"
}
NsfwResult: object
The result of scanning a video file for NSFW content
- Successful: boolean
-
True if the operation was successful, false otherwise
- HighestClassificationResult: string
-
The highest NSFW classification of the video
- HighestScore: number (double)
-
The highest NSFW score out of all frames scanned
- TotalRacyFrames: integer (int32)
-
The total number of potentially "racy" frames.
- TotalNsfwFrames: integer (int32)
-
The total number of frames with high probability of NSFW.
- TotalFrames: integer (int32)
-
The total number of frames scanned
- NsfwScannedFrames: NsfwScannedFrame
-
The NSFW scanning results for each frame
-
NsfwScannedFrame
Example
{
"Successful": "boolean",
"HighestClassificationResult": "string",
"HighestScore": "number (double)",
"TotalRacyFrames": "integer (int32)",
"TotalNsfwFrames": "integer (int32)",
"TotalFrames": "integer (int32)",
"NsfwScannedFrames": [
{
"FrameNumber": "integer (int32)",
"TimeStamp": "string",
"Content": "string (byte)",
"ClassificationResult": "string",
"Score": "number (double)"
}
]
}
NsfwScannedFrame: object
An individual frame scanned for NSFW content
- FrameNumber: integer (int32)
-
The number of the current frame
- TimeStamp: string
-
The playback time of the current frame
- Content: string (byte)
-
The still frame in PNG format as a byte array
- ClassificationResult: string
-
The NSFW classification of the still frame
- Score: number (double)
-
The NSFW score of the current frame
Example
{
"FrameNumber": "integer (int32)",
"TimeStamp": "string",
"Content": "string (byte)",
"ClassificationResult": "string",
"Score": "number (double)"
}