View Single Post
Old 24th December 2020, 17:57   #1  |  Link
For Fun
Registered User
 
Join Date: Oct 2020
Posts: 16
How to BATCH remux combine video and audio to one file?

How can BATCH remux video and audio to one file?

I'm trying this on mine android termux.
So what I'm trying:
1. I want to rip audio from video and convert to wav. ffmpeg -i inp.mkv -map 0:1 audio.wav
2. Extract only video. mkvextract tracks "inp.mkv" 0:video.mkv
3. Remux Combine extracted video and wav audio file. mkvmerge -o final.mkv video.mkv audio.wav

So I have multiple videos from tv show and I want to batch convert the things I mentioned above?

example:
Movie1.mkv and Movie1.wav remux to Movie1.mkv

Movie2.mkv and Movie2.wav remux to Movie2.mkv

And then I want movie1.mkv and movie1.wav files to be deleted and only the combined video and audio file to exist.

I did try myself but I couldn't figure it out further:


Quote:
for f in *.mkv;do ffmpeg -i "$f" -map 0:1 "${f%mkv}wav";done &&

Could I create a new folder and send the converted file to the folder would that do the trick?
İf someone could help I would be appreciated.

Last edited by For Fun; 24th December 2020 at 18:26.
For Fun is offline   Reply With Quote