<p>Ok, so I figured it out. Turns out you need to apply the "-mix" flag to the SECOND clip, and it will mix between the previous and current clip.</p>

<blockquote>
  <p>melt test1.mp4 in=2340 out=2700 test1.mp4 in=4140 out=4500 -mix 120 -mixer luma test1.mp4 in=5220 out=5580 -mix 120 -mixer luma -blank 1500</p>
</blockquote>

<p>This now works correctly, and adds a fade between the first and second clip, as well as between the second and the third.</p>

CC BY-SA 3.0
2017-08-21T06:32:14.277Z
2017-08-21T06:32:14.277Z
Eunice A
<p>I have a source video file (@60 fps), and a "list" of frames of interest. I'm trying to get a "compilation" of 6 seconds clips (3 before, 3 after the said frame), add a fade in between them and output said video.</p>

<p>This is what I'm currently using:</p>

<blockquote>
  <p>melt test1.mp4 in=2340 out=2700 -mix 120 test1.mp4 in=4140 out=4500 -mix 120 test1.mp4 in=5220 out=5580 -blank 1500 -consumer sdl</p>
</blockquote>

<p>The transition between the first and second clips is done correctly, the one between the 2'nd and 3'rd however is NOT processed.</p>

<p>Any ideas?</p>

<hr>

<p>As a side note, I will have about 10-15 clips per movie, so I plan to move this to either a textfile or xml scheme later, but I'm trying to make this work from the command line for the time being.</p>

<p>Edit: </p>

<p>Ok, so I figured it out. Turns out you need to apply the "-mix" flag to the SECOND clip, and it will mix between the previous and current clip. </p>

<blockquote>
  <p>melt test1.mp4 in=2340 out=2700 test1.mp4 in=4140 out=4500 -mix 120 -mixer luma test1.mp4 in=5220 out=5580 -mix 120 -mixer luma -blank 1500</p>
</blockquote>

<p>This now works correctly, and adds a fade between the first and second clip, as well as between the second and the third.</p>

<video>
Melt transitions from command line
Eunice A
# Melt transitions from command line

(Asked by: username_0 on 2017-08-21)

I have a source video file (@60 fps), and a "list" of frames of interest. I'm trying to get a "compilation" of 6 seconds clips (3 before, 3 after the said frame), add a fade in between them and output said video.

This is what I'm currently using:

> melt test1.mp4 in=2340 out=2700 -mix 120 test1.mp4 in=4140 out=4500 -mix 120 test1.mp4 in=5220 out=5580 -blank 1500 -consumer sdl

The transition between the first and second clips is done correctly, the one between the 2'nd and 3'rd however is NOT processed.

Any ideas?

---

As a side note, I will have about 10-15 clips per movie, so I plan to move this to either a textfile or xml scheme later, but I'm trying to make this work from the command line for the time being.

Edit:

Ok, so I figured it out. Turns out you need to apply the "-mix" flag to the SECOND clip, and it will mix between the previous and current clip.

> melt test1.mp4 in=2340 out=2700 test1.mp4 in=4140 out=4500 -mix 120 -mixer luma test1.mp4 in=5220 out=5580 -mix 120 -mixer luma -blank 1500

This now works correctly, and adds a fade between the first and second clip, as well as between the second and the third.

**Tags:** video


---

## 1 answers

### Answer by username_0 on 2017-08-21. Score: 1

Ok, so I figured it out. Turns out you need to apply the "-mix" flag to the SECOND clip, and it will mix between the previous and current clip.

> melt test1.mp4 in=2340 out=2700 test1.mp4 in=4140 out=4500 -mix 120 -mixer luma test1.mp4 in=5220 out=5580 -mix 120 -mixer luma -blank 1500

This now works correctly, and adds a fade between the first and second clip, as well as between the second and the third.


---

