LiuYuhe

LiuYuhe's xLog

雄关漫道真如铁,而今迈步从头越。
github
follow
email

Use ffmpeg to separate video and audio streams

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
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.