Class: CloudmersiveVideoApiClient::VideoApi
- Inherits:
-
Object
- Object
- CloudmersiveVideoApiClient::VideoApi
- Defined in:
- lib/cloudmersive-video-api-client/api/video_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ VideoApi
constructor
A new instance of VideoApi.
-
#video_convert_to_gif(opts = {}) ⇒ String
Convert Video to Animated GIF format.
-
#video_convert_to_gif_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to Animated GIF format.
-
#video_convert_to_mov(opts = {}) ⇒ String
Convert Video to MOV format.
-
#video_convert_to_mov_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to MOV format.
-
#video_convert_to_mp4(opts = {}) ⇒ String
Convert Video to MP4 format.
-
#video_convert_to_mp4_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to MP4 format.
-
#video_convert_to_still_frames(opts = {}) ⇒ StillFramesResult
Convert Video to PNG Still Frames.
-
#video_convert_to_still_frames_with_http_info(opts = {}) ⇒ Array<(StillFramesResult, Fixnum, Hash)>
Convert Video to PNG Still Frames.
-
#video_convert_to_webm(opts = {}) ⇒ String
Convert Video to WEBM format.
-
#video_convert_to_webm_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Convert Video to WEBM format.
-
#video_cut_video(opts = {}) ⇒ String
Cut a Video to a Shorter Length Cuts a video to the specified start and end times.
-
#video_cut_video_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Cut a Video to a Shorter Length Cuts a video to the specified start and end times.
-
#video_get_info(opts = {}) ⇒ MediaInformation
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.
-
#video_get_info_with_http_info(opts = {}) ⇒ Array<(MediaInformation, Fixnum, Hash)>
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.
-
#video_resize_video(opts = {}) ⇒ String
Resizes a Video Preserving the Original Aspect Ratio.
-
#video_resize_video_simple(opts = {}) ⇒ String
Resizes a Video without Preserving Aspect Ratio.
-
#video_resize_video_simple_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Resizes a Video without Preserving Aspect Ratio.
-
#video_resize_video_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
Resizes a Video Preserving the Original Aspect Ratio.
-
#video_scan_for_nsfw(opts = {}) ⇒ NsfwResult
Scan a Video for NSFW content.
-
#video_scan_for_nsfw_with_http_info(opts = {}) ⇒ Array<(NsfwResult, Fixnum, Hash)>
Scan a Video for NSFW content.
-
#video_split_video(split_time, opts = {}) ⇒ SplitVideoResult
Split a Video into Two Shorter Videos Cuts a video into two videos based on the specified start time.
-
#video_split_video_with_http_info(split_time, opts = {}) ⇒ Array<(SplitVideoResult, Fixnum, Hash)>
Split a Video into Two Shorter Videos Cuts a video into two videos based on the specified start time.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#video_convert_to_gif(opts = {}) ⇒ String
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.
34 35 36 37 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 34 def video_convert_to_gif(opts = {}) data, _status_code, _headers = video_convert_to_gif_with_http_info(opts) data end |
#video_convert_to_gif_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
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.
51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 51 def video_convert_to_gif_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_gif ...' end # resource path local_var_path = '/video/convert/to/gif' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'startTime'] = opts[:'start_time'] if !opts[:'start_time'].nil? header_params[:'timeSpan'] = opts[:'time_span'] if !opts[:'time_span'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_convert_to_gif\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_convert_to_mov(opts = {}) ⇒ String
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.
105 106 107 108 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 105 def video_convert_to_mov(opts = {}) data, _status_code, _headers = video_convert_to_mov_with_http_info(opts) data end |
#video_convert_to_mov_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
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.
121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 121 def video_convert_to_mov_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_mov ...' end # resource path local_var_path = '/video/convert/to/mov' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_convert_to_mov\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_convert_to_mp4(opts = {}) ⇒ String
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.
174 175 176 177 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 174 def video_convert_to_mp4(opts = {}) data, _status_code, _headers = video_convert_to_mp4_with_http_info(opts) data end |
#video_convert_to_mp4_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
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.
190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 190 def video_convert_to_mp4_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_mp4 ...' end # resource path local_var_path = '/video/convert/to/mp4' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_convert_to_mp4\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_convert_to_still_frames(opts = {}) ⇒ StillFramesResult
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.
241 242 243 244 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 241 def video_convert_to_still_frames(opts = {}) data, _status_code, _headers = video_convert_to_still_frames_with_http_info(opts) data end |
#video_convert_to_still_frames_with_http_info(opts = {}) ⇒ Array<(StillFramesResult, Fixnum, Hash)>
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.
255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 255 def video_convert_to_still_frames_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_still_frames ...' end # resource path local_var_path = '/video/convert/to/still-frames' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'framesPerSecond'] = opts[:'frames_per_second'] if !opts[:'frames_per_second'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'StillFramesResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_convert_to_still_frames\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_convert_to_webm(opts = {}) ⇒ String
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.
306 307 308 309 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 306 def video_convert_to_webm(opts = {}) data, _status_code, _headers = video_convert_to_webm_with_http_info(opts) data end |
#video_convert_to_webm_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
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.
322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 322 def video_convert_to_webm_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_convert_to_webm ...' end # resource path local_var_path = '/video/convert/to/webm' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'preserveAspectRatio'] = opts[:'preserve_aspect_ratio'] if !opts[:'preserve_aspect_ratio'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_convert_to_webm\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_cut_video(opts = {}) ⇒ String
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.
372 373 374 375 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 372 def video_cut_video(opts = {}) data, _status_code, _headers = video_cut_video_with_http_info(opts) data end |
#video_cut_video_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
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.
385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 385 def video_cut_video_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_cut_video ...' end # resource path local_var_path = '/video/cut' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'startTime'] = opts[:'start_time'] if !opts[:'start_time'].nil? header_params[:'timeSpan'] = opts[:'time_span'] if !opts[:'time_span'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_cut_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_get_info(opts = {}) ⇒ MediaInformation
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.
430 431 432 433 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 430 def video_get_info(opts = {}) data, _status_code, _headers = video_get_info_with_http_info(opts) data end |
#video_get_info_with_http_info(opts = {}) ⇒ Array<(MediaInformation, Fixnum, Hash)>
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.
441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 441 def video_get_info_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_get_info ...' end # resource path local_var_path = '/video/convert/get-info' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'MediaInformation') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_get_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_resize_video(opts = {}) ⇒ String
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.
489 490 491 492 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 489 def video_resize_video(opts = {}) data, _status_code, _headers = video_resize_video_with_http_info(opts) data end |
#video_resize_video_simple(opts = {}) ⇒ String
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.
558 559 560 561 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 558 def video_resize_video_simple(opts = {}) data, _status_code, _headers = video_resize_video_simple_with_http_info(opts) data end |
#video_resize_video_simple_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
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.
574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 574 def video_resize_video_simple_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_resize_video_simple ...' end # resource path local_var_path = '/video/resize/target' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil? header_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_resize_video_simple\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_resize_video_with_http_info(opts = {}) ⇒ Array<(String, Fixnum, Hash)>
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.
505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 505 def video_resize_video_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_resize_video ...' end # resource path local_var_path = '/video/resize/preserveAspectRatio' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'maxWidth'] = opts[:'max_width'] if !opts[:'max_width'].nil? header_params[:'maxHeight'] = opts[:'max_height'] if !opts[:'max_height'].nil? header_params[:'frameRate'] = opts[:'frame_rate'] if !opts[:'frame_rate'].nil? header_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil? header_params[:'extension'] = opts[:'extension'] if !opts[:'extension'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'String') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_resize_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_scan_for_nsfw(opts = {}) ⇒ NsfwResult
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.
623 624 625 626 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 623 def video_scan_for_nsfw(opts = {}) data, _status_code, _headers = video_scan_for_nsfw_with_http_info(opts) data end |
#video_scan_for_nsfw_with_http_info(opts = {}) ⇒ Array<(NsfwResult, Fixnum, Hash)>
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.
635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 635 def video_scan_for_nsfw_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_scan_for_nsfw ...' end # resource path local_var_path = '/video/scan/nsfw' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json', 'text/json', 'application/xml', 'text/xml']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'framesPerSecond'] = opts[:'frames_per_second'] if !opts[:'frames_per_second'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'NsfwResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_scan_for_nsfw\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#video_split_video(split_time, opts = {}) ⇒ SplitVideoResult
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.
681 682 683 684 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 681 def video_split_video(split_time, opts = {}) data, _status_code, _headers = video_split_video_with_http_info(split_time, opts) data end |
#video_split_video_with_http_info(split_time, opts = {}) ⇒ Array<(SplitVideoResult, Fixnum, Hash)>
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.
694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 |
# File 'lib/cloudmersive-video-api-client/api/video_api.rb', line 694 def video_split_video_with_http_info(split_time, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: VideoApi.video_split_video ...' end # verify the required parameter 'split_time' is set if @api_client.config.client_side_validation && split_time.nil? fail ArgumentError, "Missing the required parameter 'split_time' when calling VideoApi.video_split_video" end # resource path local_var_path = '/video/split' # query parameters query_params = {} # header parameters header_params = {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/octet-stream']) # HTTP header 'Content-Type' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) header_params[:'splitTime'] = split_time header_params[:'fileUrl'] = opts[:'file_url'] if !opts[:'file_url'].nil? header_params[:'timeSpan'] = opts[:'time_span'] if !opts[:'time_span'].nil? # form parameters form_params = {} form_params['inputFile'] = opts[:'input_file'] if !opts[:'input_file'].nil? # http body (model) post_body = nil auth_names = ['Apikey'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => 'SplitVideoResult') if @api_client.config.debugging @api_client.config.logger.debug "API called: VideoApi#video_split_video\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |