user37404: I want to convert all my mp4 files in a folder into mp3 in a new folder
I've tried something like:
$ffmpeg -i \*.mp4 -vn mp3/\*.mp3

but it didn't work. It involved an infinite loop and my computer didn't respond anymore. Any solution ? Thanks.

user36053: for i in *.mp4; do ffmpeg -i "$i" -f mp3 -ab 192k -vn -ar 44100 -ac 2 aud/"${i%.*}.mp3"; done


vn: disable video recording during the conversion.
ar: set audio sampling rate in Hz.
ab: set the audio bitrate.
ac: set the number of audio channels.
-f: format.
aud: name of the audio folder


37404: <p>I want to convert all my mp4 files in a folder into mp3 in a new folder
I've tried something like:</p>
<pre><code>$ffmpeg -i \*.mp4 -vn mp3/\*.mp3
</code></pre>
<p>but it didn't work. It involved an infinite loop and my computer didn't respond anymore. Any solution ? Thanks.</p>
 36053: <pre><code>for i in *.mp4; do ffmpeg -i &quot;$i&quot; -f mp3 -ab 192k -vn -ar 44100 -ac 2 aud/&quot;${i%.*}.mp3&quot;; done
</code></pre>
<ul>
<li>vn: disable video recording during the conversion.</li>
<li>ar: set audio sampling rate in Hz.</li>
<li>ab: set the audio bitrate.</li>
<li>ac: set the number of audio channels.</li>
<li>-f: format.</li>
<li>aud: name of the audio folder</li>
</ul>
