UNA
BxDolTranscoderAudio Class Reference
Inheritance diagram for BxDolTranscoderAudio:
BxDolTranscoderVideo iBxDolFactoryObject BxDolTranscoder iBxDolFactoryObject BxDolFactory iBxDolFactoryObject

Public Member Functions

 isMimeTypeSupported ($sMimeType)
 
- Public Member Functions inherited from BxDolTranscoderVideo
 isMimeTypeSupported ($sMimeType)
 
 getFileUrlNotReady ($mixedHandler)
 
 getSize ($sFile)
 
- Public Member Functions inherited from BxDolTranscoder
 onDeleteFileLocal ($iFileId)
 
 onDeleteFileOrig ($mixedHandler)
 
 registerHandlers ()
 
 unregisterHandlers ()
 
 cleanup ()
 
 getStorage ()
 
 getDb ()
 
 isMimeTypeSupported ($sMimeType)
 
 getFileUrl ($mixedHandler)
 
 getFileUrlById ($mixedHandler)
 
 isFileReady ($mixedHandler, $isCheckOutdated=true)
 
 transcode ($mixedHandler, $iProfileId=0)
 
 prune ()
 
 getFileUrlNotReady ($mixedHandler)
 
 getFilterParams ($sName)
 

Protected Member Functions

 applyFilter_Mp3 ($sFile, $aParams)
 
- Protected Member Functions inherited from BxDolTranscoderVideo
 applyFilter_Poster ($sFile, $aParams)
 
 applyFilter_Mp4 ($sFile, $aParams)
 
 applyFilter_Webm ($sFile, $aParams)
 
 _convertVideo ($sFile, $sFileOut, $sExt, $aParams, $aOptions)
 
 _getOptionSizeForVideo ($sFile, $aParams)
 
- Protected Member Functions inherited from BxDolTranscoder
 __construct ($aObject, $oStorage)
 

Additional Inherited Members

- Static Public Member Functions inherited from BxDolTranscoder
static getObjectInstance ($sObject)
 
static pruning ()
 
static processQueue ($bQueuePruning=true)
 
static processCompleted ()
 
static registerHandlersArray ($mixed)
 
static registerHandlersSystem ()
 
static unregisterHandlersArray ($mixed)
 
static cleanupObjectsArray ($mixed)
 
static onAlertResponseFileDeleteLocal ($oAlert, $sObject)
 
static onAlertResponseFileDeleteOrig ($oAlert, $sObject)
 
- Static Protected Member Functions inherited from BxDolTranscoder
static getTranscoderObjects ()
 

Detailed Description

This class transcodes audio files.

To generate audio which plays in all moders browsers, you need to generate .mp3 audio. Audio is converting upon first access, so it is probably better to force audio conversion by calling

See also
BxDolTranscoderAudio::getFileUrl just after video uploading. Audio for conversion is queued and when cron is run video conversion is performed.

Transcoder object and other params are the same as in

See also
BxDolTranscoderImage, but it is highly recommended to disable 'atime_pruning' and 'atime_tracking', or set it to fairly big value, since audio transcoding is not performed on the fly and takes some time.

Available filters:

  • Mp3 - this filter convert audio into .mp3 format, the parameters are the following:
    • audio_bitrate - audio bitrate in kb (128k by default)
    • ffmpeg_options - additional command line options for ffmepeg, as key => value array (empty by default)

Example of usage:

// transcoder object which generate .mp3 file
$oTranscoderMp3 = BxDolTranscoder::getObjectInstance('bx_audio_mp3');
// make sure to call it only once (for example: during module installation), before the first usage, no need to call it every time
$oTranscoderMp3->registerHandlers();
// get URLs of transcoded videos and video thumbnail, 33 is ID of original video file stored in specified storage object
$sUrlMp3 = $oTranscoderMp3->getFileUrl(33);
echo 'My voice: <audio controls><source src="' . $sUrlMp3 . '" type="audio/mpeg"></audio>';

Also

See also
transcoder_audio sample for complete example.

Member Function Documentation

◆ applyFilter_Mp3()

BxDolTranscoderAudio::applyFilter_Mp3 (   $sFile,
  $aParams 
)
protected

Convert video to .mp4 format

◆ isMimeTypeSupported()

BxDolTranscoderAudio::isMimeTypeSupported (   $sMimeType)

check if transcoder suppors given file mime type


The documentation for this class was generated from the following file: