Create separate audio file using a video
As more people consume their media from more devices, it becomes important to have your content available across multiple mediums to make it easy for your users to consume. Often times, your audio can be an important part of your video which can be streamed separately from the video.
Using Qencode, you can easily create separate files using the audio tracks in your videos.
To create an audio output from a video, set the value of the output attribute in the format object to the format of the audio ouput (example: "mp3").
Example:
{
"output": "mp3",
"audio_bitrate": 192
}
You can also create HLS outputs with a single audio stream, set the value of the output attribute in the format object as "hls_audio". You also can use audio-only input as a source.
Example:
{
"output": "hls_audio",
"audio_codec": "libfdk_aac",
"audio_bitrate": 128
}
You can fine tune audio settings using the following attributes as part of the format object. You can find a list of attributes below:
audio_codec | optional Output file audio codec. When creating audio only outputs you can specify this for HLS audio outputs only. Defaults to aac. You can also use libfdk_aac which stands for Fraunhofer FDK AAC. |
audio_bitrate | optional Output file audio bitrate value in kbps. Defaults to 64. |
audio_sample_rate | optional Output file audio sample rate. Defaults to 44100. |
audio_channels_number | optional Output file audio channels number. Default value is 2. |
Example
{
"output": "mp3",
"destination": {
"url":"s3://s3.us-east-1.amazonaws.com/yourbucket/output.mp3",
"key":"abcde12345",
"secret":"abcde12345",
"permissions": "public-read"
},
"audio_bitrate": 128,
"audio_sample_rate" : "44100",
"audio_channels_number" : "2"
}
Creating audio clips with start_time and duration attributes is also supported.