FFmpeg com certeza.
FFmpeg is a complete, cross-platform solution to record, convert and stream audio and video.
FFmpeg is free software licensed under the LGPL or GPL depending on your choice of configuration options. If you use FFmpeg or its constituent libraries, you must adhere to the terms of the license in question. You can find basic compliance information and get licensing help on our license and legal considerations page.
Execute algo como isto (existe uma grande variedade de opções de configuração disponíveis, mas isto irá ajudá-lo):
ffmpeg -i in.mp4 out.mp3