Support for multiple audio encoding modes when using segmented encoding#48
Open
grusell wants to merge 6 commits intosvt:masterfrom
Open
Support for multiple audio encoding modes when using segmented encoding#48grusell wants to merge 6 commits intosvt:masterfrom
grusell wants to merge 6 commits intosvt:masterfrom
Conversation
…en using segmented encoding This feature can be enabled for a job by setting 'segmentedEncodingEnabledForAudio' to 'false' for the job. If this property is not set for a job, the default value from the configuration property 'encore-settings.encoding.segmentedEncoding.enabledForAudio' will be used. This property defaults to false, which means the default behaviour is to use segemented encoding also for audio. Refs: svt#41 Signed-off-by: Gustav Grusell <gustav.grusell@eyevinn.se>
Signed-off-by: Gustav Grusell <gustav.grusell@eyevinn.se>
Signed-off-by: Gustav Grusell <gustav.grusell@eyevinn.se>
Signed-off-by: Gustav Grusell <gustav.grusell@eyevinn.se>
Introduces support for encoding audio separately from video in segments, enabling better parallelization and throughput for large files. There are now three modes for audio encoding when using segmented encoding: 1. ENCODE_WITH_VIDEO (default) -Audio is encoded together with each video segment 2. ENCODE_SEPARATELY_FULL - Audio is encoded once as a complete file, then muxed with video segments 3. ENCODE_SEPARATELY_SEGMENTED - Audio is split into segments and encoded in parallel with video 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. Segmented audio encode is only supported for aac and libfdk_aac codecs. Signed-off-by: Gustav Grusell <gustav.grusell@eyevinn.se>
Errors during job initialization were previously not handled, which could result in a job being stuck in QUEUED state forever. Specifically, a job with an invalid/unknown profile would be stuck in this state. This fix now correcly handles error in these cases and sets the job status to FAILED. Signed-off-by: Gustav Grusell <gustav.grusell@eyevinn.se>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.