The video contains video stream and audio stream. If a video only has a video stream, then there will be only video without sound, and vice versa.
View the two streams in the video#
ffmpeg -i test.mp4
Using parameters -vcodec copy -an and -acodec copy -vn can separate the video stream and audio stream.
Separate the video#
ffmpeg -i test.mp4 -vcodec copy -an output.mp4
Separate the audio#
ffmpeg -i test.mp4 -acodec copy -vn output.aac
Directly transcode the video to mp3 format#
ffmpeg -i test.mp4 output.mp3