Answers.Body: <p>This is something that we can't really give an absolute answer because we don't have your inputs and what is "best" will be fairly subjective.</p>
  
  <p>You could just try using the <a href="https://ffmpeg.org/ffmpeg-filters.html#pan" rel="nofollow noreferrer">pan</a> filter with a bigger gain factor for one side. Something like:</p>
  
  <pre><code>pan=stereo|c0=0.8*c0|0.2*c1=c0
  </code></pre>
  
  <p>Depending on your inputs adding <a href="https://ffmpeg.org/ffmpeg-filters.html#adelay" rel="nofollow noreferrer">adelay</a> may make it sound less flat:</p>
  
  <pre><code>pan=stereo|c0=0.8*c0|c1=0.2*c0,adelay=0|10
  </code></pre>
  
  <p>You can use <a href="https://ffmpeg.org/ffmpeg-filters.html#stereotools" rel="nofollow noreferrer">stereotools</a> filter if you prefer as it has many options (I completely forgot about this filter...can't keep up).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-05-19T17:54:54.230Z
Answers.LastActivityDate: 2020-05-19T17:54:54.230Z
Answers.UserDisplayName: llogan
Body: <p>I have a range of mono audio samples and have worked out how to play them at specific time offsets but would like to give some indication of 'where the sound is coming from' I have the x and y centers of each sound source in the frame, is it sufficient to use a slight bias in the pan filter? Or is some element of delay in one channel needed too?</p>
  
  <p>My best guess is passing each of the samples through this:</p>
  
  <p><code>[mono0]pan=stereo|c0=c0|c1=c0,stereotools=balance_out={panpos}[stereo0]</code></p>
  
  <p>where <code>{panpos}</code> is a value -1 = 1 representing the x position.</p>
  
  <p>and them later amerge over them all.</p>
  
Tags: <ffmpeg><audio>
Title: With ffmpeg how do I imply spatial position when mixing mono to stereo
UserDisplayName: Baxter
ThreadText: # With ffmpeg how do I imply spatial position when mixing mono to stereo
  
  (Asked by: username_0 on 2020-05-17)
  
  I have a range of mono audio samples and have worked out how to play them at specific time offsets but would like to give some indication of 'where the sound is coming from' I have the x and y centers of each sound source in the frame, is it sufficient to use a slight bias in the pan filter? Or is some element of delay in one channel needed too?
  
  My best guess is passing each of the samples through this:
  
  `[mono0]pan=stereo|c0=c0|c1=c0,stereotools=balance_out={panpos}[stereo0]`
  
  where `{panpos}` is a value -1 = 1 representing the x position.
  
  and them later amerge over them all.
  
  **Tags:** ffmpeg, audio
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-05-19. Score: 1
  
  This is something that we can't really give an absolute answer because we don't have your inputs and what is "best" will be fairly subjective.
  
  You could just try using the [pan](https://ffmpeg.org/ffmpeg-filters.html#pan) filter with a bigger gain factor for one side. Something like:
  
  ```
  pan=stereo|c0=0.8*c0|0.2*c1=c0
  
  ```
  
  Depending on your inputs adding [adelay](https://ffmpeg.org/ffmpeg-filters.html#adelay) may make it sound less flat:
  
  ```
  pan=stereo|c0=0.8*c0|c1=0.2*c0,adelay=0|10
  
  ```
  
  You can use [stereotools](https://ffmpeg.org/ffmpeg-filters.html#stereotools) filter if you prefer as it has many options (I completely forgot about this filter...can't keep up).
  
  
  ---
  
  