Skip to content

when encoding sources with opus audio, av1an doesnt re-apply the -7ms shift opus has, resulting in all non-video tracks being shifted forward by 7ms #1226

@ItachiUchiha-IU

Description

@ItachiUchiha-IU

when encoding a source with an opus audio track,
av1an doesnt re-apply (or resets because it doesnt like negative values? idk) the -7ms shift opus has by default (the initial padding, the pre-skip of 7ms), resulting in all non-video tracks being shifted forward by 7ms (idk if it's mkvmerge or av1an again that shifts all other tracks to keep them in sync with the shifted opus track, probably mkvmerge? idk, anyway the issue is in the opus track being shifted to begin with)
(encode left, source right)
audio:
Image
subs:
Image


the worst outcomes are that:
if the very first chapter starts at 0, it will be shifted by those 7ms and cause an empty chapter at the beginning of the video:
Image

at the same time, if the video has not perfectly synced subs, it will start shifting some subtitle lines by 1 whole frame, and if the video has 144fps or more, the audio too


in other words, if I remove the audio track before encoding, or if I use a vpy input to encode (which currently discards anything if not the video), av1an will avoid this shifting issue completely because the opus track with -7ms delay is not present and will merge everything correctly, and then by merging the opus audio track separately with mkvmerge the -7ms delay will be correctly re-applied by mkvmerge to the opus track while avoiding shifting the other tracks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions