In this little tutorial I show you how to convert mp4 to mp3.
First method:
1 | vlc some-video.mp4 --sout '#transcode{acodec=mp2a, ab=96}:std{access=file, dst= "my_new.mp3", mux=ts}' |
Second one:
Your copy of FFmpeg needs to be capable of outputting mp3:
1 | ffmpeg -formats | grep libmp3lame |
1 | ffmpeg -i 2Invention_Lonely_Star.MP4 -acodec libmp3lame -ab 128k 2Invention.mp3 |
Or a loop for more than one file:
1 | for f in *.mp4; do ffmpeg -i $f -acodec libmp3lame -ab 128k $(echo $f | sed 's/\.mp4$/\.mp3/'); done |
1 | mplayer -ao pcm 2Invention_Star.MP4 -ao pcm:file="2Invention_Star.wav" |
A little convert loop:
1 2 3 4 5 6 7 | #!/bin/bash # # m4a2wav # for i in *.m4a; do mplayer -ao pcm "$i" -ao pcm:file="${i%.m4a}.wav" done |