<p>The method in my comment still stands.</p>

<p>Let's say you have two audio tracks. Basic command syntax is</p>

<pre><code>ffmpeg -i picsou.mp4 \
       -i audio1.wav \
       -i audio2.wav \
       - filter_complex "[1:a]adelay=30000|30000[1a];\
                         [2:a]adelay=35000|35000[2a]" \
      -map 0:v -map "[1a]" -map "[2a]" -c:v copy -shortest \
  out.mxf
</code></pre>

<p>The adelay filter here expects two channels per input stream. Channel delay values are in milliseconds.</p>

<p>On linux / OSX you may have to use single quotes around the arguments.</p>

CC BY-SA 4.0
2018-09-23T10:02:33.353Z
Pro Tools support MXF OPATOM, so you need to precise it with the following parameter `-f mxf_opatom`
Martin Delille
CC BY-SA 4.0
2018-09-23T10:16:32.280Z
Opatom only supports a single stream. In your Q, you state, "*I would like to create a new MXF media with the video file and mixing the audio files at specific timestamp and tracks:*" which can't be done with Op Atom.
Gyan
CC BY-SA 4.0
2018-09-24T11:24:22.133Z
Yes I know. I finally understood that MXF was a dead end and I will need to generate an OMF. I'll test your solution in order to generate a wav in the meantime!
Martin Delille
CC BY-SA 4.0
2018-09-24T11:25:24.710Z
Maybe I should update my question to go back to the audio pcm question if you don't mine?
Martin Delille
CC BY-SA 4.0
2018-09-14T17:45:46.117Z
2018-09-14T17:45:46.117Z
Gyan
<p>I have several media:</p>

<ul>
<li>one video file</li>
<li>several audio files</li>
</ul>

<p>I would like to create a new MXF media with the video file and mixing the audio files at specific timestamp and tracks:</p>

<ul>
<li>Starting time of the video file on the track 0: <code>00:00:00:00</code></li>
<li>Starting time of the audio clip 1 on the track 1: <code>00:00:30:00</code></li>
<li>Starting time of the audio clip 2 on the track 2: <code>00:00:35:00</code></li>
<li>Starting time of the audio clip 3 on the track 2: <code>00:00:45:00</code></li>
<li>...</li>
</ul>

<p>I made a first try with just with one video and one audio. I used the following command:</p>

<pre><code>ffmpeg -y -i picsou.mp4 \
  -itsoffset 2 \
  -i picsou.wav \
  -shortest \
  out.mp4
</code></pre>

<p>Unfortunately, when I import it in <em>Pro Tools</em>, I cannot see the audio.</p>

CC BY-SA 4.0
2018-09-11T14:05:53.257Z
Adapt the method at https://stackoverflow.com/a/48169214/5726027
Gyan
CC BY-SA 4.0
2018-09-11T14:24:41.520Z
@Gyan when I look as the solution you propose, it seems that the `adelay` filter delay the full channel...
Martin Delille
CC BY-SA 4.0
2018-09-11T15:15:18.740Z
Share your command.
Gyan
CC BY-SA 4.0
2018-09-14T16:26:49.080Z
Ok the `-itsoffset` option solved my problem but change a little bit the subject to explain exactly what I want to do: a MXF file.
Martin Delille
CC BY-SA 4.0
2018-09-14T16:59:22.030Z
for *Pro Tools*
Martin Delille
<ffmpeg><timecode>
Create a MXF media with a video and audio clip at specific timing compatible with Pro Tools
Martin Delille
# Create a MXF media with a video and audio clip at specific timing compatible with Pro Tools

(Asked by: username_0 on 2018-09-11)

I have several media:

one video file
several audio files

I would like to create a new MXF media with the video file and mixing the audio files at specific timestamp and tracks:

Starting time of the video file on the track 0: 00:00:00:00
Starting time of the audio clip 1 on the track 1: 00:00:30:00
Starting time of the audio clip 2 on the track 2: 00:00:35:00
Starting time of the audio clip 3 on the track 2: 00:00:45:00
...

I made a first try with just with one video and one audio. I used the following command:
ffmpeg -y -i picsou.mp4 \
  -itsoffset 2 \
  -i picsou.wav \
  -shortest \
  out.mp4

Unfortunately, when I import it in Pro Tools, I cannot see the audio.

**Tags:** ffmpeg, timecode

> **Comments:**
> **username_1**: Adapt the method at https://stackoverflow.com/a/48169214/5726027  
> **username_0**: @username_1 when I look as the solution you propose, it seems that the `adelay` filter delay the full channel...  
> **username_1**: Share your command.  
> **username_0**: Ok the `-itsoffset` option solved my problem but change a little bit the subject to explain exactly what I want to do: a MXF file.  
> **username_0**: for *Pro Tools*  

---

## 1 answers

### Answer by username_1 on 2018-09-14. Score: 1

The method in my comment still stands.
Let's say you have two audio tracks. Basic command syntax is
ffmpeg -i picsou.mp4 \
       -i audio1.wav \
       -i audio2.wav \
       - filter_complex "[1:a]adelay=30000|30000[1a];\
                         [2:a]adelay=35000|35000[2a]" \
      -map 0:v -map "[1a]" -map "[2a]" -c:v copy -shortest \
  out.mxf

The adelay filter here expects two channels per input stream. Channel delay values are in milliseconds.
On linux / OSX you may have to use single quotes around the arguments.

> **Comments:**
> **username_0**: Pro Tools support MXF OPATOM, so you need to precise it with the following parameter `-f mxf_opatom`  
> **username_1**: Opatom only supports a single stream. In your Q, you state, "*I would like to create a new MXF media with the video file and mixing the audio files at specific timestamp and tracks:*" which can't be done with Op Atom.  
> **username_0**: Yes I know. I finally understood that MXF was a dead end and I will need to generate an OMF. I'll test your solution in order to generate a wav in the meantime!  
> **username_0**: Maybe I should update my question to go back to the audio pcm question if you don't mine?  

---

