Simple remix or mashup by reducing the volume
To overlap the last 10 seconds of dream.v.0.9.r.9.mp
3
with the first 10 seconds of dream.v.1.5.r.9.a.mp
3
, you can use the following ffmpeg
script:
# Go to the directory
cd /media/backup_005_3/music.mp3.etc.no.video.ws/music.mp3.etc/dream/remix.meshap.01
# Step 1: Extract the main portion of file1 (excluding the last 10 seconds)
ffmpeg -i dream.v.0.9.r.9.mp3 -t $(ffmpeg -i dream.v.0.9.r.9.mp3 2>&1 | grep Duration | cut -d ' ' -f 4 | sed s/,// | awk -F: '{ print ($1 * 3600) + ($2 * 60) + $3 - 10 }') -y dream.v.0.9.r.9.main.mp3
# Step 2: Extract the last 10 seconds of file1 with a fade-out effect
ffmpeg -sseof -10 -i dream.v.0.9.r.9.mp3 -af "afade=t=out:st=0:d=10" -y dream.v.0.9.r.9.last10sec.fadeout.mp3
# Step 3: Extract the first 10 seconds of file2 with a fade-in effect
ffmpeg -t 10 -i dream.v.1.5.r.9.a.mp3 -af "afade=t=in:ss=0:d=10" -y dream.v.1.5.r.9.a.first10sec.fadein.mp3
# Step 4: Concatenate file1 main part, overlap last 10 seconds of file1 with first 10 seconds of file2, then rest of file2
ffmpeg -i dream.v.0.9.r.9.main.mp3 -i dream.v.0.9.r.9.last10sec.fadeout.mp3 -i dream.v.1.5.r.9.a.first10sec.fadein.mp3 -i dream.v.1.5.r.9.a.mp3 \
-filter_complex "[1:a][2:a]amix=inputs=2:duration=shortest[aoverlap];[0:a][aoverlap][3:a]concat=n=3:v=0:a=1" -y remix_output.mp3
Explanation:
Step 1: Extracts the main portion of
dream.v.0.9.r.9.mp
3
, excluding the last 10 seconds.Step 2: Extracts and fades out the last 10 seconds of
dream.v.0.9.r.9.mp
3
.Step 3: Extracts and fades in the first 10 seconds of
dream.v.1.5.r.9.a.mp
3
.Step 4: Mixes the faded-out last 10 seconds of
dream.v.0.9.r.9.mp
3
with the faded-in first 10 seconds ofdream.v.1.5.r.9.a.mp
3
, then concatenates them with the main portion ofdream.v.0.9.r.9.mp
3
and the rest ofdream.v.1.5.r.9.a.mp
3
.
This should create a smooth overlap and output a seamless remix_
output.mp
3
.
Subscribe to my newsletter
Read articles from user1272047 directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by