#!/bin/bash tmp_dir=$1 number_of_files=$2 audio=$3 audio2=$4 if [ $number_of_files != "2" ] then ffmpeg -i $tmp_dir/video/video.mp4 -i $audio -ac 1 -tune stillimage ./out/video-and-audio.mp4 -y else ffmpeg -i $tmp_dir/video/video.mp4 -i $audio -ac 1 -tune stillimage $tmp_dir/video/video_sound_one.mp4 -y ffmpeg -i $tmp_dir/video/video_sound_one.mp4 -i $audio2 -ac 1 -tune stillimage ./out/video-and-audio.mp4 -y fi