gpt4 book ai didi

python - OpenCV:FFMPEG:标签 0x34363268/'h264' 不支持编解码器

转载 作者:行者123 更新时间:2023-12-02 16:21:11 26 4
gpt4 key购买 nike

在 Mac OS 10.13.6 上安装 opencv 后:

conda install -c conda-forge ffmpeg
conda install -c conda-forge opencv

并使用 fourcc = cv2.VideoWriter_fourcc('h', '2', '6', '4')在录像机

我得到错误:
OpenCV: FFMPEG: tag 0x34363268/'h264' is not supported with codec id 27 and format 'mp4 / MP4 (MPEG-4 Part 14)'
OpenCV: FFMPEG: fallback to use tag 0x31637661/'avc1'

如何解决?

最佳答案

编解码器取决于平台,这可能是问题所在。尝试使用这种组合:

  • 文件扩展名 = test.mkv
  • 编解码器。 = CV_FOURCC(*'X264)

  • 这里是引用 link

    关于python - OpenCV:FFMPEG:标签 0x34363268/'h264' 不支持编解码器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52932157/

    26 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com