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