user34800: I have a folder of video files listing:
1H.mp4;
1L.mp4;
2H.mp4;
2L.mp4;
....
The sounds are unbalanced for two ears - it is probably due to the recording is stereo.  How can I change the audio tracks from stereo to mono for all the video files?
I assume the workflow would be extract (copy) the audio tracks out, change to mono, then insert (copy) back. I have found codes for individual files, but with hundreds of such short mp4 files, I'd like to know if I can use a 'loop' to deal with them all.
Thank you!

user35763: No need to extract, you can downmix two audio channels and keep video channel and generate a new file in one command.
ffmpeg -i input.mp4 -c:v copy -ac 1 mono-output.mp4

Here -ac 1 says 1 audio channel, downmixed from stereo, look in ffmpeg docs.
Now make a loop. Assuming you are using bash or similar unix shell
for i in *.mp4; do ffmpeg -i $i -c:v copy -ac 1  mono-$i; done


34800: <p>I have a folder of video files listing:</p>
<p>1H.mp4;
1L.mp4;
2H.mp4;
2L.mp4;
....</p>
<p>The sounds are unbalanced for two ears - it is probably due to the recording is stereo.  How can I change the audio tracks from stereo to mono for all the video files?</p>
<p>I assume the workflow would be extract (copy) the audio tracks out, change to mono, then insert (copy) back. I have found codes for individual files, but with hundreds of such short mp4 files, I'd like to know if I can use a 'loop' to deal with them all.</p>
<p>Thank you!</p>
 35763: <p>No need to extract, you can downmix two audio channels and keep video channel and generate a new file in one command.</p>
<pre><code>ffmpeg -i input.mp4 -c:v copy -ac 1 mono-output.mp4
</code></pre>
<p>Here <code>-ac 1</code> says 1 audio channel, downmixed from stereo, look in <a href="https://trac.ffmpeg.org/wiki/AudioChannelManipulation" rel="nofollow noreferrer">ffmpeg docs</a>.
Now make a loop. Assuming you are using bash or similar unix shell</p>
<pre><code>for i in *.mp4; do ffmpeg -i $i -c:v copy -ac 1  mono-$i; done
</code></pre>
