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:

I want to rip audio from video and convert to wav. ffmpeg -i inp.mkv -map 0:1 audio.wav
Extract only video. mkvextract tracks &quot;inp.mkv&quot; 0:video.mkv
Remux Combine extracted video and wav audio file. mkvmerge -o final.mkv video.mkv audio.wav

UPDATE
I Have found the command Solved myself

for f in .mkv;do ffmpeg -i &quot;$f&quot; -map 0:1 &quot;${f%mkv}wav&quot;;done &amp;&amp; for i in .mkv; do mkdir -p &quot;${i%.}&quot; &amp;&amp; mkvmerge -o &quot;${i%.}/${i%.}.mkv&quot; -A &quot;$i&quot; &quot;${i%.}.wav&quot;; done

Another Question
How can I batch convert ssa to srt and send it to folder and also give subtitle the same name as video?
for f in .mkv;do ffmpeg -i &quot;$f&quot; -map 0:1 &quot;${f%mkv}wav&quot;;done &amp;&amp; for i in .mkv; do mkdir -p &quot;${i%.}&quot; &amp;&amp; mkvmerge -o &quot;${i%.}/${i%.}.mkv&quot; -A &quot;$i&quot; &quot;${i%.}.wav&quot;; done &amp;&amp; for f in *.ass;do ffmpeg -i &quot;$f&quot; &quot;${f%ass}srt&quot;;done
for f in .mkv;do ffmpeg -i &quot;$f&quot; -map 0:1 &quot;${f%mkv}wav&quot;;done &amp;&amp; for i in .mkv; do mkdir -p &quot;${i%.}&quot; &amp;&amp; mkvmerge -o &quot;${i%.}/${i%.}.mkv&quot; -A &quot;$i&quot; &quot;${i%.}.wav&quot;; done