cloudmersive-video-api-client 2.0.1 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile +7 -0
- data/README.md +116 -0
- data/Rakefile +8 -0
- data/cloudmersive-video-api-client.gemspec +45 -0
- data/docs/MediaInformation.md +17 -0
- data/docs/VideoApi.md +353 -0
- data/git_push.sh +55 -0
- data/lib/cloudmersive-video-api-client.rb +41 -0
- data/lib/cloudmersive-video-api-client/api/video_api.rb +388 -0
- data/lib/cloudmersive-video-api-client/api_client.rb +391 -0
- data/lib/cloudmersive-video-api-client/api_error.rb +38 -0
- data/lib/cloudmersive-video-api-client/configuration.rb +209 -0
- data/lib/cloudmersive-video-api-client/models/media_information.rb +278 -0
- data/lib/cloudmersive-video-api-client/version.rb +15 -0
- data/spec/api/video_api_spec.rb +125 -0
- data/spec/api_client_spec.rb +243 -0
- data/spec/configuration_spec.rb +42 -0
- data/spec/models/media_information_spec.rb +95 -0
- data/spec/spec_helper.rb +111 -0
- metadata +22 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2b1efa9645d3a85376d22f88ec694bea513150f0e8e544fb4ff3fcd15840c1d
|
4
|
+
data.tar.gz: f5229cdac58afbe2f916db0220057293235fd4a16b8c1638ea22d64fa21c18a6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24eac0883003effe41bbdbe9cf73b434128db81aaab2a907e27cce05890b61aa0adecaecc24fb7e392e9e029e0e3d0a625d688d47e7b5347a6896486201cffc4
|
7
|
+
data.tar.gz: 7c5f757af3f4f738607cf36126f0980db28b1a46f9eb6a97168782635ce1809b83b2b5f2c0b2a5a449a518b939ebb2c0087789351bc39bae207617177d6a81b5
|
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,116 @@
|
|
1
|
+
# cloudmersive-video-api-client
|
2
|
+
|
3
|
+
CloudmersiveVideoApiClient - the Ruby gem for the videoapi
|
4
|
+
|
5
|
+
The video APIs help you convert, encode, and transcode videos.
|
6
|
+
|
7
|
+
This SDK is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
8
|
+
|
9
|
+
- API version: v1
|
10
|
+
- Package version: 2.0.2
|
11
|
+
- Build package: io.swagger.codegen.languages.RubyClientCodegen
|
12
|
+
|
13
|
+
## Installation
|
14
|
+
|
15
|
+
### Build a gem
|
16
|
+
|
17
|
+
To build the Ruby code into a gem:
|
18
|
+
|
19
|
+
```shell
|
20
|
+
gem build cloudmersive-video-api-client.gemspec
|
21
|
+
```
|
22
|
+
|
23
|
+
Then either install the gem locally:
|
24
|
+
|
25
|
+
```shell
|
26
|
+
gem install ./cloudmersive-video-api-client-2.0.2.gem
|
27
|
+
```
|
28
|
+
(for development, run `gem install --dev ./cloudmersive-video-api-client-2.0.2.gem` to install the development dependencies)
|
29
|
+
|
30
|
+
or publish the gem to a gem hosting service, e.g. [RubyGems](https://rubygems.org/).
|
31
|
+
|
32
|
+
Finally add this to the Gemfile:
|
33
|
+
|
34
|
+
gem 'cloudmersive-video-api-client', '~> 2.0.2'
|
35
|
+
|
36
|
+
### Install from Git
|
37
|
+
|
38
|
+
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:
|
39
|
+
|
40
|
+
gem 'cloudmersive-video-api-client', :git => 'https://github.com/GIT_USER_ID/GIT_REPO_ID.git'
|
41
|
+
|
42
|
+
### Include the Ruby code directly
|
43
|
+
|
44
|
+
Include the Ruby code directly using `-I` as follows:
|
45
|
+
|
46
|
+
```shell
|
47
|
+
ruby -Ilib script.rb
|
48
|
+
```
|
49
|
+
|
50
|
+
## Getting Started
|
51
|
+
|
52
|
+
Please follow the [installation](#installation) procedure and then run the following code:
|
53
|
+
```ruby
|
54
|
+
# Load the gem
|
55
|
+
require 'cloudmersive-video-api-client'
|
56
|
+
|
57
|
+
# Setup authorization
|
58
|
+
CloudmersiveVideoApiClient.configure do |config|
|
59
|
+
# Configure API key authorization: Apikey
|
60
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
61
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
62
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
63
|
+
end
|
64
|
+
|
65
|
+
api_instance = CloudmersiveVideoApiClient::VideoApi.new
|
66
|
+
|
67
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
68
|
+
|
69
|
+
opts = {
|
70
|
+
file_url: 'file_url_example', # String | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
|
71
|
+
max_width: 56, # Integer | Optional; Maximum width of the output video, up to the original video width. Defaults to 250 pixels.
|
72
|
+
max_height: 56, # Integer | Optional; Maximum height of the output video, up to the original video width. Defaults to 250 pixels.
|
73
|
+
preserve_aspect_ratio: true, # BOOLEAN | 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.
|
74
|
+
frame_rate: 56, # Integer | Optional; Specify the frame rate of the output video. Defaults to 24 frames per second.
|
75
|
+
extend_processing_time: true, # BOOLEAN | Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
|
76
|
+
start_time: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Optional; Specify the desired starting time of the GIF video in TimeSpan format.
|
77
|
+
time_span: DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Optional; Specify the desired length of the GIF video in TimeSpan format. Limit is 30 minutes.
|
78
|
+
}
|
79
|
+
|
80
|
+
begin
|
81
|
+
#Convert Video to Animated GIF format.
|
82
|
+
result = api_instance.video_convert_to_gif(input_file, opts)
|
83
|
+
p result
|
84
|
+
rescue CloudmersiveVideoApiClient::ApiError => e
|
85
|
+
puts "Exception when calling VideoApi->video_convert_to_gif: #{e}"
|
86
|
+
end
|
87
|
+
|
88
|
+
```
|
89
|
+
|
90
|
+
## Documentation for API Endpoints
|
91
|
+
|
92
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
93
|
+
|
94
|
+
Class | Method | HTTP request | Description
|
95
|
+
------------ | ------------- | ------------- | -------------
|
96
|
+
*CloudmersiveVideoApiClient::VideoApi* | [**video_convert_to_gif**](docs/VideoApi.md#video_convert_to_gif) | **POST** /video/convert/to/gif | Convert Video to Animated GIF format.
|
97
|
+
*CloudmersiveVideoApiClient::VideoApi* | [**video_convert_to_mov**](docs/VideoApi.md#video_convert_to_mov) | **POST** /video/convert/to/mov | Convert Video to MOV format.
|
98
|
+
*CloudmersiveVideoApiClient::VideoApi* | [**video_convert_to_mp4**](docs/VideoApi.md#video_convert_to_mp4) | **POST** /video/convert/to/mp4 | Convert Video to MP4 format.
|
99
|
+
*CloudmersiveVideoApiClient::VideoApi* | [**video_convert_to_webm**](docs/VideoApi.md#video_convert_to_webm) | **POST** /video/convert/to/webm | Convert Video to WEBM format.
|
100
|
+
*CloudmersiveVideoApiClient::VideoApi* | [**video_get_info**](docs/VideoApi.md#video_get_info) | **POST** /video/convert/get-info | Get detailed information about a video or audio file
|
101
|
+
|
102
|
+
|
103
|
+
## Documentation for Models
|
104
|
+
|
105
|
+
- [CloudmersiveVideoApiClient::MediaInformation](docs/MediaInformation.md)
|
106
|
+
|
107
|
+
|
108
|
+
## Documentation for Authorization
|
109
|
+
|
110
|
+
|
111
|
+
### Apikey
|
112
|
+
|
113
|
+
- **Type**: API key
|
114
|
+
- **API key parameter name**: Apikey
|
115
|
+
- **Location**: HTTP header
|
116
|
+
|
data/Rakefile
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
|
3
|
+
=begin
|
4
|
+
#videoapi
|
5
|
+
|
6
|
+
#The video APIs help you convert, encode, and transcode videos.
|
7
|
+
|
8
|
+
OpenAPI spec version: v1
|
9
|
+
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
11
|
+
Swagger Codegen version: 2.4.14
|
12
|
+
|
13
|
+
=end
|
14
|
+
|
15
|
+
$:.push File.expand_path("../lib", __FILE__)
|
16
|
+
require "cloudmersive-video-api-client/version"
|
17
|
+
|
18
|
+
Gem::Specification.new do |s|
|
19
|
+
s.name = "cloudmersive-video-api-client"
|
20
|
+
s.version = CloudmersiveVideoApiClient::VERSION
|
21
|
+
s.platform = Gem::Platform::RUBY
|
22
|
+
s.authors = ["Cloudmersive"]
|
23
|
+
s.email = [""]
|
24
|
+
s.homepage = "https://cloudmersive.com/video-and-media-services-api"
|
25
|
+
s.summary = "Convert API lets you effortlessly convert, process and encode video and media files."
|
26
|
+
s.description = "Convert and encode video and media files and content between file formats. On-demand."
|
27
|
+
s.license = 'Apache 2.0'
|
28
|
+
s.required_ruby_version = ">= 1.9"
|
29
|
+
|
30
|
+
s.add_runtime_dependency 'typhoeus', '~> 1.0', '>= 1.0.1'
|
31
|
+
s.add_runtime_dependency 'json', '~> 2.1', '>= 2.1.0'
|
32
|
+
|
33
|
+
s.add_development_dependency 'rspec', '~> 3.6', '>= 3.6.0'
|
34
|
+
s.add_development_dependency 'vcr', '~> 3.0', '>= 3.0.1'
|
35
|
+
s.add_development_dependency 'webmock', '~> 1.24', '>= 1.24.3'
|
36
|
+
s.add_development_dependency 'autotest', '~> 4.4', '>= 4.4.6'
|
37
|
+
s.add_development_dependency 'autotest-rails-pure', '~> 4.1', '>= 4.1.2'
|
38
|
+
s.add_development_dependency 'autotest-growl', '~> 0.2', '>= 0.2.16'
|
39
|
+
s.add_development_dependency 'autotest-fsevent', '~> 0.2', '>= 0.2.12'
|
40
|
+
|
41
|
+
s.files = Dir['./**/*']
|
42
|
+
s.test_files = `find spec/*`.split("\n")
|
43
|
+
s.executables = []
|
44
|
+
s.require_paths = ["lib"]
|
45
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# CloudmersiveVideoApiClient::MediaInformation
|
2
|
+
|
3
|
+
## Properties
|
4
|
+
Name | Type | Description | Notes
|
5
|
+
------------ | ------------- | ------------- | -------------
|
6
|
+
**successful** | **BOOLEAN** | True if the operation was successful, false otherwise | [optional]
|
7
|
+
**file_format** | **String** | The file's short format name | [optional]
|
8
|
+
**file_format_full** | **String** | The file's full format name | [optional]
|
9
|
+
**valid_file_formats** | **Array<String>** | A list of the file's valid formats | [optional]
|
10
|
+
**width** | **Integer** | The video's width, if file is a video | [optional]
|
11
|
+
**height** | **Integer** | The video's height, if file is a video | [optional]
|
12
|
+
**size** | **Integer** | The file's size in bytes | [optional]
|
13
|
+
**bit_rate** | **Integer** | The file's bit rate | [optional]
|
14
|
+
**duration** | **Float** | The file's duration in seconds | [optional]
|
15
|
+
**start_time** | **Float** | The file's media start time | [optional]
|
16
|
+
|
17
|
+
|
data/docs/VideoApi.md
ADDED
@@ -0,0 +1,353 @@
|
|
1
|
+
# CloudmersiveVideoApiClient::VideoApi
|
2
|
+
|
3
|
+
All URIs are relative to *https://api.cloudmersive.com*
|
4
|
+
|
5
|
+
Method | HTTP request | Description
|
6
|
+
------------- | ------------- | -------------
|
7
|
+
[**video_convert_to_gif**](VideoApi.md#video_convert_to_gif) | **POST** /video/convert/to/gif | Convert Video to Animated GIF format.
|
8
|
+
[**video_convert_to_mov**](VideoApi.md#video_convert_to_mov) | **POST** /video/convert/to/mov | Convert Video to MOV format.
|
9
|
+
[**video_convert_to_mp4**](VideoApi.md#video_convert_to_mp4) | **POST** /video/convert/to/mp4 | Convert Video to MP4 format.
|
10
|
+
[**video_convert_to_webm**](VideoApi.md#video_convert_to_webm) | **POST** /video/convert/to/webm | Convert Video to WEBM format.
|
11
|
+
[**video_get_info**](VideoApi.md#video_get_info) | **POST** /video/convert/get-info | Get detailed information about a video or audio file
|
12
|
+
|
13
|
+
|
14
|
+
# **video_convert_to_gif**
|
15
|
+
> String video_convert_to_gif(input_file, opts)
|
16
|
+
|
17
|
+
Convert Video to Animated GIF format.
|
18
|
+
|
19
|
+
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. Maximum output file size is 50GB. Default height is 250 pixels, while preserving the video's aspect ratio.
|
20
|
+
|
21
|
+
### Example
|
22
|
+
```ruby
|
23
|
+
# load the gem
|
24
|
+
require 'cloudmersive-video-api-client'
|
25
|
+
# setup authorization
|
26
|
+
CloudmersiveVideoApiClient.configure do |config|
|
27
|
+
# Configure API key authorization: Apikey
|
28
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
29
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
30
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
31
|
+
end
|
32
|
+
|
33
|
+
api_instance = CloudmersiveVideoApiClient::VideoApi.new
|
34
|
+
|
35
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
36
|
+
|
37
|
+
opts = {
|
38
|
+
file_url: 'file_url_example', # String | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
|
39
|
+
max_width: 56, # Integer | Optional; Maximum width of the output video, up to the original video width. Defaults to 250 pixels.
|
40
|
+
max_height: 56, # Integer | Optional; Maximum height of the output video, up to the original video width. Defaults to 250 pixels.
|
41
|
+
preserve_aspect_ratio: true, # BOOLEAN | 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.
|
42
|
+
frame_rate: 56, # Integer | Optional; Specify the frame rate of the output video. Defaults to 24 frames per second.
|
43
|
+
extend_processing_time: true, # BOOLEAN | Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
|
44
|
+
start_time: DateTime.parse('2013-10-20T19:20:30+01:00'), # DateTime | Optional; Specify the desired starting time of the GIF video in TimeSpan format.
|
45
|
+
time_span: DateTime.parse('2013-10-20T19:20:30+01:00') # DateTime | Optional; Specify the desired length of the GIF video in TimeSpan format. Limit is 30 minutes.
|
46
|
+
}
|
47
|
+
|
48
|
+
begin
|
49
|
+
#Convert Video to Animated GIF format.
|
50
|
+
result = api_instance.video_convert_to_gif(input_file, opts)
|
51
|
+
p result
|
52
|
+
rescue CloudmersiveVideoApiClient::ApiError => e
|
53
|
+
puts "Exception when calling VideoApi->video_convert_to_gif: #{e}"
|
54
|
+
end
|
55
|
+
```
|
56
|
+
|
57
|
+
### Parameters
|
58
|
+
|
59
|
+
Name | Type | Description | Notes
|
60
|
+
------------- | ------------- | ------------- | -------------
|
61
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
62
|
+
**file_url** | **String**| Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB. | [optional]
|
63
|
+
**max_width** | **Integer**| Optional; Maximum width of the output video, up to the original video width. Defaults to 250 pixels. | [optional]
|
64
|
+
**max_height** | **Integer**| Optional; Maximum height of the output video, up to the original video width. Defaults to 250 pixels. | [optional]
|
65
|
+
**preserve_aspect_ratio** | **BOOLEAN**| 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]
|
66
|
+
**frame_rate** | **Integer**| Optional; Specify the frame rate of the output video. Defaults to 24 frames per second. | [optional]
|
67
|
+
**extend_processing_time** | **BOOLEAN**| Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes. | [optional]
|
68
|
+
**start_time** | **DateTime**| Optional; Specify the desired starting time of the GIF video in TimeSpan format. | [optional]
|
69
|
+
**time_span** | **DateTime**| Optional; Specify the desired length of the GIF video in TimeSpan format. Limit is 30 minutes. | [optional]
|
70
|
+
|
71
|
+
### Return type
|
72
|
+
|
73
|
+
**String**
|
74
|
+
|
75
|
+
### Authorization
|
76
|
+
|
77
|
+
[Apikey](../README.md#Apikey)
|
78
|
+
|
79
|
+
### HTTP request headers
|
80
|
+
|
81
|
+
- **Content-Type**: multipart/form-data
|
82
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
83
|
+
|
84
|
+
|
85
|
+
|
86
|
+
# **video_convert_to_mov**
|
87
|
+
> String video_convert_to_mov(input_file, opts)
|
88
|
+
|
89
|
+
Convert Video to MOV format.
|
90
|
+
|
91
|
+
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. Maximum output file size is 50GB.
|
92
|
+
|
93
|
+
### Example
|
94
|
+
```ruby
|
95
|
+
# load the gem
|
96
|
+
require 'cloudmersive-video-api-client'
|
97
|
+
# setup authorization
|
98
|
+
CloudmersiveVideoApiClient.configure do |config|
|
99
|
+
# Configure API key authorization: Apikey
|
100
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
101
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
102
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
103
|
+
end
|
104
|
+
|
105
|
+
api_instance = CloudmersiveVideoApiClient::VideoApi.new
|
106
|
+
|
107
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
108
|
+
|
109
|
+
opts = {
|
110
|
+
file_url: 'file_url_example', # String | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
|
111
|
+
max_width: 56, # Integer | Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
|
112
|
+
max_height: 56, # Integer | Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
|
113
|
+
preserve_aspect_ratio: true, # BOOLEAN | 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.
|
114
|
+
frame_rate: 56, # Integer | Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
|
115
|
+
quality: 56, # Integer | 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.
|
116
|
+
extend_processing_time: true # BOOLEAN | Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
|
117
|
+
}
|
118
|
+
|
119
|
+
begin
|
120
|
+
#Convert Video to MOV format.
|
121
|
+
result = api_instance.video_convert_to_mov(input_file, opts)
|
122
|
+
p result
|
123
|
+
rescue CloudmersiveVideoApiClient::ApiError => e
|
124
|
+
puts "Exception when calling VideoApi->video_convert_to_mov: #{e}"
|
125
|
+
end
|
126
|
+
```
|
127
|
+
|
128
|
+
### Parameters
|
129
|
+
|
130
|
+
Name | Type | Description | Notes
|
131
|
+
------------- | ------------- | ------------- | -------------
|
132
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
133
|
+
**file_url** | **String**| Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB. | [optional]
|
134
|
+
**max_width** | **Integer**| Optional; Maximum width of the output video, up to the original video width. Defaults to original video width. | [optional]
|
135
|
+
**max_height** | **Integer**| Optional; Maximum height of the output video, up to the original video width. Defaults to original video height. | [optional]
|
136
|
+
**preserve_aspect_ratio** | **BOOLEAN**| 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]
|
137
|
+
**frame_rate** | **Integer**| Optional; Specify the frame rate of the output video. Defaults to original video frame rate. | [optional]
|
138
|
+
**quality** | **Integer**| 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]
|
139
|
+
**extend_processing_time** | **BOOLEAN**| Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes. | [optional]
|
140
|
+
|
141
|
+
### Return type
|
142
|
+
|
143
|
+
**String**
|
144
|
+
|
145
|
+
### Authorization
|
146
|
+
|
147
|
+
[Apikey](../README.md#Apikey)
|
148
|
+
|
149
|
+
### HTTP request headers
|
150
|
+
|
151
|
+
- **Content-Type**: multipart/form-data
|
152
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
# **video_convert_to_mp4**
|
157
|
+
> String video_convert_to_mp4(input_file, opts)
|
158
|
+
|
159
|
+
Convert Video to MP4 format.
|
160
|
+
|
161
|
+
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. Maximum output file size is 50GB.
|
162
|
+
|
163
|
+
### Example
|
164
|
+
```ruby
|
165
|
+
# load the gem
|
166
|
+
require 'cloudmersive-video-api-client'
|
167
|
+
# setup authorization
|
168
|
+
CloudmersiveVideoApiClient.configure do |config|
|
169
|
+
# Configure API key authorization: Apikey
|
170
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
171
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
172
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
173
|
+
end
|
174
|
+
|
175
|
+
api_instance = CloudmersiveVideoApiClient::VideoApi.new
|
176
|
+
|
177
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
178
|
+
|
179
|
+
opts = {
|
180
|
+
file_url: 'file_url_example', # String | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
|
181
|
+
max_width: 56, # Integer | Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
|
182
|
+
max_height: 56, # Integer | Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
|
183
|
+
preserve_aspect_ratio: true, # BOOLEAN | 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.
|
184
|
+
frame_rate: 56, # Integer | Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
|
185
|
+
quality: 56, # Integer | 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.
|
186
|
+
extend_processing_time: true # BOOLEAN | Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
|
187
|
+
}
|
188
|
+
|
189
|
+
begin
|
190
|
+
#Convert Video to MP4 format.
|
191
|
+
result = api_instance.video_convert_to_mp4(input_file, opts)
|
192
|
+
p result
|
193
|
+
rescue CloudmersiveVideoApiClient::ApiError => e
|
194
|
+
puts "Exception when calling VideoApi->video_convert_to_mp4: #{e}"
|
195
|
+
end
|
196
|
+
```
|
197
|
+
|
198
|
+
### Parameters
|
199
|
+
|
200
|
+
Name | Type | Description | Notes
|
201
|
+
------------- | ------------- | ------------- | -------------
|
202
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
203
|
+
**file_url** | **String**| Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB. | [optional]
|
204
|
+
**max_width** | **Integer**| Optional; Maximum width of the output video, up to the original video width. Defaults to original video width. | [optional]
|
205
|
+
**max_height** | **Integer**| Optional; Maximum height of the output video, up to the original video width. Defaults to original video height. | [optional]
|
206
|
+
**preserve_aspect_ratio** | **BOOLEAN**| 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]
|
207
|
+
**frame_rate** | **Integer**| Optional; Specify the frame rate of the output video. Defaults to original video frame rate. | [optional]
|
208
|
+
**quality** | **Integer**| 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]
|
209
|
+
**extend_processing_time** | **BOOLEAN**| Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes. | [optional]
|
210
|
+
|
211
|
+
### Return type
|
212
|
+
|
213
|
+
**String**
|
214
|
+
|
215
|
+
### Authorization
|
216
|
+
|
217
|
+
[Apikey](../README.md#Apikey)
|
218
|
+
|
219
|
+
### HTTP request headers
|
220
|
+
|
221
|
+
- **Content-Type**: multipart/form-data
|
222
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
223
|
+
|
224
|
+
|
225
|
+
|
226
|
+
# **video_convert_to_webm**
|
227
|
+
> String video_convert_to_webm(input_file, opts)
|
228
|
+
|
229
|
+
Convert Video to WEBM format.
|
230
|
+
|
231
|
+
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. Maximum output file size is 50GB.
|
232
|
+
|
233
|
+
### Example
|
234
|
+
```ruby
|
235
|
+
# load the gem
|
236
|
+
require 'cloudmersive-video-api-client'
|
237
|
+
# setup authorization
|
238
|
+
CloudmersiveVideoApiClient.configure do |config|
|
239
|
+
# Configure API key authorization: Apikey
|
240
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
241
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
242
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
243
|
+
end
|
244
|
+
|
245
|
+
api_instance = CloudmersiveVideoApiClient::VideoApi.new
|
246
|
+
|
247
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
248
|
+
|
249
|
+
opts = {
|
250
|
+
file_url: 'file_url_example', # String | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
|
251
|
+
max_width: 56, # Integer | Optional; Maximum width of the output video, up to the original video width. Defaults to original video width.
|
252
|
+
max_height: 56, # Integer | Optional; Maximum height of the output video, up to the original video width. Defaults to original video height.
|
253
|
+
preserve_aspect_ratio: true, # BOOLEAN | 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.
|
254
|
+
frame_rate: 56, # Integer | Optional; Specify the frame rate of the output video. Defaults to original video frame rate.
|
255
|
+
quality: 56, # Integer | 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.
|
256
|
+
extend_processing_time: true # BOOLEAN | Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes.
|
257
|
+
}
|
258
|
+
|
259
|
+
begin
|
260
|
+
#Convert Video to WEBM format.
|
261
|
+
result = api_instance.video_convert_to_webm(input_file, opts)
|
262
|
+
p result
|
263
|
+
rescue CloudmersiveVideoApiClient::ApiError => e
|
264
|
+
puts "Exception when calling VideoApi->video_convert_to_webm: #{e}"
|
265
|
+
end
|
266
|
+
```
|
267
|
+
|
268
|
+
### Parameters
|
269
|
+
|
270
|
+
Name | Type | Description | Notes
|
271
|
+
------------- | ------------- | ------------- | -------------
|
272
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
273
|
+
**file_url** | **String**| Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB. | [optional]
|
274
|
+
**max_width** | **Integer**| Optional; Maximum width of the output video, up to the original video width. Defaults to original video width. | [optional]
|
275
|
+
**max_height** | **Integer**| Optional; Maximum height of the output video, up to the original video width. Defaults to original video height. | [optional]
|
276
|
+
**preserve_aspect_ratio** | **BOOLEAN**| 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]
|
277
|
+
**frame_rate** | **Integer**| Optional; Specify the frame rate of the output video. Defaults to original video frame rate. | [optional]
|
278
|
+
**quality** | **Integer**| 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]
|
279
|
+
**extend_processing_time** | **BOOLEAN**| Optional; If true, will allow additional processing time for the video file conversion, using one API call per additional minute over the 5 minute default processing time, up to a maximum of 25 total minutes. This is generally necessary for files larger than 500 MB or longer than 30 minutes. | [optional]
|
280
|
+
|
281
|
+
### Return type
|
282
|
+
|
283
|
+
**String**
|
284
|
+
|
285
|
+
### Authorization
|
286
|
+
|
287
|
+
[Apikey](../README.md#Apikey)
|
288
|
+
|
289
|
+
### HTTP request headers
|
290
|
+
|
291
|
+
- **Content-Type**: multipart/form-data
|
292
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
# **video_get_info**
|
297
|
+
> String video_get_info(input_file, opts)
|
298
|
+
|
299
|
+
Get detailed information about a video or audio file
|
300
|
+
|
301
|
+
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.
|
302
|
+
|
303
|
+
### Example
|
304
|
+
```ruby
|
305
|
+
# load the gem
|
306
|
+
require 'cloudmersive-video-api-client'
|
307
|
+
# setup authorization
|
308
|
+
CloudmersiveVideoApiClient.configure do |config|
|
309
|
+
# Configure API key authorization: Apikey
|
310
|
+
config.api_key['Apikey'] = 'YOUR API KEY'
|
311
|
+
# Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
|
312
|
+
#config.api_key_prefix['Apikey'] = 'Bearer'
|
313
|
+
end
|
314
|
+
|
315
|
+
api_instance = CloudmersiveVideoApiClient::VideoApi.new
|
316
|
+
|
317
|
+
input_file = File.new('/path/to/file.txt') # File | Input file to perform the operation on.
|
318
|
+
|
319
|
+
opts = {
|
320
|
+
file_url: 'file_url_example' # String | Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB.
|
321
|
+
}
|
322
|
+
|
323
|
+
begin
|
324
|
+
#Get detailed information about a video or audio file
|
325
|
+
result = api_instance.video_get_info(input_file, opts)
|
326
|
+
p result
|
327
|
+
rescue CloudmersiveVideoApiClient::ApiError => e
|
328
|
+
puts "Exception when calling VideoApi->video_get_info: #{e}"
|
329
|
+
end
|
330
|
+
```
|
331
|
+
|
332
|
+
### Parameters
|
333
|
+
|
334
|
+
Name | Type | Description | Notes
|
335
|
+
------------- | ------------- | ------------- | -------------
|
336
|
+
**input_file** | **File**| Input file to perform the operation on. |
|
337
|
+
**file_url** | **String**| Optional; URL of a video file being used for conversion. Use this option for files larger than 2GB. | [optional]
|
338
|
+
|
339
|
+
### Return type
|
340
|
+
|
341
|
+
**String**
|
342
|
+
|
343
|
+
### Authorization
|
344
|
+
|
345
|
+
[Apikey](../README.md#Apikey)
|
346
|
+
|
347
|
+
### HTTP request headers
|
348
|
+
|
349
|
+
- **Content-Type**: multipart/form-data
|
350
|
+
- **Accept**: application/json, text/json, application/xml, text/xml
|
351
|
+
|
352
|
+
|
353
|
+
|