filestack/filestack-php

View on GitHub
docs/classes/Filestack_Filelink/convertVideo.html

Summary

Maintainability
Test Coverage
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html SYSTEM "about:legacy-compat">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
  <head>
    <title>phpDox - Filestack\Filelink::convertVideo</title>
    <link rel="stylesheet" type="text/css" href="../../css/style.css" media="screen"/>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
  </head>
  <body>
    <nav class="topnav">
      <ul>
        <li>
          <div class="logo"><span>/**</span>phpDox</div>
        </li>
        <li class="separator">
          <a href="../../index.html">Overview</a>
        </li>
        <li class="separator">
          <a href="../../namespaces.html">Namespaces</a>
        </li>
        <li>
          <a href="../../classes.html">Classes</a>
        </li>
        <li>
          <a href="../../traits.html">Traits</a>
        </li>
        <li class="separator">
          <a href="../../source/index.html">Source</a>
        </li>
      </ul>
    </nav>
    <div id="mainstage">
      <div class="box">
        <ul class="breadcrumb">
          <li>
            <a href="../../index.html">Overview</a>
          </li>
          <li class="separator">
            <a href="../../classes.html">Classes</a>
          </li>
          <li class="separator">
            <a href="../../classes.html#Filestack">Filestack</a>
          </li>
          <li class="separator">
            <a title="Filestack\Filelink" href="../../classes/Filestack_Filelink.html">Filelink</a>
          </li>
          <li class="separator">convertVideo</li>
        </ul>
      </div>
      <nav class="box">
        <ul>
          <li>
            <a href="#introduction">Introduction</a>
          </li>
          <li>
            <a href="#synopsis">Synopsis</a>
          </li>
          <li>
            <a href="#parameter">Parameter</a>
          </li>
          <li>
            <a href="#return">Return</a>
          </li>
          <li>
            <a href="#throws">Throws</a>
          </li>
          <li>
            <a href="#tests">Tests</a>
          </li>
          <li>
            <a href="../../source/Filelink.php.html#line523">Source</a>
          </li>
        </ul>
      </nav>
      <section>
        <h1><small>Filestack\Filelink::</small>convertVideo</h1>
        <h4>Convert this filelink to another video format.</h4>
        <p>You can setup webhooks to notify you when the transcoding has completed.
See our online documentation for more details:
https://www.filestack.com/docs/video-transformations</p>
        <ul/>
        <h2 id="signature">Signature</h2>
        <div class="styled synopsis">
          <code>public function convertVideo(string
        $format,
            [array
        $options = ,
            [boolean
        $force = false]] )
            </code>
        </div>
        <h2 id="parameterlist">Parameters</h2>
        <dl class="styled">
          <dt><code>$format</code>
                —
                string</dt>
          <dd>The format to which you would like to<br/>convert to. e.g (aac, h264, h264.hi,<br/>hls.variant, hls.variant.audio, m4a, mp3,<br/>                             oga, ogg, ogg.hi, webm, webm.hi)</dd>
          <dt><code>$options</code>
                —
                array</dt>
          <dd>Array of options.<br/>access: public or private<br/>Indicates that the file should be stored in<br/>a way that allows public access going directly<br/>to the underlying file store. For instance,<br/>if the file is stored on S3, this will allow<br/>the S3 url to be used directly. This has no<br/>impact on the ability of users to read from<br/>the Filestack file URL. Defaults to 'private'.<br/>aspect_mode: set the aspect mode (default: letterbox)<br/>'preserve` - Original size and ratio is preserved.<br/>'constrain' - Aspect ratio is maintained,<br/>No black bars are added to the output.<br/>'crop' - Fills frame size and crops the rest<br/>'letterbox' - Adds black bars to defined height<br/>'pad' - Adds black bars to output to match<br/>defined frame size<br/>audio_bitrate: Sets the audio bitrate for the<br/>audio file that is generated by the transcoding<br/>process. Must be an integer between 0 and 999.<br/>audio_channels: Set the number of audio channels<br/>for the audio file that is generated by the<br/>transcoding process. Can be an integer between<br/>1 and 12. Default is same as source audio.<br/>audio_sample_rate: Set the audio sample rate<br/>for the audio file that is generated by the<br/>transcoding process. Can be an integer between<br/>0 and 99999. Default is 44100.<br/>clip_length: Set the length of the video file<br/>that is generated by the transcoding process.<br/>Format is hours:minutes:seconds e.g. (00:00:20)<br/>clip_offset: Set the point to begin the video<br/>clip from. For example, clip_offset:00:00:10<br/>will start the audio transcode 10 seconds<br/>into the source audio file. Format is<br/>hours:minutes:seconds, e.g. (00:00:10)<br/>container: The bucket or container in the specified<br/>file store where the file should end up.<br/>extname: Set the file extension for the audio<br/>file that is generated by the transcoding<br/>process, e.g. ('.mp4', '.webm')<br/>fps: Specify the frames per second of the video<br/>that is generated by the transcoding process.<br/>Must be an integer between 1 and 300 Default<br/>is to copy the original fps of the source file.<br/>filename: Set the filename of the audio file<br/>that is generated by the transcoding process.<br/>keyframe_interval: Adds a key frame every 250<br/>frames to the video that is generated by the<br/>transcoding process. Default is 250.<br/>location: The custom storage service to store<br/>the converted file to, options incude 'S3',<br/>'azure', 'gcs', 'rackspace', and 'dropbox'<br/>path: The path to store the file at within the<br/>specified file store. For S3, this is the<br/>key where the file will be stored at. By<br/>default, Filestack stores the file at the<br/>root at a unique id, followed by an underscore,<br/>followed by the filename, for example<br/>"3AB239102DB_myaudio.mp3"<br/>title: Set the title in the file metadata.<br/>two_pass: Specify that the transcoding process<br/>should do two passes to improve video quality.<br/>Defaults to false.<br/>width: Set the width in pixels of the video<br/>that is generated by the transcoding process.<br/>height: Set the height in pixels of the video<br/>that is generated by the transcoding process.<br/>upscale: Upscale the video resolution to match<br/>your profile. Defaults to true.<br/>video_bitrate: Specify the video bitrate for<br/>the video that is generated by the transcoding<br/>process. Must be an integer between 1 and 5000.<br/>watermark_bottom: The distance from the bottom<br/>of the video frame to place the watermark<br/>on the video. (0 to 9999)<br/>watermark_left: The distance from the left side<br/>of the video frame to place the watermark<br/>on the video. (0 to 9999)<br/>watermark_right: The distance from the left side<br/>of the video frame to place the watermark<br/>on the video. (0 to 9999)<br/>watermark_left: The distance from the top * of the video frame to place the watermark<br/>on the video. (0 to 9999)<br/>watermark_width: Resize the width of the watermark<br/>watermark_height: Resize the height of the watermark<br/>watermark_url: The Filestack handle or URL of<br/>the image file to use as a watermark on the<br/>                               transcoded video.</dd>
          <dt><code>$force</code>
                —
                boolean</dt>
          <dd>set to true to restart completed<br/>or pending audio encoding if a transcoding<br/>                             fails, and you make the same request again</dd>
        </dl>
        <h2 id="return">Returns</h2>
        <dl class="styled">
          <dt>string</dt>
          <dd>(uuid of conversion task)</dd>
        </dl>
        <h2 id="throws">Errors/Exceptions</h2>
        <dl class="styled">
          <dt>
            <code>
              <a title="Filestack\FilestackException" href="../../classes/Filestack_FilestackException.html">FilestackException</a>
            </code>
          </dt>
          <dd>if API call fails, e.g 404 file not found</dd>
        </dl>
        <h2 id="tests">Test Coverage</h2>
        <div class="styled">
          <h3>Information</h3>
          <ul class="styled">
            <li>Coverage: / Lines (%)</li>
            <li>Tests: 0</li>
            <li>Passed: 0 (0%)</li>
          </ul>
        </div>
      </section>
    </div>
    <footer>
      <span>Generated using phpDox 0.12.0 - Copyright (C) 2010 - 2020 by Arne Blankerts and Contributors</span>
    </footer>
  </body>
</html>