packages/docs/docs/audio/order-of-operations.mdx
import Tabs from '@theme/Tabs'; import TabItem from '@theme/TabItem'; import {AvailableFrom} from '../../src/components/AvailableFrom';
Since Remotion v4.0.141, the order of operations is guaranteed to be the following for <Video>, <Audio>, <Html5Audio>, <Html5Video> and <OffthreadVideo>, :
trimBefore).<Sequence>).playbackRate).Example for a 30 FPS composition which is 60 frames long:
<Audio> tag has a trimBefore value of 45. The first 1.5 seconds of the audio get trimmed off.<Audio> tag is in a <Sequence> which starts at 30. The audio only begins playing at the 1.0 second timeline mark at the 1.5 second audio position.<Audio> has a playbackRate of 2. The audio gets sped up by 2x, but the starting position and start offset is not affected.(comp_duration - offset) * playback_rate + start_from
(60 - 30) * 2 + 45 => frame 105 or the 3.5 second mark