Win10使用FFmpeg操作Camera(十)

环境:本文以Win10为例。

1.下载
https://ffmpeg.zeranoe.com/builds/

2.配置环境
  ---->计算机
   ---->属性
    ----->高级系统设置
      ----->系统变量
        ----->Path
         ------->新建:添加路径即可:D:\installer\ffmpeg-4.3-win64-static\bin

3.测试
# ffmpeg  -version
ffmpeg version 4.3 Copyright (c) 2000-2020 the FFmpeg developers
built with gcc 9.3.1 (GCC) 20200621
configuration: --enable-gpl --enable-version3 --enable-sdl2 --enable-fontconfig --enable-gnutls --enable-iconv --enable-libass --enable-libdav1d --enable-libbluray --enable-libfreetype --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libopenjpeg --enable-libopus --enable-libshine --enable-libsnappy --enable-libsoxr --enable-libsrt --enable-libtheora --enable-libtwolame --enable-libvpx --enable-libwavpack --enable-libwebp --enable-libx264 --enable-libx265 --enable-libxml2 --enable-libzimg --enable-lzma --enable-zlib --enable-gmp --enable-libvidstab --enable-libvmaf --enable-libvorbis --enable-libvo-amrwbenc --enable-libmysofa --enable-libspeex --enable-libxvid --enable-libaom --enable-libgsm --disable-w32threads --enable-libmfx --enable-ffnvcodec --enable-cuda-llvm --enable-cuvid --enable-d3d11va --enable-nvenc --enable-nvdec --enable-dxva2 --enable-avisynth --enable-libopenmpt --enable-amf
libavutil      56. 51.100 / 56. 51.100
libavcodec     58. 91.100 / 58. 91.100
libavformat    58. 45.100 / 58. 45.100
libavdevice    58. 10.100 / 58. 10.100
libavfilter     7. 85.100 /  7. 85.100
libswscale      5.  7.100 /  5.  7.100
libswresample   3.  7.100 /  3.  7.100
libpostproc    55.  7.100 / 55.  7.100

//查看当前支持音视频设备
# ffmpeg -f dshow -list_devices true -i dummy
[dshow @ 000002998855c180] DirectShow video devices (some may be both video and audio devices)
[dshow @ 000002998855c180]  "Integrated Camera" //Camera
[dshow @ 000002998855c180] DirectShow audio devices
[dshow @ 000002998855c180]  "内装麦克风 (Conexant SmartAudio HD)" //Audio

//预览摄像头
# ffplay -f dshow -video_size 1280x720 -i video="Integrated Camera"

//编码Camera数据保存为mp4
# ffmpeg -f dshow -i video="Integrated Camera" output.mp4

//播放
# ffplay output.mp4

 

你可能感兴趣的:(FFmpeg)