cloudmersive-video-api-client
CloudmersiveVideoApiClient - the Ruby gem for the videoapi
The video APIs help you convert, encode, and transcode videos.
This SDK is automatically generated by the Swagger Codegen project:
- API version: v1
- Package version: 2.0.5
- Build package: io.swagger.codegen.languages.RubyClientCodegen
Installation
Build a gem
To build the Ruby code into a gem:
gem build cloudmersive-video-api-client.gemspec
Then either install the gem locally:
gem install ./cloudmersive-video-api-client-2.0.5.gem
(for development, run gem install --dev ./cloudmersive-video-api-client-2.0.5.gem
to install the development dependencies)
or publish the gem to a gem hosting service, e.g. RubyGems.
Finally add this to the Gemfile:
gem 'cloudmersive-video-api-client', '~> 2.0.5'
Install from Git
If the Ruby gem is hosted at a git repository: https://github.com/GIT_USER_ID/GIT_REPO_ID, then add the following in the Gemfile:
gem 'cloudmersive-video-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
Include the Ruby code directly
Include the Ruby code directly using -I
as follows:
ruby -Ilib script.rb
Getting Started
Please follow the installation procedure and then run the following code:
# Load the gem
require 'cloudmersive-video-api-client'
# Setup authorization
CloudmersiveVideoApiClient.configure do |config|
# Configure API key authorization: Apikey
config.api_key['Apikey'] = 'YOUR API KEY'
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
#config.api_key_prefix['Apikey'] = 'Bearer'
end
api_instance = CloudmersiveVideoApiClient::AudioApi.new
opts = {
input_file: File.new('/path/to/file.txt'), # File | Input file to perform the operation on.
file_url: 'file_url_example', # String | Optional; URL of an audio file being used for conversion. Use this option for files larger than 2GB.
bit_rate: 56 # Integer | 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.
}
begin
#Convert Audio File to AAC format.
result = api_instance.audio_convert_to_aac(opts)
p result
rescue CloudmersiveVideoApiClient::ApiError => e
puts "Exception when calling AudioApi->audio_convert_to_aac: #{e}"
end
Documentation for API Endpoints
All URIs are relative to https://api.cloudmersive.com
Class | Method | HTTP request | Description |
---|---|---|---|
CloudmersiveVideoApiClient::AudioApi | audio_convert_to_aac | POST /video/convert/to/aac | Convert Audio File to AAC format. |
CloudmersiveVideoApiClient::AudioApi | audio_convert_to_m4a | POST /video/convert/to/m4a | Convert Audio File to M4A format. |
CloudmersiveVideoApiClient::AudioApi | audio_convert_to_mp3 | POST /video/convert/to/mp3 | Convert Audio File to MP3 format. |
CloudmersiveVideoApiClient::AudioApi | audio_convert_to_wav | POST /video/convert/to/wav | Convert Audio File to WAV format. |
CloudmersiveVideoApiClient::VideoApi | video_convert_to_gif | POST /video/convert/to/gif | Convert Video to Animated GIF format. |
CloudmersiveVideoApiClient::VideoApi | video_convert_to_mov | POST /video/convert/to/mov | Convert Video to MOV format. |
CloudmersiveVideoApiClient::VideoApi | video_convert_to_mp4 | POST /video/convert/to/mp4 | Convert Video to MP4 format. |
CloudmersiveVideoApiClient::VideoApi | video_convert_to_still_frames | POST /video/convert/to/still-frames | Convert Video to PNG Still Frames. |
CloudmersiveVideoApiClient::VideoApi | video_convert_to_webm | POST /video/convert/to/webm | Convert Video to WEBM format. |
CloudmersiveVideoApiClient::VideoApi | video_cut_video | POST /video/cut | Cut a Video to a Shorter Length |
CloudmersiveVideoApiClient::VideoApi | video_get_info | POST /video/convert/get-info | Get detailed information about a video or audio file |
CloudmersiveVideoApiClient::VideoApi | video_resize_video | POST /video/resize/preserveAspectRatio | Resizes a Video Preserving the Original Aspect Ratio. |
CloudmersiveVideoApiClient::VideoApi | video_resize_video_simple | POST /video/resize/target | Resizes a Video without Preserving Aspect Ratio. |
CloudmersiveVideoApiClient::VideoApi | video_scan_for_nsfw | POST /video/scan/nsfw | Scan a Video for NSFW content. |
CloudmersiveVideoApiClient::VideoApi | video_split_video | POST /video/split | Split a Video into Two Shorter Videos |
Documentation for Models
- CloudmersiveVideoApiClient::MediaInformation
- CloudmersiveVideoApiClient::NsfwResult
- CloudmersiveVideoApiClient::NsfwScannedFrame
- CloudmersiveVideoApiClient::SplitVideoResult
- CloudmersiveVideoApiClient::StillFrame
- CloudmersiveVideoApiClient::StillFramesResult
- CloudmersiveVideoApiClient::VideoFile
Documentation for Authorization
Apikey
- Type: API key
- API key parameter name: Apikey
- Location: HTTP header