Concatenate multiple files using FFmpeg I started to learn FFmpeg syntax a couple of days ago.
I'm trying to read the official docs, it's not easy.

So I want to build up a video files which consists of different videos, and audios.
Let's say I have files below.

Video files:


a.mp4
b.mkv


Audio files:


x.wma
y.mp3
z.mp3


I'd like to use specific parts of audio files.
Let's say, 


2s ~ 24 sec from x.wma
1m 22s ~ 1m 41s from y.mp3
29s ~ 2m 33s from z.mp3


Concatenate the selected audio streams into an audio stream.

I'll take the video stream of 2m ~ 2m 32s from a.mp4.

Then video stream is a lot shorter than audio.
(I don't know how much exactly, hopefully FFmpeg can do that for me)

Can FFmpeg do any of the below?


Take the video streams from b.mkv and concatenate it with the video streams from a.mp4, so that resulted video stream is as long as the audio. After that mux the audio and video.
Change the duration of the video stream from a.mp4 so that duration of the video and audio are equal.(by changing playback speed of video stream) then mux the audio and video.
Just insert an image file after video streams ends while audio is being played.


P.S.: I tried to express things clearly, but I'm not so good at English. If there is anything you can't understand clearly, please tell me.
Use the concat filter:

ffmpeg -y -i a.mp4 -ss 2 -t 22 -i x.wma -ss 00:01:22 -t 19 -i y.mp3 -ss 29 -t 124 -i z.mp3 -filter_complex "[1:a][2:a][3:a]concat=n=3:v=0:a=1[a]" -map 0:v -map "[a]" -shortest output.mp4


Alternatively, instead of -ss/-t you can use the atrim and asetpts filters.