filestack/filestack-php

View on GitHub
docs/classes/Filestack_Filelink/convertAudio.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::convertAudio</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">convertAudio</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#line317">Source</a>
          </li>
        </ul>
      </nav>
      <section>
        <h1><small>Filestack\Filelink::</small>convertAudio</h1>
        <h4>Convert this filelink to another audio format.  You can setup webhooks to notify you when the transcoding has completed. See our online documentation for more details: https://www.filestack.com/docs/audio-transformations</h4>
        <p/>
        <ul/>
        <h2 id="signature">Signature</h2>
        <div class="styled synopsis">
          <code>public function convertAudio(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, hls, mp3, m4a, oga)</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/>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 audio 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 audio<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/>filename: Set the filename of the audio file<br/>that is generated by the transcoding process.<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.</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>