0

I have a bunch of mkv files that I'm trying to convert their audio while copying the video with this command:

for %i in (*.mkv) do ffmpeg -i "%i" -c:a aac -ar 44100 -b:a 128k -c:v copy "?"

I want ffmpeg to rename the output files into either "output1.mkv" "output2.mkv" etc or to copy the source names and add converted to them, for example, "X.mkv" into "X converted.mkv" etc.

1 Answer 1

0

Since you've used %i as your variable with for,

%~ni = File name
%~xi = File extension
(See for /? for more.)

So use "%~ni converted%~xi".

1
  • Thank you, this copies the name and adds converted but what if I want the output to be output1.mkv output2.mkv our 1.mkv 2.mkv etc?. Commented Nov 6, 2020 at 15:24

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .