The video APIs help you convert, encode, and transcode videos.
If everything is set correctly:
-
Running
sfdx version
in a command prompt should output something like:sfdx-cli/5.7.5-05549de (darwin-amd64) go1.7.5 sfdxstable
-
Copy the output into your Salesforce DX folder - or alternatively deploy the output directly into the workspace.
-
Deploy the code via Salesforce DX to your Scratch Org
$ sfdx force:source:push
-
If the API needs authentication update the Named Credential in Setup.
-
Run your Apex tests using
$ sfdx sfdx force:apex:test:run
-
Retrieve the job id from the console and check the test results.
$ sfdx force:apex:test:report -i theJobId
Please follow the installation instruction and execute the following Apex code:
SwagAudioApi api = new SwagAudioApi();
SwagClient client = api.getClient();
Map<String, Object> params = new Map<String, Object>{
'inputFile' => Blob.valueOf('Sample text file\nContents'),
'fileUrl' => 'fileUrl_example',
'bitRate' => 56
};
try {
// cross your fingers
Blob result = api.audioConvertToAac(params);
System.debug(result);
} catch (Swagger.ApiException e) {
// ...handle your exceptions
}
All URIs are relative to https://api.cloudmersive.com
Class | Method | HTTP request | Description |
---|---|---|---|
SwagAudioApi | audioConvertToAac | POST /video/convert/to/aac | Convert Audio File to AAC format. |
SwagAudioApi | audioConvertToM4a | POST /video/convert/to/m4a | Convert Audio File to M4A format. |
SwagAudioApi | audioConvertToMp3 | POST /video/convert/to/mp3 | Convert Audio File to MP3 format. |
SwagAudioApi | audioConvertToWav | POST /video/convert/to/wav | Convert Audio File to WAV format. |
SwagVideoApi | videoConvertToGif | POST /video/convert/to/gif | Convert Video to Animated GIF format. |
SwagVideoApi | videoConvertToMov | POST /video/convert/to/mov | Convert Video to MOV format. |
SwagVideoApi | videoConvertToMp4 | POST /video/convert/to/mp4 | Convert Video to MP4 format. |
SwagVideoApi | videoConvertToStillFrames | POST /video/convert/to/still-frames | Convert Video to PNG Still Frames. |
SwagVideoApi | videoConvertToWebm | POST /video/convert/to/webm | Convert Video to WEBM format. |
SwagVideoApi | videoCutVideo | POST /video/cut | Cut a Video to a Shorter Length |
SwagVideoApi | videoGetInfo | POST /video/convert/get-info | Get detailed information about a video or audio file |
SwagVideoApi | videoResizeVideo | POST /video/resize/preserveAspectRatio | Resizes a Video Preserving the Original Aspect Ratio. |
SwagVideoApi | videoResizeVideoSimple | POST /video/resize/target | Resizes a Video without Preserving Aspect Ratio. |
SwagVideoApi | videoScanForNsfw | POST /video/scan/nsfw | Scan a Video for NSFW content. |
SwagVideoApi | videoSplitVideo | POST /video/split | Split a Video into Two Shorter Videos |
- SwagMediaInformation
- SwagNsfwResult
- SwagNsfwScannedFrame
- SwagSplitVideoResult
- SwagStillFrame
- SwagStillFramesResult
- SwagVideoFile
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Apikey
- Location: HTTP header