Support for multiple audio encoding modes when using segmented encoding #48
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds support for two new modes for audio encoding when using segmented encoding:
There are now three modes for audio encoding when using segmented encoding:
Audio encoding mode can be selected with the 'encoreJob.audioEncodingMode' property. A default value, used when the property is not specified on the job, can be configured with the 'encore-settings.encoding.segmented-encoding.audio-encoding-mode' property.
For segmented audio encode, audio segment length can be configured with the property 'encoreJob.audioSegmentLength' . Note that the segment length needs to be a multiple of the audio frame duration for proper encoding. If audio segment length is not specified, a suitable segment length close to 256s will be calculated.
To avoid priming samples causing artifacts when stitching the encoded audio segments together, each audio segment will be encoded with a duration slightly longer than the audio segment length. Each segment is extended with a duration of twice the duration of one audio frame is at the beginning and end. This extra 'padding' is removed during the joining of the segments.
Segmented audio encode is only supported for aac and libfdk_aac codecs.