FFmpeg can do your work as well. FFmpeg is a computer program that can record, convert and stream digital audio and video in numerous formats. FFmpeg is a command line tool that is composed of a collection of free software / open source libraries. It includes libavcodec, an audio/video codec library used by several other projects, and libavformat, an audio/video container mux and demux library.
For the audio:
For the video:
ffmpeg -i input.mp4 output.wav
ffmpeg -i input.mp4 -sameq output.m2v