<p>You've to reset the timestamps:</p>

<pre><code>[1:a]atrim=start=2.52:end=1:38.0,aloop=100:7700,asetpts=N/SR/TB[audio]
</code></pre>

CC BY-SA 3.0
2017-03-30T15:33:15.613Z
2017-03-30T15:33:15.613Z
Gyan
<p>I have this audio filterchain (for repetitive short part of the original audio):</p>

<pre><code>[1:a] atrim=start=2.52:end=1:38.0, aloop=100:7700 [audio]
</code></pre>

<p>When I used it <em>without</em> video, i. e. in the <code>ffmpeg</code> command I mapped only audio:</p>

<pre><code>-map "[audio]"
</code></pre>

<p>then it fulfilled my intent - it started playing immediately (from <code>0:00</code>)</p>

<p>But when I mapped video, too</p>

<pre><code>-map 0:v -map "[audio]"
</code></pre>

<p>then the audio started at <code>2.52</code> - the same value as in my <code>atrim</code> filter.</p>

<p>(I tried <em>changing</em> this value and the starting time <em>changed appropriately</em>, too.)</p>

<p>What is the reason for it and how I can fix it?</p>

<ffmpeg><sync>
Audio without video is OK, but WITH video it is delayed
MarianD
# Audio without video is OK, but WITH video it is delayed

(Asked by: username_0 on 2017-03-30)

I have this audio filterchain (for repetitive short part of the original audio):
[1:a] atrim=start=2.52:end=1:38.0, aloop=100:7700 [audio]

When I used it without video, i. e. in the ffmpeg command I mapped only audio:
-map "[audio]"

then it fulfilled my intent - it started playing immediately (from 0:00)
But when I mapped video, too
-map 0:v -map "[audio]"

then the audio started at 2.52 - the same value as in my atrim filter.
(I tried changing this value and the starting time changed appropriately, too.)
What is the reason for it and how I can fix it?

**Tags:** ffmpeg, sync


---

## 1 answers

### Answer by username_1 on 2017-03-30. Score: 3 | Accepted answer

You've to reset the timestamps:
[1:a]atrim=start=2.52:end=1:38.0,aloop=100:7700,asetpts=N/SR/TB[audio]


---

