Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-30T15:33:15.613Z
Answers.LastActivityDate: 2017-03-30T15:33:15.613Z
Answers.UserDisplayName: Gyan
Body: <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>
  
Tags: <ffmpeg><sync>
Title: Audio without video is OK, but WITH video it is delayed
UserDisplayName: MarianD
ThreadText: # 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]
  
  ```
  
  
  ---
  
  