Jason Smith
Jason Smith

Reputation: 1

Script to bulk merge audio and a video+audio file

I have a folder with 52 video+audio files (m3u8 extn) and 52 audio files (different language)(m4a extn) The names of the files are same abcde.m3u8(video) abcde.m4a(that other language audio only file)

i want to merge them so i have a single file Video+auido1+audio2 and i don't to lose any quality in the merging process

What would be the bash/ffmpeg command to do so?

Thanks a lot

Upvotes: 0

Views: 499

Answers (1)

Ph3n0x
Ph3n0x

Reputation: 306

Something like :

for f in *.m3u8
do
    basename="${f%.*}"
    ffmpeg -i "${basename}.m3u8" -i "${basename}.m4a" -c copy "${basename}.mkv"
done

Are you sure the m3u8 files contain actual video frames?

Upvotes: 1

Related Questions