废话不多说,直接上代码。 20220519修改,修复了保存的视频在播放器中无法预估总时间的问题。 #include<iostream> extern "C" { /*Include ffmpeg header file*/ #include <libavcodec/avcodec.h>