ffmpeg -i mad-principio_peter.mp4 -vn -y out1.mp3 #9M
ffmpeg -i mad-principio_peter.mp4 -f mp3 -ab 192000 -vn out2.mp3 #14M
ffmpeg -i mad-principio_peter.mp4 -f mp3 -ab 128000 -vn out3.mp3 #9M
ffmpeg -i mad-principio_peter.mp4 -vn -acodec libmp3lame out4.mp3 #9M
ffmpeg -i mad-principio_peter.mp4 -acodec libmp3lame -ab 128k out5.mp3 #9M
ffmpeg -i gym.mp4 -f webm -c:v libvpx -b:v 1M -acodec libvorbis gym.webm -hide_banner
Second
ffmpeg -i sample.avi -q:a 0 -map a sample.mp3 #complete
ffmpeg -i sample.avi -ss 00:03:05 -t 00:00:45.0 -q:a 0 -map a sample.mp3
#fraction
Parameters :
-q:a 0
for variable bit rate
-ss
starting timestamp
-t
the encoding time (If you don't specify, it will go to the end)
-map 0:a:3
selects audio stream #4 (ffmpeg
starts counting from 0)
** specific the timestamps in HH:MM:SS.xxx format.
References:
[1] https://json2video.com/how-to/ffmpeg-course/ffmpeg-extract-audio.html