ffmpeg + opencv 把摄像头画面保存为mp4文件
生活随笔
收集整理的這篇文章主要介紹了
ffmpeg + opencv 把摄像头画面保存为mp4文件
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
根據 https://stackoverflow.com/questions/46444474/c-ffmpeg-create-mp4-file 修改
運行環境為Ubuntu 20.10
#include <iostream>
#include <sys/time.h>#ifdef __cplusplus
extern "C" {
#endif#include "libavutil/avstring.h"
#include "libavutil/eval.h"
#include "libavutil/mathematics.h"
#include "libavutil/pixdesc.h"
#include "libavutil/imgutils.h"
#include "libavutil/dict.h"
#include "libavutil/parseutils.h"
#include "libavutil/samplefmt.h"
#include "libavutil/avassert.h"
#include "libavutil/time.h"
#include "libavutil/bprint.h"
#include "libavformat/avformat.h"
#include "libavdevice/avdevice.h"
#include "libswscale/swscale.h"
#include "libavutil/opt.h"
#include "libavcodec/avfft.h"
#include "libswresample/swresample.h
總結
以上是生活随笔為你收集整理的ffmpeg + opencv 把摄像头画面保存为mp4文件的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: ffmpeg + opencv 实现视频
- 下一篇: pyinstaller 打包tensor