音视频 ffmpeg命令提取音视频数据

保留封装格式

ffmpeg -i test.mp4 -acodec copy -vn audio.mp4
ffmpeg -i test.mp4 -vcodec copy -an video.mp4

提取视频

保留编码格式:ffmpeg -i test.mp4 -vcodec copy -an test_copy.h264
强制格式:ffmpeg -i test.mp4 -vcodec libx264 -an test.h264

提取音频

保留编码格式:ffmpeg -i test.mp4 -acodec copy -vn test.aac
强制格式:ffmpeg -i test.mp4 -acodec libmp3lame -vn test.mp3

推荐一个零声学院项目课,个人觉得老师讲得不错,分享给大家:
零声白金学习卡(含基础架构/高性能存储/golang云原生/音视频/Linux内核)
https://xxetb.xet.tech/s/VsFMs

猜你喜欢

转载自blog.csdn.net/qq_40135848/article/details/132590055