Essentially a batch application of the following command:
ffmpeg -i "01.mkv" -map 0:a? -map 0:s? -map 0:v -c:v copy -c:a ac3 -c:s copy "test.mkv"
My hope would be to simply run this in a directory and have all the newly fixed files with the old file names and the old files appended with "old_" or something similar. I know next to nothing about bash, but have some experience with c++ and java, so terminology is not an issue, I just have never looked at bash before. Thanks!
EDIT: To be clear, I'd like the new file to be "01.mkv" and the old file to be renamed to "old_01.mkv". My research has told me this will probably require gawk, but I know even less about that than I do bash.
EDIT2: I realize I should have provided what I had been able to put together so far on my own.
#!/bin/bash for i in $( ls ); do ffmpeg -i $i -map 0:a? -map 0:s? -map 0:v -c:v copy -c:a ac3 -c:s copy $i done